Loading go/quickstep/res/layout/icon_recents_root_view.xml +4 −2 Original line number Diff line number Diff line Loading @@ -18,14 +18,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> android:orientation="vertical" android:clipChildren="false"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recent_task_recycler_view" android:layout_width="@dimen/recents_list_width" android:layout_height="match_parent" android:layout_gravity="center_horizontal" android:scrollbars="none" android:clipToPadding="false"/> android:clipToPadding="false" android:clipChildren="false"/> <TextView android:id="@+id/recent_task_empty_view" android:layout_width="match_parent" Loading go/quickstep/src/com/android/quickstep/TaskSwipeCallback.java +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import static androidx.recyclerview.widget.ItemTouchHelper.RIGHT; import static com.android.quickstep.TaskAdapter.ITEM_TYPE_CLEAR_ALL; import android.graphics.Canvas; import androidx.annotation.NonNull; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.RecyclerView; Loading Loading @@ -49,6 +51,18 @@ public final class TaskSwipeCallback extends ItemTouchHelper.SimpleCallback { } } @Override public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) { float alpha = 1.0f - dX / (float) viewHolder.itemView.getWidth(); viewHolder.itemView.setAlpha(alpha); } super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive); } @Override public int getSwipeDirs(@NonNull RecyclerView recyclerView, @NonNull ViewHolder viewHolder) { Loading Loading
go/quickstep/res/layout/icon_recents_root_view.xml +4 −2 Original line number Diff line number Diff line Loading @@ -18,14 +18,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> android:orientation="vertical" android:clipChildren="false"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recent_task_recycler_view" android:layout_width="@dimen/recents_list_width" android:layout_height="match_parent" android:layout_gravity="center_horizontal" android:scrollbars="none" android:clipToPadding="false"/> android:clipToPadding="false" android:clipChildren="false"/> <TextView android:id="@+id/recent_task_empty_view" android:layout_width="match_parent" Loading
go/quickstep/src/com/android/quickstep/TaskSwipeCallback.java +14 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import static androidx.recyclerview.widget.ItemTouchHelper.RIGHT; import static com.android.quickstep.TaskAdapter.ITEM_TYPE_CLEAR_ALL; import android.graphics.Canvas; import androidx.annotation.NonNull; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.RecyclerView; Loading Loading @@ -49,6 +51,18 @@ public final class TaskSwipeCallback extends ItemTouchHelper.SimpleCallback { } } @Override public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) { if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) { float alpha = 1.0f - dX / (float) viewHolder.itemView.getWidth(); viewHolder.itemView.setAlpha(alpha); } super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive); } @Override public int getSwipeDirs(@NonNull RecyclerView recyclerView, @NonNull ViewHolder viewHolder) { Loading