title: How to limit the text in numbers only from 0-59 in Edit Text in Android?
body: <p>I have an <code>Edit Text</code> in which the number can only between <code>0-59</code>, No other numbers will be typed  in that <code>Edit Text</code>, I tried <code>text-watcher</code> but did not get success. Any idea? </p>
  
  <pre><code>12-26 14:59:39.715: E/AndroidRuntime(19494): FATAL EXCEPTION: main
  12-26 14:59:39.715: E/AndroidRuntime(19494): java.lang.StackOverflowError
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.findViewTraversal(ViewGroup.java:2765)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewById(View.java:10442)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findViewShouldExist(View.java:4281)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.findUserSetNextFocus(View.java:4263)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.FocusFinder.findNextFocus(FocusFinder.java:66)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:569)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.ViewGroup.focusSearch(ViewGroup.java:571)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.View.focusSearch(View.java:4221)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.onCreateInputConnection(TextView.java:5378)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.inputmethod.InputMethodManager.startInputInner(InputMethodManager.java:977)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.view.inputmethod.InputMethodManager.restartInput(InputMethodManager.java:932)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2958)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2907)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.EditText.setText(EditText.java:90)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2882)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at com.fishing.MyLocation$check_lat_degree.onTextChanged(MyLocation.java:236)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.sendOnTextChanged(TextView.java:7226)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:3045)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2907)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.EditText.setText(EditText.java:90)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2882)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at com.fishing.MyLocation$check_lat_degree.onTextChanged(MyLocation.java:236)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.sendOnTextChanged(TextView.java:7226)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:3045)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2907)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.EditText.setText(EditText.java:90)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2882)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at com.fishing.MyLocation$check_lat_degree.onTextChanged(MyLocation.java:236)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.sendOnTextChanged(TextView.java:7226)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:3045)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2907)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.EditText.setText(EditText.java:90)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2882)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at com.fishing.MyLocation$check_lat_degree.onTextChanged(MyLocation.java:236)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.sendOnTextChanged(TextView.java:7226)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:3045)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2907)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.EditText.setText(EditText.java:90)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2882)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at com.fishing.MyLocation$check_lat_degree.onTextChanged(MyLocation.java:236)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.sendOnTextChanged(TextView.java:7226)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:3045)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.java:2907)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.EditText.setText(EditText.java:90)
  12-26 14:59:39.715: E/AndroidRuntime(19494):    at android.widget.TextView.setText(TextView.j
  </code></pre>