Exemple #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mActivity = this;

    Globals.setContext(mActivity);

    setContentView(R.layout.activity_main);
    startStopButton = findViewById(R.id.start_stop_button);
    startStopButton.setOnClickListener(this);
    ipText = (TextView) findViewById(R.id.ip_address);
    instructionText = (TextView) findViewById(R.id.instruction);
    instructionTextPre = (TextView) findViewById(R.id.instruction_pre);
    updateUi();
    UiUpdater.registerClient(handler);
  }
Exemple #2
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   UiUpdater.unregisterClient(handler);
 }