DO NOT MERGE resolve merge conflicts of c6a1cfda93aac7fc004da73e3e5921b838e931a7 to pi-dev-plus-aosp
Change-Id: I1a18690e85f66ff2a25329f9a050cb038fc0bcfb
Bug: None
Test: I solemnly swear I tested this conflict resolution.
diff --git a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
index e96a09b..d181844 100644
--- a/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
+++ b/packages/SystemUI/res/layout/qs_paged_tile_layout.xml
@@ -19,7 +19,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:clipChildren="false"
+ android:clipChildren="true"
android:clipToPadding="false"
android:paddingBottom="@dimen/qs_paged_tile_layout_padding_bottom">
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
index 100751c..fdddefe 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
@@ -10,6 +10,7 @@
import android.content.res.Resources;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
+import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
@@ -57,6 +58,7 @@
private AnimatorSet mBounceAnimatorSet;
private int mAnimatingToPage = -1;
private float mLastExpansion;
+ private int mHorizontalClipBounds;
public PagedTileLayout(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -243,6 +245,8 @@
public boolean updateResources() {
// Update bottom padding, useful for removing extra space once the panel page indicator is
// hidden.
+ mHorizontalClipBounds = getContext().getResources().getDimensionPixelSize(
+ R.dimen.notification_side_paddings);
setPadding(0, 0, 0,
getContext().getResources().getDimensionPixelSize(
R.dimen.qs_paged_tile_layout_padding_bottom));
@@ -273,6 +277,15 @@
setMeasuredDimension(getMeasuredWidth(), maxHeight + getPaddingBottom());
}
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ super.onLayout(changed, l, t, r, b);
+ Rect clipBounds = new Rect(mHorizontalClipBounds, 0,
+ r - l - mHorizontalClipBounds, b - t);
+ setClipBounds(clipBounds);
+ }
+
+
private final Runnable mDistribute = new Runnable() {
@Override
public void run() {