use of com.android.systemui.navigation.smartbar.SmartBackButtonDrawable in project android_packages_apps_DUI by DirtyUnicorns.
the class SmartBarView method setButtonDrawable.
public void setButtonDrawable(SmartButtonView button) {
ButtonConfig config = button.getButtonConfig();
Drawable d = null;
if (config != null) {
// a system navigation action icon is showing, get it locally
if (!config.hasCustomIcon() && config.isSystemAction()) {
d = mResourceMap.getActionDrawable(config.getActionConfig(ActionConfig.PRIMARY).getAction());
} else {
// custom icon or intent icon, get from library
d = config.getCurrentIcon(getContext());
}
if (TextUtils.equals(config.getTag(), Res.Softkey.BUTTON_BACK)) {
SmartBackButtonDrawable backDrawable = new SmartBackButtonDrawable(d);
button.setImageDrawable(null);
button.setImageDrawable(backDrawable);
final boolean backAlt = (mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) != 0;
backDrawable.setImeVisible(backAlt);
} else {
button.setImageDrawable(null);
button.setImageDrawable(d);
}
}
}
Aggregations