Set the ActionBar to stop displaying the application icon - Android User Interface

Android examples for User Interface:ActionBar

Description

Set the ActionBar to stop displaying the application icon

Demo Code


//package com.java2s;
import android.app.ActionBar;
import android.app.Activity;

public class Main {
    /**/*from   w  ww  .  j  a  v  a2  s  .  c o  m*/
     * Set the ActionBar to stop displaying the application icon
     *
     * @param activity The current Activity
     */
    public static void setActionBarNoIcon(Activity activity) {
        // remove the icon from the actionbar
        ActionBar actionBar = activity.getActionBar();

        if (actionBar != null) {
            activity.getActionBar().setDisplayShowHomeEnabled(false);
        }
    }
}

Related Tutorials