Implement Custom Numpad for EditText
<p>I have an application with a numpad (keys 0-9, Ok and Delete) that is always visible on screen.</p>

<p>When the user sets the focus on an <code>EditText</code> that has an numeric input method, then the key pressed on the numpad should be applied to the focused <code>EditText</code>.</p>

<p>My current approach is to set a <code>OnFocusChanged</code> listener on each <code>EditText</code> with numeric input method, and then remember the focused control:</p>

<pre><code> EditText txt1 = (EditText) findViewById(R.id.editText1);
        txt1.setOnFocusChangeListener(new View.OnFocusChangeListener() {
          public void onFocusChange(View v, boolean hasFocus) {
              if(hasFocus)
                  focused = (EditText)v; // focused is a member of the Activity class
          }});
</code></pre>

<p>Then when a numpad key is pressed the key is applied to the <code>focused</code> control.</p>

<p>To me this seems a bit complex, is there an easier way that works automagically (without the focus change listener) on all <code>EditText</code> widgets with numeric input method?</p>

<p>Secondly, is there a way to disable the soft keyboard for those <code>EditText</code> widgets with numeric input only?</p>
