title: Android: Updating Textview with Onclick Method when switching to landscape mode
body: <p>Looking for some help.  I am putting a Countup Timer function into my code.  Click a button, timer starts and displays Hr, Mins, Secs to a textview. Click button timer pauses.  This function works well BUT when I switch to landscape mode I can't get the textview to continue to update.  I put the timer function into its own class and save this in a parcel/bundle.  I can see from my logs that this transfers over without an issue and continues to count up but the Textview call in the ontick function isn't used anymore.  Below is the code.  </p>
  
  <pre><code>        @Override
              protected void onCreate(Bundle savedInstanceState) {
                  super.onCreate(savedInstanceState);
                  setContentView(R.layout.activity_main_page);
                  timerStart = (Button) findViewById(startTimer);
                  timerOutput = (TextView) findViewById(R.id.time);
                  runTimer = new CountUpTimer(1000) {
                  @Override
                  public void onTick(long elapsedTime) {
                      Log.i("elapsedtime", "yes");
                      timerOutput.setText(runTimer.getelapsedTime());
                      runTimer.stop();
                  }
              };
              View.OnClickListener TimerOnclickLisner = new View.OnClickListener() {
                  //  Looks for user to click on the button to start the timer
                  @Override
                  public void onClick(View v) {
                      if (onOffTracker == true) {
                          runTimer.restart();
                      }
                      else {
                          runTimer.stop();
                      }
                      onOffTracker = !onOffTracker;
                  }
              };
              timerStart.setOnClickListener(TimerOnclickLisner);
  
              if (savedInstanceState != null) {
                  InitializeTimer = 
                  onOffTracker = savedInstanceState.getBoolean(STATE_ONOFFTRACKER);
                  runTimer = new CountUpTimer(1000) {
                      @Override
                      public void onTick(long elapsedTime) {
                          timerOutput.setText(runTimer.getelapsedTime());
                          runTimer.stop();
                      }
                  };
                  runTimer = savedInstanceState.getParcelable(STATE_COUNTERUP);
                  runTimer.restart();
              }
          }
  
   @Override
      protected void onSaveInstanceState(Bundle outState) {
          outState.putBoolean(STATE_ONOFFTRACKER, onOffTracker);
          outState.putParcelable(STATE_COUNTERUP, runTimer);
          super.onSaveInstanceState(outState);
      }
  </code></pre>
  
  <p>I didn't include the code for the CounterTimer class because I know this is working fine.  Issue really is how to get the textview to respond to onclick after it gets destroyed and reset up when switching from portrait to Landscape and back again.  I tried recalling the ontick function again when I bring the parcel back. doesn't work. I did confirm that the counter is still working though.</p>
  
  <p>Code</p>