示例#1
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mItems = OutlineActivityData.get().items;
    setListAdapter(new OutlineAdapter(getLayoutInflater(), mItems));
    // Restore the position within the list from last viewing
    getListView().setSelection(OutlineActivityData.get().position);
    setResult(-1);
  }
示例#2
0
 @Override
 protected void onListItemClick(ListView l, View v, int position, long id) {
   super.onListItemClick(l, v, position, id);
   OutlineActivityData.get().position = getListView().getFirstVisiblePosition();
   setResult(mItems[position].page);
   finish();
 }