Code example for InputMethodManager

Methods: toggleSoftInput

0
	} 
 
	public void keyboard(View view) {
		// open/close keyboard when click button 
		InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
		imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
	} 
 
	public void back(View view) {
		finish();
	} 
 
	public void initializeHeader() { 
		TextView title = (TextView) findViewById(R.id.HeaderTitle);
		title.setText("Champion List");
 
		// if grid view, change button to display list view 
		if (viewType.equals("grid")) {
			Button changeView = (Button) findViewById(R.id.buttonListType);
			changeView.setBackgroundResource(R.drawable.viewlist);
		}