Java Code Examples for android.app.ActionBar#setHomeActionContentDescription()

The following examples show how to use android.app.ActionBar#setHomeActionContentDescription() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DuoDrawerToggle.java    From duo-navigation-drawer with Apache License 2.0 5 votes vote down vote up
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
@Override
public void setActionBarUpIndicator(Drawable drawable, int contentDescRes) {
    final ActionBar actionBar = mActivity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeAsUpIndicator(drawable);
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
}
 
Example 2
Source File: DuoDrawerToggle.java    From duo-navigation-drawer with Apache License 2.0 5 votes vote down vote up
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
@Override
public void setActionBarDescription(int contentDescRes) {
    final ActionBar actionBar = mActivity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
}
 
Example 3
Source File: ActionBarDrawerToggle.java    From Overchan-Android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void setActionBarUpIndicator(Drawable drawable, int contentDescRes) {
    final ActionBar actionBar = mActivity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeAsUpIndicator(drawable);
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
}
 
Example 4
Source File: ActionBarDrawerToggle.java    From Overchan-Android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void setActionBarDescription(int contentDescRes) {
    final ActionBar actionBar = mActivity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
}
 
Example 5
Source File: ActionBarDrawerToggleJellybeanMR2.java    From adt-leanback-support with Apache License 2.0 5 votes vote down vote up
public static Object setActionBarUpIndicator(Object info, Activity activity,
        Drawable drawable, int contentDescRes) {
    final ActionBar actionBar = activity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeAsUpIndicator(drawable);
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
    return info;
}
 
Example 6
Source File: ActionBarDrawerToggleJellybeanMR2.java    From adt-leanback-support with Apache License 2.0 5 votes vote down vote up
public static Object setActionBarDescription(Object info, Activity activity,
        int contentDescRes) {
    final ActionBar actionBar = activity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
    return info;
}
 
Example 7
Source File: JToggle.java    From jus with Apache License 2.0 5 votes vote down vote up
@Override
public void setActionBarUpIndicator(Drawable drawable, int contentDescRes) {
    final ActionBar actionBar = mActivity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeAsUpIndicator(drawable);
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
}
 
Example 8
Source File: JToggle.java    From jus with Apache License 2.0 5 votes vote down vote up
@Override
public void setActionBarDescription(int contentDescRes) {
    final ActionBar actionBar = mActivity.getActionBar();
    if (actionBar != null) {
        actionBar.setHomeActionContentDescription(contentDescRes);
    }
}