Search in sources :

Example 1 with BUTTON_A11Y

use of com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y in project android_packages_apps_Launcher3 by ArrowOS.

the class NavbarButtonsViewController method initButtons.

private void initButtons(ViewGroup navContainer, ViewGroup endContainer, TaskbarNavButtonController navButtonController) {
    mBackButton = addButton(R.drawable.ic_sysbar_back, BUTTON_BACK, mNavButtonContainer, mControllers.navButtonController, R.id.back);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> {
        // Show only if not disabled, and if not on the keyguard or otherwise only when
        // the bouncer or a lockscreen app is showing above the keyguard
        boolean showingOnKeyguard = (flags & FLAG_KEYGUARD_VISIBLE) == 0 || (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_OCCLUDED) != 0;
        return (flags & FLAG_DISABLE_BACK) == 0 && ((flags & FLAG_KEYGUARD_VISIBLE) == 0 || showingOnKeyguard);
    }));
    boolean isRtl = Utilities.isRtl(mContext.getResources());
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_IME_VISIBLE) != 0, View.ROTATION, isRtl ? 90 : -90, 0));
    // Translate back button to be at end/start of other buttons for keyguard
    int navButtonSize = mContext.getResources().getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_VISIBLE) != 0, VIEW_TRANSLATE_X, navButtonSize * (isRtl ? -2 : 2), 0));
    // home and recents buttons
    View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer, navButtonController, R.id.home);
    mPropertyHolders.add(new StatePropertyHolder(homeButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_HOME) == 0));
    View recentsButton = addButton(R.drawable.ic_sysbar_recent, BUTTON_RECENTS, navContainer, navButtonController, R.id.recent_apps);
    mPropertyHolders.add(new StatePropertyHolder(recentsButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_RECENTS) == 0));
    // A11y button
    mA11yButton = addButton(R.drawable.ic_sysbar_accessibility_button, BUTTON_A11Y, endContainer, navButtonController, R.id.accessibility_button, R.layout.taskbar_contextual_button);
    mPropertyHolders.add(new StatePropertyHolder(mA11yButton, flags -> (flags & FLAG_A11Y_VISIBLE) != 0 && (flags & FLAG_ROTATION_BUTTON_VISIBLE) == 0));
}
Also used : Rect(android.graphics.Rect) BUTTON_A11Y(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y) Config(android.content.pm.ActivityInfo.Config) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) IntPredicate(java.util.function.IntPredicate) BUTTON_HOME(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_HOME) Property(android.util.Property) ColorStateList(android.content.res.ColorStateList) BUTTON_BACK(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BACK) View(android.view.View) ArgbEvaluator(android.animation.ArgbEvaluator) Op(android.graphics.Region.Op) RotationButtonController(com.android.systemui.shared.rotation.RotationButtonController) LayoutRes(android.annotation.LayoutRes) Utilities(com.android.launcher3.Utilities) RotationButton(com.android.systemui.shared.rotation.RotationButton) AnimatedFloat(com.android.quickstep.AnimatedFloat) SYSUI_STATE_SCREEN_PINNING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING) ObjectAnimator(android.animation.ObjectAnimator) Region(android.graphics.Region) ViewGroup(android.view.ViewGroup) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) SYSUI_STATE_BACK_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BACK_DISABLED) IdRes(android.annotation.IdRes) SYSUI_STATE_HOME_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED) SYSUI_STATE_OVERVIEW_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED) BUTTON_IME_SWITCH(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH) OnHoverListener(android.view.View.OnHoverListener) LauncherAnimUtils(com.android.launcher3.LauncherAnimUtils) AlphaUpdateListener(com.android.launcher3.anim.AlphaUpdateListener) BUTTON_RECENTS(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS) SYSUI_STATE_A11Y_BUTTON_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE) AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable) ArrayList(java.util.ArrayList) SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) MotionEvent(android.view.MotionEvent) DrawableRes(android.annotation.DrawableRes) SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) SYSUI_STATE_QUICK_SETTINGS_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED) VIEW_TRANSLATE_X(com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X) ALPHA_INDEX_KEYGUARD(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD) TaskbarButton(com.android.launcher3.taskbar.TaskbarNavButtonController.TaskbarButton) FloatingRotationButton(com.android.systemui.shared.rotation.FloatingRotationButton) SYSUI_STATE_IME_SWITCHER_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_SHOWING) Gravity(android.view.Gravity) R(com.android.launcher3.R) Configuration(android.content.res.Configuration) SYSUI_STATE_IME_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING) OnClickListener(android.view.View.OnClickListener) ImageView(android.widget.ImageView) View(android.view.View)

