Code example for InputMethodManager

Methods: toggleSoftInput

0
 
	@Override 
	protected void onResume() { 
		Log.d(TAG,"onResume");
		mImeManager = (InputMethodManager) this.getSystemService("input_method");		
		mImeManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_NOT_ALWAYS);
		super.onResume(); 
	} 
	 
	public void initialize(){ 
		mEdit = (EditText)findViewById(R.id.EditExMsg);
		mExMsgSaveButton = (Button)findViewById(R.id.EditExMsgSave);
		mExMsgCancelButton = (Button)findViewById(R.id.EditExMsgCancel);
		 
		mExMsgSaveButton.setOnClickListener(this);
		mExMsgCancelButton.setOnClickListener(this);		
		 
		Intent intent = getIntent();
		int editMode = intent.getIntExtra(EXTRA_NEW_OR_EDIT_EXCUSE_MESSAGE, 0);
		 
		switch(editMode){