List of usage examples for android.app ActionBar setIcon
public abstract void setIcon(Drawable icon);
From source file:Main.java
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) private static void setActionBarHomeIcon(ActionBar bar, Drawable icon) { bar.setIcon(icon); }
From source file:Main.java
public static void setIconeDefault(ActionBar actionBar, int resId) { if (actionBar == null) { return;/* w w w.j a v a2s . co m*/ } actionBar.setIcon(resId); actionBar.show(); }
From source file:me.barrasso.android.volume.activities.ConfigurationActivity.java
public static void setupActionBar(Activity activity) { // Tint the status bar, if available. SystemBarTintManager tintManager = new SystemBarTintManager(activity); tintManager.setStatusBarTintEnabled(true); tintManager.setTintColor(activity.getResources().getColor(R.color.action_bar_dark)); ActionBar actionBar = activity.getActionBar(); if (null != actionBar) { actionBar.setIcon(DateUtils.AppIcon()); actionBar.setDisplayHomeAsUpEnabled(!activity.isTaskRoot()); actionBar.setDisplayShowTitleEnabled(true); }/*from w w w . ja v a 2 s. co m*/ }
From source file:com.affectiva.affdexme.SettingsActivity.java
@Override public void onCreate(Bundle savedBundleInstance) { super.onCreate(savedBundleInstance); ActionBar actionBar = getActionBar(); if (actionBar != null) { actionBar.setIcon(new ColorDrawable( ContextCompat.getColor(getApplicationContext(), R.color.transparent_overlay))); }//from w w w . j a v a2 s . c om }
From source file:com.docd.purefm.settings.SettingsActivity.java
@Override protected void setActionBarIcon(final Drawable icon) { final ActionBar actionBar = getActionBar(); if (actionBar == null) { throw new RuntimeException("Should have ActionBar"); }//from w w w .java 2s . com actionBar.setIcon(icon); }
From source file:com.android.settings.aicp.AicpSettings.java
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mContainer = container;/*ww w .ja v a 2s.c o m*/ final ActionBar actionBar = getActivity().getActionBar(); actionBar.setIcon(R.drawable.ic_settings_aicp); View view = inflater.inflate(R.layout.preference_generalui, container, false); mViewPager = (ViewPager) view.findViewById(R.id.viewPager); mTabs = (PagerSlidingTabStrip) view.findViewById(R.id.tabs); StatusBarAdapter StatusBarAdapter = new StatusBarAdapter(getFragmentManager()); mViewPager.setAdapter(StatusBarAdapter); mTabs.setViewPager(mViewPager); setHasOptionsMenu(true); return view; }
From source file:org.catnut.fragment.TransientUsersFragment.java
@Override public void onStart() { super.onStart(); ActionBar bar = getActivity().getActionBar(); bar.setIcon(R.drawable.ic_title_people); bar.setTitle(getString(mFollowing ? R.string.his_followings : R.string.his_followers, mScreenName)); }
From source file:org.catnut.fragment.ConversationFragment.java
@Override public void onStart() { super.onStart(); ActionBar bar = getActivity().getActionBar(); bar.setIcon(R.drawable.ic_action_conversation); bar.setTitle(getString(R.string.received_reply)); }
From source file:com.yattatech.dbtc.activity.AbstractChainTaskScreen.java
protected void setActionBar() { final int color = getResources().getColor(R.color.grey2); final ActionBar actionBar = getActionBar(); actionBar.setIcon(R.drawable.ic_calen); actionBar.setTitle(R.string.app_name); actionBar.setBackgroundDrawable(new ColorDrawable(color)); }
From source file:org.catnut.fragment.MyRelationshipFragment.java
@Override public void onStart() { super.onStart(); ActionBar bar = getActivity().getActionBar(); bar.setIcon(R.drawable.ic_title_people); bar.setTitle(getString(mIsFollowing ? R.string.my_followings_title : R.string.follow_me_title)); }