title: Create a timer that you can edit android(Java)
body: <p>I build a simple timer app and i want to make it editable so the user can chooose Hour,minutes,sec. I tryed using EditText but it's not really working it's not really let me change anything.
  this is the code:</p>
  
  <p>xml:</p>
  
  <pre><code>   &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/activity_stopwatch"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="com.adir.stopwatch.StopwatchActivity"
      android:background="#000000"    
      &gt;
  
      &lt;Button
          android:id="@+id/reset_button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:onClick="onClickReset"
          android:text="@string/reset"
  android:textColor="#FFFFFF"
          android:layout_below="@+id/stop_button"
          android:layout_alignLeft="@+id/stop_button"
          android:layout_alignStart="@+id/stop_button" /&gt;
  
      &lt;EditText
          android:id="@+id/time_view"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginTop="17dp"
          android:text=""
          android:textAppearance="?android:attr/textAppearanceLarge"
          android:textSize="92sp"
          android:textColor="#FFFFFF"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"  
          /&gt;
  
      &lt;Button
          android:id="@+id/start_button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:onClick="onClickStart"
  android:text="@string/start"
          android:textColor="#FFFFFF"
          android:layout_below="@+id/time_view"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="16dp" /&gt;
  
      &lt;Button
          android:id="@+id/stop_button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:onClick="onClickStop"
          android:text="@string/stop"
          android:textColor="#FFFFFF"
          android:layout_alignLeft="@+id/start_button"
          android:layout_alignStart="@+id/start_button"
          android:layout_below="@+id/start_button"&gt;&lt;/Button&gt;   
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Java code:  </p>
  
  <pre><code>   public class StopwatchActivity extends Activity {
      private int seconds=0;
      private boolean running;  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_stopwatch);
          runTimer();
      }
  
      public void onClickStart(View view) {    
          running = true;    }
  
      public void onClickStop(View view) {
          running = false;  
      }
  
      public void onClickReset(View view) {
          running = false;
          seconds = 0;    
      }
  
      private void runTimer() {
          final EditText timeView = (EditText) findViewById(R.id.time_view);
          final Handler handler = new Handler();
          handler.post(new Runnable() {
              @Override
              public void run() {
                  int hours=seconds/3600;
                  int minutes=(seconds%3600)/60;
                  int secs=seconds%60;
                  String time = String.format("%d:%02d:%02d",hours, minutes, secs);
                  timeView.setText(time);
                  if (running) {
                      seconds--;
                  }
                  handler.postDelayed(this, 1000);
              }
          });  
      }  
  }
  </code></pre>
  
  <p>How can i fix it?</p>