Merge "QSCustomizer updates transparent view height"
This commit is contained in:
committed by
Android (Google) Code Review
commit
a60b0e2a38
@@ -17,6 +17,7 @@
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">->
|
||||
<View
|
||||
android:id="@+id/customizer_transparent_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@*android:dimen/quick_qs_offset_height"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
@@ -69,6 +69,7 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
|
||||
private final QSDetailClipper mClipper;
|
||||
private final LightBarController mLightBarController;
|
||||
private final TileQueryHelper mTileQueryHelper;
|
||||
private final View mTransparentView;
|
||||
|
||||
private boolean isShown;
|
||||
private QSTileHost mHost;
|
||||
@@ -108,6 +109,7 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
|
||||
mToolbar.getNavigationIcon().setTint(accentColor);
|
||||
mToolbar.getOverflowIcon().setTint(accentColor);
|
||||
mRecyclerView = findViewById(android.R.id.list);
|
||||
mTransparentView = findViewById(R.id.customizer_transparent_view);
|
||||
mTileAdapter = new TileAdapter(getContext());
|
||||
mTileQueryHelper = new TileQueryHelper(context, mTileAdapter);
|
||||
mRecyclerView.setAdapter(mTileAdapter);
|
||||
@@ -127,6 +129,14 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
|
||||
protected void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
updateNavBackDrop(newConfig);
|
||||
updateResources();
|
||||
}
|
||||
|
||||
private void updateResources() {
|
||||
LayoutParams lp = (LayoutParams) mTransparentView.getLayoutParams();
|
||||
lp.height = mContext.getResources().getDimensionPixelSize(
|
||||
com.android.internal.R.dimen.quick_qs_offset_height);
|
||||
mTransparentView.setLayoutParams(lp);
|
||||
}
|
||||
|
||||
private void updateNavBackDrop(Configuration newConfig) {
|
||||
|
||||
Reference in New Issue
Block a user