コード例 #1
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setHasOptionsMenu(true);
    orbot = OrbotInitializer.get(getActivity());
  }
コード例 #2
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    if (item.getItemId() == R.id.orbot) {
      OrbotInitializer.get(getActivity()).installOrbot(getActivity());
      return (true);
    }

    return (super.onOptionsItemSelected(item));
  }