mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Work toggle button staying at the top when moving keyboard down
- Same fix from implementation when implementing extendedFAB. ag/19223926 - Essentiall remove isEnabled() check since it is not needed bug: 235873194 test: Manual - before: https://drive.google.com/file/d/1JjDSudWS56fiDyMnP8Btvy0pWFyUIXND/view?usp=sharing after: https://drive.google.com/file/d/1Ja-OVpXKK1yUrixpU_V6WsLV0Ryw152w/view?usp=sharing Change-Id: Ibca405deccfcd61845dd4f5952ad196af1ab3fe2
This commit is contained in:
@@ -170,12 +170,14 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi
|
||||
|
||||
@Override
|
||||
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
|
||||
if (Utilities.ATLEAST_R && isEnabled()) {
|
||||
if (!Utilities.ATLEAST_R) {
|
||||
return insets;
|
||||
}
|
||||
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||
Insets keyboardInsets = insets.getInsets(WindowInsets.Type.ime());
|
||||
setTranslationY(mInsets.bottom - keyboardInsets.bottom);
|
||||
} else {
|
||||
setTranslationY(0);
|
||||
if (insets.isVisible(WindowInsets.Type.ime())) {
|
||||
Insets keyboardInsets = insets.getInsets(WindowInsets.Type.ime());
|
||||
setTranslationY(mInsets.bottom - keyboardInsets.bottom);
|
||||
}
|
||||
}
|
||||
return insets;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user