Code example for ActionBar

Methods: getDisplayOptions, setDisplayOptions

0
 
	public static void setShowTitleBackButton(Activity activity) {
		// 标题栏返回 
		final ActionBar bar = activity.getActionBar();
		int flags = ActionBar.DISPLAY_HOME_AS_UP;
		int change = bar.getDisplayOptions() ^ flags;
		bar.setDisplayOptions(change, flags);
	} 
 
	/** 
	 * show IME when need by manual 
	 *  
	 * @param view 
	 *            the view that need show IME 
	 * @param hasFoucs 
	 *            show or not 
	 * */ 
	public static void onFocusChange(final View view, boolean hasFocus) {
		final boolean isFocus = hasFocus;
		(new Handler()).postDelayed(new Runnable() {
			public void run() {