mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Fix "Pause work apps" button in strange location
The issue why the button sticks up is because of the translation not resetting when closing All apps. - This CL resets ime insets and the position of the button to the original location. bug: 278722407 test: manual - before:https://drive.google.com/file/d/1_L4ICHrt582KcVcpvQDK9HciC_n5eiEy/view?usp=sharing after: https://drive.google.com/file/d/1_G8-Jd_wdUKjy7vFj6iQ1QmCx_7Qrogn/view?usp=sharing Change-Id: Ib32b8ef950d03aa812f30c2393e3cad3201c08da
This commit is contained in:
@@ -166,7 +166,7 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
|
||||
return super.onApplyWindowInsets(insets);
|
||||
}
|
||||
|
||||
private void updateTranslationY() {
|
||||
void updateTranslationY() {
|
||||
setTranslationY(-mImeInsets.bottom);
|
||||
}
|
||||
|
||||
@@ -180,6 +180,10 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
|
||||
rect.set(insets.left, insets.top, insets.right, insets.bottom);
|
||||
}
|
||||
|
||||
public Rect getImeInsets() {
|
||||
return mImeInsets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTranslationStart() {
|
||||
setFlag(FLAG_TRANSLATION_ONGOING);
|
||||
|
||||
Reference in New Issue
Block a user