Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java +0 −2 Original line number Diff line number Diff line Loading @@ -50,6 +50,4 @@ public abstract class QSTileView extends LinearLayout { public abstract void onStateChanged(State state); public abstract int getDetailY(); public void setExpansion(float expansion) {} } packages/SystemUI/res/layout/qs_tile_label.xml +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ android:layout_below="@id/label_group" android:clickable="false" android:ellipsize="marquee" android:maxLines="1" android:singleLine="true" android:padding="0dp" android:visibility="gone" android:gravity="center" Loading packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +15 −2 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { private AnimatorSet mBounceAnimatorSet; private int mAnimatingToPage = -1; private float mLastExpansion; public PagedTileLayout(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -172,8 +173,19 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { @Override public void setExpansion(float expansion) { for (TileRecord tr : mTiles) { tr.tileView.setExpansion(expansion); mLastExpansion = expansion; updateSelected(); } private void updateSelected() { // Start the marquee when fully expanded and stop when fully collapsed. Leave as is for // other expansion ratios since there is no way way to pause the marquee. if (mLastExpansion > 0f && mLastExpansion < 1f) { return; } boolean selected = mLastExpansion == 1f; for (int i = 0; i < mPages.size(); i++) { mPages.get(i).setSelected(i == getCurrentItem() ? selected : false); } } Loading Loading @@ -323,6 +335,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { updateSelected(); if (mPageIndicator == null) return; if (mPageListener != null) { mPageListener.onPageChanged(isLayoutRtl() ? position == mPages.size() - 1 Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileView.java +0 −9 Original line number Diff line number Diff line Loading @@ -106,15 +106,6 @@ public class QSTileView extends QSTileBaseView { } } @Override public void setExpansion(float expansion) { // Start the marquee when fully expanded and stop when fully collapsed. Leave as is for // other expansion ratios since there is no way way to pause the marquee. boolean selected = expansion == 1f ? true : expansion == 0f ? false : mLabel.isSelected(); mLabel.setSelected(selected); mSecondLine.setSelected(selected); } @Override protected void handleStateChanged(QSTile.State state) { super.handleStateChanged(state); Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTileView.java +0 −2 Original line number Diff line number Diff line Loading @@ -50,6 +50,4 @@ public abstract class QSTileView extends LinearLayout { public abstract void onStateChanged(State state); public abstract int getDetailY(); public void setExpansion(float expansion) {} }
packages/SystemUI/res/layout/qs_tile_label.xml +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ android:layout_below="@id/label_group" android:clickable="false" android:ellipsize="marquee" android:maxLines="1" android:singleLine="true" android:padding="0dp" android:visibility="gone" android:gravity="center" Loading
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +15 −2 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { private AnimatorSet mBounceAnimatorSet; private int mAnimatingToPage = -1; private float mLastExpansion; public PagedTileLayout(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -172,8 +173,19 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { @Override public void setExpansion(float expansion) { for (TileRecord tr : mTiles) { tr.tileView.setExpansion(expansion); mLastExpansion = expansion; updateSelected(); } private void updateSelected() { // Start the marquee when fully expanded and stop when fully collapsed. Leave as is for // other expansion ratios since there is no way way to pause the marquee. if (mLastExpansion > 0f && mLastExpansion < 1f) { return; } boolean selected = mLastExpansion == 1f; for (int i = 0; i < mPages.size(); i++) { mPages.get(i).setSelected(i == getCurrentItem() ? selected : false); } } Loading Loading @@ -323,6 +335,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { updateSelected(); if (mPageIndicator == null) return; if (mPageListener != null) { mPageListener.onPageChanged(isLayoutRtl() ? position == mPages.size() - 1 Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileView.java +0 −9 Original line number Diff line number Diff line Loading @@ -106,15 +106,6 @@ public class QSTileView extends QSTileBaseView { } } @Override public void setExpansion(float expansion) { // Start the marquee when fully expanded and stop when fully collapsed. Leave as is for // other expansion ratios since there is no way way to pause the marquee. boolean selected = expansion == 1f ? true : expansion == 0f ? false : mLabel.isSelected(); mLabel.setSelected(selected); mSecondLine.setSelected(selected); } @Override protected void handleStateChanged(QSTile.State state) { super.handleStateChanged(state); Loading