in onCreate() i added a line that should hide the soft keyboard untill the user clicks on the dice EditText.

Note: it works on the emulator, but not my phone.
This commit is contained in:
2010-04-26 16:37:19 +00:00
parent 9b416e9e4e
commit 5c7f57c2b2

View File

@@ -15,6 +15,7 @@ import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
@@ -377,7 +378,14 @@ public class ExaltedDice extends Activity implements OnClickListener, OnLongClic
// rollDice();
// }
// });
/**
* hide keyboard
*
* works on the emulator
*/
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(dice.getWindowToken(), 0);
/**
* display hello message
*/