mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Handle configuration changes in floating rotation button
Update resources in floating rotation button
when configurations such as screen density, screen size,
current locale have changed.
Bug: 200103245
Test: change display size, locale, fold/unfold
-> check that floating rotation button resources
are updated
Change-Id: Ia69f4f8b393a686012e286a1e39822650c562d52
This commit is contained in:
@@ -38,6 +38,7 @@ import android.animation.ObjectAnimator;
|
||||
import android.annotation.DrawableRes;
|
||||
import android.annotation.IdRes;
|
||||
import android.annotation.LayoutRes;
|
||||
import android.content.pm.ActivityInfo.Config;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Region;
|
||||
@@ -451,6 +452,12 @@ public class NavbarButtonsViewController {
|
||||
return mFloatingRotationButtonBounds.contains((int) ev.getX(), (int) ev.getY());
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(@Config int configChanges) {
|
||||
if (mFloatingRotationButton != null) {
|
||||
mFloatingRotationButton.onConfigurationChanged(configChanges);
|
||||
}
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
mPropertyHolders.clear();
|
||||
mControllers.rotationButtonController.unregisterListeners();
|
||||
|
||||
Reference in New Issue
Block a user