Example 2 with BUTTON_A11Y

use of com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y in project android_packages_apps_404Launcher by P-404.

the class NavbarButtonsViewController method initButtons.

private void initButtons(ViewGroup navContainer, ViewGroup endContainer, TaskbarNavButtonController navButtonController) {
    mBackButton = addButton(R.drawable.ic_sysbar_back, BUTTON_BACK, mNavButtonContainer, mControllers.navButtonController, R.id.back);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> {
        // Show only if not disabled, and if not on the keyguard or otherwise only when
        // the bouncer or a lockscreen app is showing above the keyguard
        boolean showingOnKeyguard = (flags & FLAG_KEYGUARD_VISIBLE) == 0 || (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_OCCLUDED) != 0;
        return (flags & FLAG_DISABLE_BACK) == 0 && ((flags & FLAG_KEYGUARD_VISIBLE) == 0 || showingOnKeyguard);
    }));
    boolean isRtl = Utilities.isRtl(mContext.getResources());
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_IME_VISIBLE) != 0, View.ROTATION, isRtl ? 90 : -90, 0));
    // Translate back button to be at end/start of other buttons for keyguard
    int navButtonSize = mContext.getResources().getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_VISIBLE) != 0, VIEW_TRANSLATE_X, navButtonSize * (isRtl ? -2 : 2), 0));
    // home and recents buttons
    View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer, navButtonController, R.id.home);
    mPropertyHolders.add(new StatePropertyHolder(homeButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_HOME) == 0));
    View recentsButton = addButton(R.drawable.ic_sysbar_recent, BUTTON_RECENTS, navContainer, navButtonController, R.id.recent_apps);
    mPropertyHolders.add(new StatePropertyHolder(recentsButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_RECENTS) == 0));
    // A11y button
    mA11yButton = addButton(R.drawable.ic_sysbar_accessibility_button, BUTTON_A11Y, endContainer, navButtonController, R.id.accessibility_button, R.layout.taskbar_contextual_button);
    mPropertyHolders.add(new StatePropertyHolder(mA11yButton, flags -> (flags & FLAG_A11Y_VISIBLE) != 0 && (flags & FLAG_ROTATION_BUTTON_VISIBLE) == 0));
}
Also used : Rect(android.graphics.Rect) BUTTON_A11Y(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y) Config(android.content.pm.ActivityInfo.Config) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) IntPredicate(java.util.function.IntPredicate) BUTTON_HOME(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_HOME) Property(android.util.Property) ColorStateList(android.content.res.ColorStateList) BUTTON_BACK(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BACK) View(android.view.View) ArgbEvaluator(android.animation.ArgbEvaluator) Op(android.graphics.Region.Op) RotationButtonController(com.android.systemui.shared.rotation.RotationButtonController) LayoutRes(android.annotation.LayoutRes) Utilities(com.android.launcher3.Utilities) RotationButton(com.android.systemui.shared.rotation.RotationButton) AnimatedFloat(com.android.quickstep.AnimatedFloat) SYSUI_STATE_SCREEN_PINNING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING) ObjectAnimator(android.animation.ObjectAnimator) Region(android.graphics.Region) ViewGroup(android.view.ViewGroup) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) SYSUI_STATE_BACK_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BACK_DISABLED) IdRes(android.annotation.IdRes) SYSUI_STATE_HOME_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED) SYSUI_STATE_OVERVIEW_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED) BUTTON_IME_SWITCH(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH) OnHoverListener(android.view.View.OnHoverListener) LauncherAnimUtils(com.android.launcher3.LauncherAnimUtils) AlphaUpdateListener(com.android.launcher3.anim.AlphaUpdateListener) BUTTON_RECENTS(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS) SYSUI_STATE_A11Y_BUTTON_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE) AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable) ArrayList(java.util.ArrayList) SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) MotionEvent(android.view.MotionEvent) DrawableRes(android.annotation.DrawableRes) SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) SYSUI_STATE_QUICK_SETTINGS_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED) VIEW_TRANSLATE_X(com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X) ALPHA_INDEX_KEYGUARD(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD) TaskbarButton(com.android.launcher3.taskbar.TaskbarNavButtonController.TaskbarButton) FloatingRotationButton(com.android.systemui.shared.rotation.FloatingRotationButton) SYSUI_STATE_IME_SWITCHER_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_SHOWING) Gravity(android.view.Gravity) R(com.android.launcher3.R) Configuration(android.content.res.Configuration) SYSUI_STATE_IME_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING) OnClickListener(android.view.View.OnClickListener) ImageView(android.widget.ImageView) View(android.view.View)

