diff options
3 files changed, 13 insertions, 8 deletions
diff --git a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml index 11a01871b782..708326971454 100644 --- a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml +++ b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml @@ -20,10 +20,13 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" - android:clipChildren="false" - android:clipToPadding="false" + android:clipChildren="true" + android:clipToPadding="true" + android:paddingStart="@dimen/notification_side_paddings" + android:paddingEnd="@dimen/notification_side_paddings" android:paddingBottom="@dimen/qs_paged_tile_layout_padding_bottom"> + <FrameLayout android:id="@+id/page_decor" android:layout_width="wrap_content" diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java index fcd479ce6627..4b5ab2a640ff 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java @@ -6,9 +6,7 @@ import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.PropertyValuesHolder; import android.content.Context; - -import androidx.viewpager.widget.PagerAdapter; -import androidx.viewpager.widget.ViewPager; +import android.content.res.Resources; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; @@ -18,6 +16,9 @@ import android.view.animation.Interpolator; import android.view.animation.OvershootInterpolator; import android.widget.Scroller; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; + import com.android.systemui.R; import com.android.systemui.qs.QSPanel.QSTileLayout; import com.android.systemui.qs.QSPanel.TileRecord; @@ -224,7 +225,9 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { public boolean updateResources() { // Update bottom padding, useful for removing extra space once the panel page indicator is // hidden. - setPadding(0, 0, 0, + Resources res = getContext().getResources(); + final int sidePadding = res.getDimensionPixelSize(R.dimen.notification_side_paddings); + setPadding(sidePadding, 0, sidePadding, getContext().getResources().getDimensionPixelSize( R.dimen.qs_paged_tile_layout_padding_bottom)); boolean changed = false; diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java index 01ff72e6d152..e884302af075 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java +++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java @@ -103,8 +103,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout { // it will show all its tiles. In this case, the tiles have to be entered before the // container is measured. Any change in the tiles, should trigger a remeasure. final int numTiles = mRecords.size(); - final int width = MeasureSpec.getSize(widthMeasureSpec) - - getPaddingStart() - getPaddingEnd(); + final int width = MeasureSpec.getSize(widthMeasureSpec); final int heightMode = MeasureSpec.getMode(heightMeasureSpec); if (heightMode == MeasureSpec.UNSPECIFIED) { mRows = (numTiles + mColumns - 1) / mColumns; |