Merge "Add "changes" dot to expanded fgs manager footer" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3dbbf608b5
@@ -54,6 +54,15 @@
|
|||||||
android:textAppearance="@style/TextAppearance.QS.SecurityFooter"
|
android:textAppearance="@style/TextAppearance.QS.SecurityFooter"
|
||||||
android:textColor="?android:attr/textColorSecondary"/>
|
android:textColor="?android:attr/textColorSecondary"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/fgs_new"
|
||||||
|
android:layout_width="12dp"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/fgs_dot"
|
||||||
|
android:contentDescription="@string/fgs_dot_content_description"
|
||||||
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/footer_icon"
|
android:id="@+id/footer_icon"
|
||||||
android:layout_width="@dimen/qs_footer_icon_size"
|
android:layout_width="@dimen/qs_footer_icon_size"
|
||||||
@@ -82,7 +91,7 @@
|
|||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textSize="18sp"/>
|
android:textSize="18sp"/>
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/fgs_new"
|
android:id="@+id/fgs_collapsed_new"
|
||||||
android:layout_width="12dp"
|
android:layout_width="12dp"
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class QSFgsManagerFooter implements View.OnClickListener,
|
|||||||
private final View mNumberContainer;
|
private final View mNumberContainer;
|
||||||
private final TextView mNumberView;
|
private final TextView mNumberView;
|
||||||
private final ImageView mDotView;
|
private final ImageView mDotView;
|
||||||
|
private final ImageView mCollapsedDotView;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private VisibilityChangedDispatcher.OnVisibilityChangedListener mVisibilityChangedListener;
|
private VisibilityChangedDispatcher.OnVisibilityChangedListener mVisibilityChangedListener;
|
||||||
@@ -75,6 +76,7 @@ public class QSFgsManagerFooter implements View.OnClickListener,
|
|||||||
mNumberContainer = mRootView.findViewById(R.id.fgs_number_container);
|
mNumberContainer = mRootView.findViewById(R.id.fgs_number_container);
|
||||||
mNumberView = mRootView.findViewById(R.id.fgs_number);
|
mNumberView = mRootView.findViewById(R.id.fgs_number);
|
||||||
mDotView = mRootView.findViewById(R.id.fgs_new);
|
mDotView = mRootView.findViewById(R.id.fgs_new);
|
||||||
|
mCollapsedDotView = mRootView.findViewById(R.id.fgs_collapsed_new);
|
||||||
mContext = rootView.getContext();
|
mContext = rootView.getContext();
|
||||||
mMainExecutor = mainExecutor;
|
mMainExecutor = mainExecutor;
|
||||||
mExecutor = executor;
|
mExecutor = executor;
|
||||||
@@ -147,8 +149,10 @@ public class QSFgsManagerFooter implements View.OnClickListener,
|
|||||||
if (mFgsManagerController.shouldUpdateFooterVisibility()) {
|
if (mFgsManagerController.shouldUpdateFooterVisibility()) {
|
||||||
mRootView.setVisibility(mNumPackages > 0
|
mRootView.setVisibility(mNumPackages > 0
|
||||||
&& mFgsManagerController.isAvailable() ? View.VISIBLE : View.GONE);
|
&& mFgsManagerController.isAvailable() ? View.VISIBLE : View.GONE);
|
||||||
mDotView.setVisibility(
|
int dotVis =
|
||||||
mFgsManagerController.getChangesSinceDialog() ? View.VISIBLE : View.GONE);
|
mFgsManagerController.getChangesSinceDialog() ? View.VISIBLE : View.GONE;
|
||||||
|
mDotView.setVisibility(dotVis);
|
||||||
|
mCollapsedDotView.setVisibility(dotVis);
|
||||||
if (mVisibilityChangedListener != null) {
|
if (mVisibilityChangedListener != null) {
|
||||||
mVisibilityChangedListener.onVisibilityChanged(mRootView.getVisibility());
|
mVisibilityChangedListener.onVisibilityChanged(mRootView.getVisibility());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user