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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user