Merge "Turn off filter ui if flag is off" into tm-qpr-dev

This commit is contained in:
Ikram Gabiyev
2023-01-04 19:41:22 +00:00
committed by Android (Google) Code Review
3 changed files with 13 additions and 5 deletions

View File

@@ -28,12 +28,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- Filtering affects only alpha instead of the visibility since visibility can be altered
separately through RecentsView#resetFromSplitSelectionState() -->
<ImageView
android:id="@+id/show_windows"
android:layout_height="@dimen/recents_filter_icon_size"
android:layout_width="@dimen/recents_filter_icon_size"
android:layout_gravity="end"
android:visibility="gone"
android:alpha="0"
android:tint="@color/recents_filter_icon"
android:contentDescription="@string/recents_filter_icon_desc"
android:importantForAccessibility="no"

View File

@@ -38,23 +38,27 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- Filtering affects only alpha instead of the visibility since visibility can be altered
separately through RecentsView#resetFromSplitSelectionState() -->
<ImageView
android:id="@+id/show_windows"
android:layout_height="@dimen/recents_filter_icon_size"
android:layout_width="@dimen/recents_filter_icon_size"
android:layout_gravity="start"
android:visibility="gone"
android:alpha="0"
android:tint="@color/recents_filter_icon"
android:contentDescription="@string/recents_filter_icon_desc"
android:importantForAccessibility="no"
android:src="@drawable/ic_select_windows" />
<!-- Filtering affects only alpha instead of the visibility since visibility can be altered
separately through RecentsView#resetFromSplitSelectionState() -->
<ImageView
android:id="@+id/show_windows_right"
android:layout_height="@dimen/recents_filter_icon_size"
android:layout_width="@dimen/recents_filter_icon_size"
android:layout_gravity="end"
android:visibility="gone"
android:alpha="0"
android:tint="@color/recents_filter_icon"
android:contentDescription="@string/recents_filter_icon_desc"
android:importantForAccessibility="no"

View File

@@ -561,10 +561,12 @@ public class TaskView extends FrameLayout implements Reusable {
*/
protected void updateFilterCallback(@NonNull View filterView,
@Nullable View.OnClickListener callback) {
// Filtering changes alpha instead of the visibility since visibility
// can be altered separately through RecentsView#resetFromSplitSelectionState()
if (callback == null) {
filterView.setVisibility(GONE);
filterView.setAlpha(0);
} else {
filterView.setVisibility(VISIBLE);
filterView.setAlpha(1);
}
filterView.setOnClickListener(callback);