Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- initializeViews();
- imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
- imm.hideSoftInputFromWindow(ipAddress.getWindowToken(), 0);
- //hideSoftInputFromWindow(chatTextBox.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
- //hideSoftInputFromWindow(chatTextBox.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
- hideKeyboard();
- }
- private void initializeViews() {
- Log.d("edoc", "message a");
- ipAddress = (MultiAutoCompleteTextView) findViewById(R.id.multiAutoCompleteTextView1);
- userName = (MultiAutoCompleteTextView) findViewById(R.id.multiAutoCompleteTextView2);
- passWord = (EditText) findViewById(R.id.editPassword1);
- loginConfirmBtn = (Button) findViewById(R.id.loginButton);
- rememberMeCb = (CheckBox) findViewById(R.id.checkBox1);
- fileInfoText = (TextView) findViewById(R.id.fileInfoText);
- exitBtn = (Button) findViewById(R.id.exitBtn);
- sp_datapath = (Spinner) findViewById(R.id.sp_datapath);
- adapter = new ArrayAdapter<String>(this,android.R.layout.simple_expandable_list_item_1, myac);
- adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- adapter.setNotifyOnChange(false);
- sp_datapath.setAdapter(adapter);
- sp_datapathState(false);
- loginConfirmBtnState(false);
- }
- void hideKeyboard() {
- imm.hideSoftInputFromWindow(ipAddress.getWindowToken(), 0);
- imm.hideSoftInputFromWindow(userName.getWindowToken(), 0);
- imm.hideSoftInputFromWindow(passWord.getWindowToken(), 0);
- imm.hideSoftInputFromWindow(rememberMeCb.getWindowToken(), 0);
- imm.hideSoftInputFromWindow(loginConfirmBtn.getWindowToken(), 0);
- imm.hideSoftInputFromWindow(exitBtn.getWindowToken(), 0);
- };
Advertisement
Add Comment
Please, Sign In to add comment