mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
[Refactor] Extract work profile related logic from AllAppsContainerView to WorkProfileManager
Bug: 195623679 Test: presubmit Change-Id: I9954fb40034d1804aaf19f0778f95477e48ccc8f
This commit is contained in:
@@ -65,7 +65,32 @@ public class KeyboardInsetAnimationCallback extends WindowInsetsAnimation.Callba
|
||||
public WindowInsetsAnimation.Bounds onStart(WindowInsetsAnimation animation,
|
||||
WindowInsetsAnimation.Bounds bounds) {
|
||||
mTerminalTranslation = mView.getTranslationY();
|
||||
mView.setTranslationY(mInitialTranslation);
|
||||
if (mView instanceof KeyboardInsetListener) {
|
||||
((KeyboardInsetListener) mView).onTranslationStart();
|
||||
}
|
||||
return super.onStart(animation, bounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnd(WindowInsetsAnimation animation) {
|
||||
if (mView instanceof KeyboardInsetListener) {
|
||||
((KeyboardInsetListener) mView).onTranslationEnd();
|
||||
}
|
||||
super.onEnd(animation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface Allowing views to listen for keyboard translation events
|
||||
*/
|
||||
public interface KeyboardInsetListener {
|
||||
/**
|
||||
* Called from {@link KeyboardInsetAnimationCallback#onStart}
|
||||
*/
|
||||
void onTranslationStart();
|
||||
|
||||
/**
|
||||
* Called from {@link KeyboardInsetAnimationCallback#onEnd}
|
||||
*/
|
||||
void onTranslationEnd();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user