Example 3 with BUTTON_A11Y

use of com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y in project android_packages_apps_Launcher3 by AOSPA.

the class NavbarButtonsViewController method initButtons.

private void initButtons(ViewGroup navContainer, ViewGroup endContainer, TaskbarNavButtonController navButtonController) {
    mBackButton = addButton(R.drawable.ic_sysbar_back, BUTTON_BACK, mNavButtonContainer, mControllers.navButtonController, R.id.back);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> {
        // Show only if not disabled, and if not on the keyguard or otherwise only when
        // the bouncer or a lockscreen app is showing above the keyguard
        boolean showingOnKeyguard = (flags & FLAG_KEYGUARD_VISIBLE) == 0 || (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_OCCLUDED) != 0;
        return (flags & FLAG_DISABLE_BACK) == 0 && ((flags & FLAG_KEYGUARD_VISIBLE) == 0 || showingOnKeyguard);
    }));
    boolean isRtl = Utilities.isRtl(mContext.getResources());
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_IME_VISIBLE) != 0, View.ROTATION, isRtl ? 90 : -90, 0));
    // Translate back button to be at end/start of other buttons for keyguard
    int navButtonSize = mContext.getResources().getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_VISIBLE) != 0, VIEW_TRANSLATE_X, navButtonSize * (isRtl ? -2 : 2), 0));
    // home and recents buttons
    View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer, navButtonController, R.id.home);
    mPropertyHolders.add(new StatePropertyHolder(homeButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_HOME) == 0));
    View recentsButton = addButton(R.drawable.ic_sysbar_recent, BUTTON_RECENTS, navContainer, navButtonController, R.id.recent_apps);
    mPropertyHolders.add(new StatePropertyHolder(recentsButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_RECENTS) == 0));
    // A11y button
    mA11yButton = addButton(R.drawable.ic_sysbar_accessibility_button, BUTTON_A11Y, endContainer, navButtonController, R.id.accessibility_button, R.layout.taskbar_contextual_button);
    mPropertyHolders.add(new StatePropertyHolder(mA11yButton, flags -> (flags & FLAG_A11Y_VISIBLE) != 0 && (flags & FLAG_ROTATION_BUTTON_VISIBLE) == 0));
}
Also used : Rect(android.graphics.Rect) BUTTON_A11Y(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y) Config(android.content.pm.ActivityInfo.Config) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) IntPredicate(java.util.function.IntPredicate) BUTTON_HOME(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_HOME) Property(android.util.Property) ColorStateList(android.content.res.ColorStateList) BUTTON_BACK(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BACK) View(android.view.View) ArgbEvaluator(android.animation.ArgbEvaluator) Op(android.graphics.Region.Op) RotationButtonController(com.android.systemui.shared.rotation.RotationButtonController) LayoutRes(android.annotation.LayoutRes) Utilities(com.android.launcher3.Utilities) RotationButton(com.android.systemui.shared.rotation.RotationButton) AnimatedFloat(com.android.quickstep.AnimatedFloat) SYSUI_STATE_SCREEN_PINNING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING) ObjectAnimator(android.animation.ObjectAnimator) Region(android.graphics.Region) ViewGroup(android.view.ViewGroup) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) SYSUI_STATE_BACK_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BACK_DISABLED) IdRes(android.annotation.IdRes) SYSUI_STATE_HOME_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED) SYSUI_STATE_OVERVIEW_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED) BUTTON_IME_SWITCH(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH) OnHoverListener(android.view.View.OnHoverListener) LauncherAnimUtils(com.android.launcher3.LauncherAnimUtils) AlphaUpdateListener(com.android.launcher3.anim.AlphaUpdateListener) BUTTON_RECENTS(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS) SYSUI_STATE_A11Y_BUTTON_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE) AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable) ArrayList(java.util.ArrayList) SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) MotionEvent(android.view.MotionEvent) DrawableRes(android.annotation.DrawableRes) SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) SYSUI_STATE_QUICK_SETTINGS_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED) VIEW_TRANSLATE_X(com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X) ALPHA_INDEX_KEYGUARD(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD) TaskbarButton(com.android.launcher3.taskbar.TaskbarNavButtonController.TaskbarButton) FloatingRotationButton(com.android.systemui.shared.rotation.FloatingRotationButton) SYSUI_STATE_IME_SWITCHER_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_SHOWING) Gravity(android.view.Gravity) R(com.android.launcher3.R) Configuration(android.content.res.Configuration) SYSUI_STATE_IME_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING) OnClickListener(android.view.View.OnClickListener) ImageView(android.widget.ImageView) View(android.view.View)

