Code example for ActionBarActivity

Methods: getSupportActionBar

0
 
	public void setTitle(String title) {
		this.getSupportActionBar().setTitle(title);
	} 
 
	public void setTitle(int title) {
		this.getSupportActionBar().setTitle(title);
	} 
 
	public void hideKeyboard() { 
		InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
		View view = this.getCurrentFocus();
		if (view != null) {
			imm.hideSoftInputFromWindow(
					this.getCurrentFocus().getWindowToken(), 0);
		} 
	} 
 
	public void toggleMenu() { 
		if (this.mDrawerLayout.isDrawerVisible(this.mMenu)) {
			this.mDrawerLayout.closeDrawer(this.mMenu);