Rate app

//Rate app ie click krishu ie direct aapde app playstore pr khulse

Step 1:rate.xml
Step 2:rate.java
Step 3:String.xml

Step 1:rate.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"

    tools:context="demoproject.aalap.com.retrofit.Main3Activity">

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:src="@drawable/ic_launcher_background" />

</RelativeLayout>

Step 2:rate.java


package demoproject.aalap.com.retrofit;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

public class Main3Activity extends AppCompatActivity {
    ImageView imageview;
    Intent intent ;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main3);

        imageview = (ImageView)findViewById(R.id.imageView1);

        imageview.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub

                intent = new Intent(android.content.Intent.ACTION_VIEW);

                //Copy App URL from Google Play Store.
                intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.google.android.youtube"));

                startActivity(intent);

            }
        });
    }
}

Step 3:Strings.xml

<resources>
    <string name="app_name">Retrofit</string>

    <string name="action_settings">Settings</string>
    <string name="rate_app_title">Rate our App</string>
    <string name="rate_app_message">If you like our app, please take a moment to rate it in play store!</string>
    <string name="dialog_app_rate">Rate App</string>
    <string name="dialog_ask_later">Later</string>
    <string name="dialog_your_feedback">Your Feedback</string>
    <string name="app_message">Launch count is %d</string>
</resources>

Comments

Popular posts from this blog

Seaborn

profile fragment firebase ie image and information vadu page update tay firebase ma

Payment ideal