Ejemplo n.º 1
0
 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
   super.onCreateOptionsMenu(menu);
   MenuInflater inflater = getMenuInflater();
   inflater.inflate(menuId, menu);
   return true;
 }
Ejemplo n.º 2
0
  // Implement save/restore
  protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);

    String st = savedInstanceState.getString("debugViewText");
    if (st == null) return;
    TextView tv = getTextView();
    tv.setText(st);
    Log.d(tag, "Restored state");
  }
Ejemplo n.º 3
0
  @Override
  protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    if (this.m_retainState == false) return;

    // save state
    TextView tv = getTextView();
    String t = tv.getText().toString();
    outState.putString("debugViewText", t);
    Log.d(tag, "Saved state");
  }
Ejemplo n.º 4
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.debug_activity_layout);
 }