0

I have an Activity that uses a ListView to simply display a list of options for a user to select and when they select an option they are taken to a new Activity.

However on occasion the Activity with the options freezes when I try to select one of the options, I get the ANR and in the log cat the following error is displayed:

java.lang.RuntimeException: Performing pause of activity that is not resumed:<Activity>

Does anyone know what this error means and how to diagnose it?

A search brings up very little.

Does anyone know what may be causing the error?

I can post the code on request

Code as requested:

lvMenu.setOnItemClickListener(new OnItemClickListener() {
 @Override
 public void onItemClick(AdapterView<?> a, View v, int position, long id) {
 switch(position){
 case 0:
 Intent intent = new Intent(this, SettingsApp.class);
 startActivity(intent);
 break;
 case 1:
 Intent intentHO = new Intent(.this, SettingsHO.class);
 startActivity(intentHO);
 break;
 case 2:
 Intent intentWifi = new Intent(this, Settings.class);
 startActivity(intentWifi);
 break;
 case 3:
 Intent intentAudio = new Intent(this, SettingsAudio.class);
 startActivity(intentAudio);
 break;
 case 4:
 Intent intentDiagnostics = new Intent(this, PhoneStatus.class);
 startActivity(intentDiagnostics);
 }
 }
 });
asked Oct 12, 2010 at 9:41

1 Answer 1

1

Seem you're doing something wrong starting a new Activity. Please post your onClickListener method.

answered Oct 12, 2010 at 10:52
Sign up to request clarification or add additional context in comments.

1 Comment

Can you tell what was the problem?

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.