Loading packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,7 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha mOtherTilesExpandAnimator.addView(tileView); tileView.setClipChildren(true); tileView.setClipToPadding(true); firstPageBuilder.addFloat(tileView.getSecondaryLabel(), "alpha", 0, 1); } mAllViews.add(tileView); Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/IgnorableChildLinearLayout.kt +15 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.widget.LinearLayout /** * [LinearLayout] that can ignore the last child for measuring. * * The view is measured as regularlt, then if [ignoreLastView] is true: * The view is measured as regularly, then if [ignoreLastView] is true: * * In [LinearLayout.VERTICAL] orientation, the height of the last view is subtracted from the * final measured height. * * In [LinearLayout.HORIZONTAL] orientation, the width of the last view is subtracted from the Loading @@ -41,8 +41,21 @@ class IgnorableChildLinearLayout @JvmOverloads constructor( var ignoreLastView = false /** * Forces [MeasureSpec.UNSPECIFIED] in the direction of layout */ var forceUnspecifiedMeasure = false override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { super.onMeasure(widthMeasureSpec, heightMeasureSpec) val actualWidthSpec = if (forceUnspecifiedMeasure && orientation == HORIZONTAL) { MeasureSpec.makeMeasureSpec(widthMeasureSpec, MeasureSpec.UNSPECIFIED) } else widthMeasureSpec val actualHeightSpec = if (forceUnspecifiedMeasure && orientation == VERTICAL) { MeasureSpec.makeMeasureSpec(heightMeasureSpec, MeasureSpec.UNSPECIFIED) } else heightMeasureSpec super.onMeasure(actualWidthSpec, actualHeightSpec) if (ignoreLastView && childCount > 0) { val lastView = getChildAt(childCount - 1) if (lastView.visibility != GONE) { Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +5 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,11 @@ open class QSTileViewImpl @JvmOverloads constructor( secondaryLabel = labelContainer.requireViewById(R.id.app_label) if (collapsed) { labelContainer.ignoreLastView = true // Ideally, it'd be great if the parent could set this up when measuring just this child // instead of the View class having to support this. However, due to the mysteries of // LinearLayout's double measure pass, we cannot overwrite `measureChild` or any of its // sibling methods to have special behavior for labelContainer. labelContainer.forceUnspecifiedMeasure = true secondaryLabel.alpha = 0f // Do not marque in QQS label.ellipsize = TextUtils.TruncateAt.END Loading Loading
packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java +1 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,7 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha mOtherTilesExpandAnimator.addView(tileView); tileView.setClipChildren(true); tileView.setClipToPadding(true); firstPageBuilder.addFloat(tileView.getSecondaryLabel(), "alpha", 0, 1); } mAllViews.add(tileView); Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/IgnorableChildLinearLayout.kt +15 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.widget.LinearLayout /** * [LinearLayout] that can ignore the last child for measuring. * * The view is measured as regularlt, then if [ignoreLastView] is true: * The view is measured as regularly, then if [ignoreLastView] is true: * * In [LinearLayout.VERTICAL] orientation, the height of the last view is subtracted from the * final measured height. * * In [LinearLayout.HORIZONTAL] orientation, the width of the last view is subtracted from the Loading @@ -41,8 +41,21 @@ class IgnorableChildLinearLayout @JvmOverloads constructor( var ignoreLastView = false /** * Forces [MeasureSpec.UNSPECIFIED] in the direction of layout */ var forceUnspecifiedMeasure = false override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { super.onMeasure(widthMeasureSpec, heightMeasureSpec) val actualWidthSpec = if (forceUnspecifiedMeasure && orientation == HORIZONTAL) { MeasureSpec.makeMeasureSpec(widthMeasureSpec, MeasureSpec.UNSPECIFIED) } else widthMeasureSpec val actualHeightSpec = if (forceUnspecifiedMeasure && orientation == VERTICAL) { MeasureSpec.makeMeasureSpec(heightMeasureSpec, MeasureSpec.UNSPECIFIED) } else heightMeasureSpec super.onMeasure(actualWidthSpec, actualHeightSpec) if (ignoreLastView && childCount > 0) { val lastView = getChildAt(childCount - 1) if (lastView.visibility != GONE) { Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +5 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,11 @@ open class QSTileViewImpl @JvmOverloads constructor( secondaryLabel = labelContainer.requireViewById(R.id.app_label) if (collapsed) { labelContainer.ignoreLastView = true // Ideally, it'd be great if the parent could set this up when measuring just this child // instead of the View class having to support this. However, due to the mysteries of // LinearLayout's double measure pass, we cannot overwrite `measureChild` or any of its // sibling methods to have special behavior for labelContainer. labelContainer.forceUnspecifiedMeasure = true secondaryLabel.alpha = 0f // Do not marque in QQS label.ellipsize = TextUtils.TruncateAt.END Loading