Example usage for android.app StatusBarManager NAVIGATION_HINT_BACK_ALT

List of usage examples for android.app StatusBarManager NAVIGATION_HINT_BACK_ALT

Introduction

In this page you can find the example usage for android.app StatusBarManager NAVIGATION_HINT_BACK_ALT.

Prototype

int NAVIGATION_HINT_BACK_ALT

To view the source code for android.app StatusBarManager NAVIGATION_HINT_BACK_ALT.

Click Source Link

Usage

From source file:com.android.systemui.statusbar.phone.NavigationBarView.java

public void setNavigationIconHints(int hints, boolean force) {
    if (!force && hints == mNavigationIconHints)
        return;/*from   w w  w . j  av  a 2 s. com*/

    if (DEBUG) {
        android.widget.Toast.makeText(mContext, "Navigation icon hints = " + hints, 500).show();
    }

    mNavigationIconHints = hints;
    // We can't gaurantee users will set these buttons as targets
    if (getBackButton() != null) {
        getBackButton().setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_BACK_NOP)) ? 0.5f : 1.0f);
        ((ImageView) getBackButton())
                .setImageDrawable((0 != (hints & StatusBarManager.NAVIGATION_HINT_BACK_ALT))
                        ? (mVertical ? mBackAltLandIcon : mBackAltIcon)
                        : (mVertical ? mBackLandIcon : mBackIcon));
    }
    if (getHomeButton() != null) {
        getHomeButton().setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_HOME_NOP)) ? 0.5f : 1.0f);
    }
    if (getRecentsButton() != null) {
        getRecentsButton().setAlpha((0 != (hints & StatusBarManager.NAVIGATION_HINT_RECENT_NOP)) ? 0.5f : 1.0f);
    }
}