0

1.New Activity

public class RateQuizActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {

    Log.d("feedback", "Activity loaded");
  setContentView(R.layout.rate_this_quiz);

    Log.d("feedback", "Content View setted");
}}

2.call using intent--(0N button click)

Handler handler = new Handler(Looper.getMainLooper());
            handler.post(new Runnable() {
                @Override
                public void run() {
                    Intent in = new Intent(QuizByteReviewActivity.this, RateQuizActivity.class);

                     startActivity(in);


                }
            });

log cat displays both "Activity loaded" and "Content View setted" messages,but when click on button getting "Unfortunately (App name) stopes message"

duggu
  • 37,851
  • 12
  • 116
  • 113
Lejin K.R
  • 33
  • 4

1 Answers1

0

try this:

Handler handler = new Handler(Looper.getMainLooper());
        handler.post(new Runnable() {
            @Override
            public void run() {
                Intent in = = new Intent(Intent.ACTION_VIEW);
                in.setClass(QuizByteReviewActivity.this, RateQuizActivity.class);

                 startActivity(in);


            }
        });

Add your RateQuizActivity to the manifest:

<activity
    android:name="com.example.RateQuizActivity "
    android:label="@string/title_activity_display_message">        
</activity>
Miki Franko
  • 687
  • 3
  • 7