Files
lawnchair/quickstep/src/com/android/launcher3/taskbar/contextual/RotationButton.java
Sunny Goyal 57b2279dcb Taskbar layout update
> Calculating the hotseat padding statically
> Animating taskbar views individually when animating to home
  instead of a layout animation
> Moving all navbar buttons to a separate layout/controller and independent
  of Launcher
> Fixing RTL layout for taskbar and nav bar

Bug: 187353581
Test: Manual
Change-Id: If21696f38beee328f553e467394776a8e8ed4c3e
2021-06-03 16:10:02 -07:00

55 lines
2.0 KiB
Java

/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.launcher3.taskbar.contextual;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.view.View;
/**
* Interface of a rotation button that interacts {@link RotationButtonController}.
* This interface exists because of the two different styles of rotation button in Sysui,
* one in contextual for 3 button nav and a floating rotation button for gestural.
* Keeping the interface for eventual migration of floating button, so some methods are
* pass through to "super" while others are trivially implemented.
*
* Changes:
* * Directly use AnimatedVectorDrawable instead of KeyButtonDrawable
*/
public interface RotationButton {
default void setRotationButtonController(RotationButtonController rotationButtonController) { }
default View getCurrentView() {
return null;
}
default void show() { }
default void hide() { }
default boolean isVisible() {
return false;
}
default void updateIcon(int lightIconColor, int darkIconColor) { }
default void setOnClickListener(View.OnClickListener onClickListener) { }
default void setOnHoverListener(View.OnHoverListener onHoverListener) { }
default AnimatedVectorDrawable getImageDrawable() {
return null;
}
default void setDarkIntensity(float darkIntensity) { }
default boolean acceptRotationProposal() {
return getCurrentView() != null;
}
}