Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a60b0e2a authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Android (Google) Code Review
Browse files

Merge "QSCustomizer updates transparent view height"

parents 82b66a4f 5d5deeb2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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" />
+10 −0
Original line number Diff line number Diff line
@@ -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) {