startBrowser.setFocusable(false); startBrowser.setActionCommand("console"); startBrowser.addActionListener(this);
alertDialog.setOnShowListener(new DialogInterface.OnShowListener(){ @Override public void onShow(DialogInterface dialog) { Button negative = alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE); negative.setFocusable(true); negative.setFocusableInTouchMode(true); negative.requestFocus(); } }); alertDialog.show();
final ScrollView s = (ScrollView)findViewById(R.id.ScrollView01); s.post(new Runnable() { public void run() { EditText editText =(EditText) findViewById(R.id.yourEditText); (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)) .hideSoftInputFromWindow(editText.getWindowToken(), 0); Button button =(Button) findViewById(R.id.SaveProfileEditingButton); button.setFocusable(true); button.requestFocus(); } });
// Set the focus to the calculate button so the keyboard won't show up automatically Button calcButton = (Button)findViewById( R.id.ac_button_calculate ); calcButton.setFocusable( true ); calcButton.setFocusableInTouchMode( true ); calcButton.requestFocus();
public void onClick(View v) { btn_map.requestFocus(); btn_map.setFocusable(true); SharedPreferences.Editor prefsEditor = prefs.edit(); prefsEditor.putInt("settings", 1); public void onClick(View v) { btn_name.requestFocus(); btn_name.setFocusable(true); SharedPreferences.Editor prefsEditor = prefs.edit(); prefsEditor.putInt("settings", 0);
alertDialog.setOnShowListener(new DialogInterface.OnShowListener(){ @Override public void onShow(DialogInterface dialog) { Button positive= alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); positive.setFocusable(true); positive.setFocusableInTouchMode(true); positive.requestFocus(); } });
startBrowser.setFocusable(false); startBrowser.setActionCommand("console"); startBrowser.addActionListener(this);
startBrowser.setFocusable(false); startBrowser.setActionCommand("console"); startBrowser.addActionListener(this);
startBrowser.setFocusable(false); startBrowser.setActionCommand("console"); startBrowser.addActionListener(this);