I have created a singleton ListActivity which accepts a selection
index as an intent extra. However, calling setSelection(index) works
during "onCreate" but fails during "onNewIntent". Is there a way to
work around this?
public class PositionActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
/* ... standard initialization ... */
setSelection(getIntent().getIntExtra("position", 0);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setSelection(intent.getIntExtra("position", 0);
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---