Example 4 with BUTTON_A11Y

use of com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y in project android_packages_apps_Launcher3 by ProtonAOSP.

the class NavbarButtonsViewController method initButtons.

private void initButtons(ViewGroup navContainer, ViewGroup endContainer, TaskbarNavButtonController navButtonController) {
    mBackButton = addButton(R.drawable.ic_sysbar_back, BUTTON_BACK, mNavButtonContainer, mControllers.navButtonController, R.id.back);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> {
        // Show only if not disabled, and if not on the keyguard or otherwise only when
        // the bouncer or a lockscreen app is showing above the keyguard
        boolean showingOnKeyguard = (flags & FLAG_KEYGUARD_VISIBLE) == 0 || (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_OCCLUDED) != 0;
        return (flags & FLAG_DISABLE_BACK) == 0 && ((flags & FLAG_KEYGUARD_VISIBLE) == 0 || showingOnKeyguard);
    }));
    boolean isRtl = Utilities.isRtl(mContext.getResources());
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_IME_VISIBLE) != 0, View.ROTATION, isRtl ? 90 : -90, 0));
    // Translate back button to be at end/start of other buttons for keyguard
    int navButtonSize = mContext.getResources().getDimensionPixelSize(R.dimen.taskbar_nav_buttons_size);
    mPropertyHolders.add(new StatePropertyHolder(mBackButton, flags -> (flags & FLAG_ONLY_BACK_FOR_BOUNCER_VISIBLE) != 0 || (flags & FLAG_KEYGUARD_VISIBLE) != 0, VIEW_TRANSLATE_X, navButtonSize * (isRtl ? -2 : 2), 0));
    // home and recents buttons
    View homeButton = addButton(R.drawable.ic_sysbar_home, BUTTON_HOME, navContainer, navButtonController, R.id.home);
    mPropertyHolders.add(new StatePropertyHolder(homeButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_HOME) == 0));
    View recentsButton = addButton(R.drawable.ic_sysbar_recent, BUTTON_RECENTS, navContainer, navButtonController, R.id.recent_apps);
    mPropertyHolders.add(new StatePropertyHolder(recentsButton, flags -> (flags & FLAG_KEYGUARD_VISIBLE) == 0 && (flags & FLAG_DISABLE_RECENTS) == 0));
    // A11y button
    mA11yButton = addButton(R.drawable.ic_sysbar_accessibility_button, BUTTON_A11Y, endContainer, navButtonController, R.id.accessibility_button, R.layout.taskbar_contextual_button);
    mPropertyHolders.add(new StatePropertyHolder(mA11yButton, flags -> (flags & FLAG_A11Y_VISIBLE) != 0 && (flags & FLAG_ROTATION_BUTTON_VISIBLE) == 0));
}
Also used : Rect(android.graphics.Rect) BUTTON_A11Y(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_A11Y) Config(android.content.pm.ActivityInfo.Config) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) IntPredicate(java.util.function.IntPredicate) BUTTON_HOME(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_HOME) Property(android.util.Property) ColorStateList(android.content.res.ColorStateList) BUTTON_BACK(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_BACK) View(android.view.View) ArgbEvaluator(android.animation.ArgbEvaluator) Op(android.graphics.Region.Op) RotationButtonController(com.android.systemui.shared.rotation.RotationButtonController) LayoutRes(android.annotation.LayoutRes) Utilities(com.android.launcher3.Utilities) RotationButton(com.android.systemui.shared.rotation.RotationButton) AnimatedFloat(com.android.quickstep.AnimatedFloat) SYSUI_STATE_SCREEN_PINNING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING) ObjectAnimator(android.animation.ObjectAnimator) Region(android.graphics.Region) ViewGroup(android.view.ViewGroup) MultiValueAlpha(com.android.launcher3.util.MultiValueAlpha) SYSUI_STATE_BACK_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BACK_DISABLED) IdRes(android.annotation.IdRes) SYSUI_STATE_HOME_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED) SYSUI_STATE_OVERVIEW_DISABLED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED) BUTTON_IME_SWITCH(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_IME_SWITCH) OnHoverListener(android.view.View.OnHoverListener) LauncherAnimUtils(com.android.launcher3.LauncherAnimUtils) AlphaUpdateListener(com.android.launcher3.anim.AlphaUpdateListener) BUTTON_RECENTS(com.android.launcher3.taskbar.TaskbarNavButtonController.BUTTON_RECENTS) SYSUI_STATE_A11Y_BUTTON_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE) AnimatedVectorDrawable(android.graphics.drawable.AnimatedVectorDrawable) ArrayList(java.util.ArrayList) SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) MotionEvent(android.view.MotionEvent) DrawableRes(android.annotation.DrawableRes) SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE) SYSUI_STATE_QUICK_SETTINGS_EXPANDED(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED) VIEW_TRANSLATE_X(com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X) ALPHA_INDEX_KEYGUARD(com.android.launcher3.taskbar.TaskbarViewController.ALPHA_INDEX_KEYGUARD) TaskbarButton(com.android.launcher3.taskbar.TaskbarNavButtonController.TaskbarButton) FloatingRotationButton(com.android.systemui.shared.rotation.FloatingRotationButton) SYSUI_STATE_IME_SWITCHER_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_SHOWING) Gravity(android.view.Gravity) R(com.android.launcher3.R) Configuration(android.content.res.Configuration) SYSUI_STATE_IME_SHOWING(com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING) OnClickListener(android.view.View.OnClickListener) ImageView(android.widget.ImageView) View(android.view.View)

Aggregations

ArgbEvaluator (android.animation.ArgbEvaluator)4 ObjectAnimator (android.animation.ObjectAnimator)4 DrawableRes (android.annotation.DrawableRes)4 IdRes (android.annotation.IdRes)4 LayoutRes (android.annotation.LayoutRes)4 Config (android.content.pm.ActivityInfo.Config)4 ColorStateList (android.content.res.ColorStateList)4 Configuration (android.content.res.Configuration)4 Rect (android.graphics.Rect)4 Region (android.graphics.Region)4 Op (android.graphics.Region.Op)4 AnimatedVectorDrawable (android.graphics.drawable.AnimatedVectorDrawable)4 Property (android.util.Property)4 Gravity (android.view.Gravity)4 MotionEvent (android.view.MotionEvent)4 View (android.view.View)4 OnClickListener (android.view.View.OnClickListener)4 OnHoverListener (android.view.View.OnHoverListener)4 ViewGroup (android.view.ViewGroup)4 FrameLayout (android.widget.FrameLayout)4