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;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.View.OnLongClickListener;
|
import android.view.View.OnLongClickListener;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@@ -378,6 +379,13 @@ public class ExaltedDice extends Activity implements OnClickListener, OnLongClic
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hide keyboard
|
||||||
|
*
|
||||||
|
* works on the emulator
|
||||||
|
*/
|
||||||
|
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(dice.getWindowToken(), 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* display hello message
|
* display hello message
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user