Code example for Bundle

Methods: getInt

0
      "com.commonsware.android.signature.dump.STATE_CHECKED"; 
  private PackageListAdapter adapter=null;
 
  @Override 
  public void onActivityCreated(Bundle state) {
    super.onActivityCreated(state);
 
    adapter=new PackageListAdapter(this);
    getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    setListAdapter(adapter);
 
    if (state != null) {
      int position=state.getInt(STATE_CHECKED, -1);
 
      if (position > -1) {
        getListView().setItemChecked(position, true);
        getContract().onPackageSelected(adapter.getItem(position));
      } 
    } 
  }