set Default Icon for ActionBar - Android User Interface

Android examples for User Interface:ActionBar

Description

set Default Icon for ActionBar

Demo Code


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

public class Main {
    public static void setIconeDefault(ActionBar actionBar, int resId) {
        if (actionBar == null) {
            return;
        }//from ww w .  j a  va 2  s. c  o  m
        actionBar.setIcon(resId);
        actionBar.show();
    }
}

Related Tutorials