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: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
|
||||
android:id="@+id/footer_icon"
|
||||
android:layout_width="@dimen/qs_footer_icon_size"
|
||||
@@ -82,7 +91,7 @@
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp"/>
|
||||
<ImageView
|
||||
android:id="@+id/fgs_new"
|
||||
android:id="@+id/fgs_collapsed_new"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:scaleType="fitCenter"
|
||||
|
||||
@@ -61,6 +61,7 @@ public class QSFgsManagerFooter implements View.OnClickListener,
|
||||
private final View mNumberContainer;
|
||||
private final TextView mNumberView;
|
||||
private final ImageView mDotView;
|
||||
private final ImageView mCollapsedDotView;
|
||||
|
||||
@Nullable
|
||||
private VisibilityChangedDispatcher.OnVisibilityChangedListener mVisibilityChangedListener;
|
||||
@@ -75,6 +76,7 @@ public class QSFgsManagerFooter implements View.OnClickListener,
|
||||
mNumberContainer = mRootView.findViewById(R.id.fgs_number_container);
|
||||
mNumberView = mRootView.findViewById(R.id.fgs_number);
|
||||
mDotView = mRootView.findViewById(R.id.fgs_new);
|
||||
mCollapsedDotView = mRootView.findViewById(R.id.fgs_collapsed_new);
|
||||
mContext = rootView.getContext();
|
||||
mMainExecutor = mainExecutor;
|
||||
mExecutor = executor;
|
||||
@@ -147,8 +149,10 @@ public class QSFgsManagerFooter implements View.OnClickListener,
|
||||
if (mFgsManagerController.shouldUpdateFooterVisibility()) {
|
||||
mRootView.setVisibility(mNumPackages > 0
|
||||
&& mFgsManagerController.isAvailable() ? View.VISIBLE : View.GONE);
|
||||
mDotView.setVisibility(
|
||||
mFgsManagerController.getChangesSinceDialog() ? View.VISIBLE : View.GONE);
|
||||
int dotVis =
|
||||
mFgsManagerController.getChangesSinceDialog() ? View.VISIBLE : View.GONE;
|
||||
mDotView.setVisibility(dotVis);
|
||||
mCollapsedDotView.setVisibility(dotVis);
|
||||
if (mVisibilityChangedListener != null) {
|
||||
mVisibilityChangedListener.onVisibilityChanged(mRootView.getVisibility());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user