Guest User

Untitled

a guest
Jul 24th, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. public void onCreate(Bundle savedInstanceState) {
  2. super.onCreate(savedInstanceState);
  3. setContentView(R.layout.activity_main);
  4.  
  5. initializeViews();
  6. imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
  7. imm.hideSoftInputFromWindow(ipAddress.getWindowToken(), 0);
  8. //hideSoftInputFromWindow(chatTextBox.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
  9. //hideSoftInputFromWindow(chatTextBox.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
  10. hideKeyboard();
  11.  
  12. }
  13. private void initializeViews() {
  14. Log.d("edoc", "message a");
  15. ipAddress = (MultiAutoCompleteTextView) findViewById(R.id.multiAutoCompleteTextView1);
  16. userName = (MultiAutoCompleteTextView) findViewById(R.id.multiAutoCompleteTextView2);
  17. passWord = (EditText) findViewById(R.id.editPassword1);
  18.  
  19. loginConfirmBtn = (Button) findViewById(R.id.loginButton);
  20. rememberMeCb = (CheckBox) findViewById(R.id.checkBox1);
  21. fileInfoText = (TextView) findViewById(R.id.fileInfoText);
  22. exitBtn = (Button) findViewById(R.id.exitBtn);
  23. sp_datapath = (Spinner) findViewById(R.id.sp_datapath);
  24.  
  25. adapter = new ArrayAdapter<String>(this,android.R.layout.simple_expandable_list_item_1, myac);
  26. adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  27. adapter.setNotifyOnChange(false);
  28.  
  29. sp_datapath.setAdapter(adapter);
  30. sp_datapathState(false);
  31. loginConfirmBtnState(false);
  32.  
  33.  
  34.  
  35. }
  36.  
  37. void hideKeyboard() {
  38. imm.hideSoftInputFromWindow(ipAddress.getWindowToken(), 0);
  39. imm.hideSoftInputFromWindow(userName.getWindowToken(), 0);
  40. imm.hideSoftInputFromWindow(passWord.getWindowToken(), 0);
  41. imm.hideSoftInputFromWindow(rememberMeCb.getWindowToken(), 0);
  42. imm.hideSoftInputFromWindow(loginConfirmBtn.getWindowToken(), 0);
  43. imm.hideSoftInputFromWindow(exitBtn.getWindowToken(), 0);
  44. };
Advertisement
Add Comment
Please, Sign In to add comment