Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb815415 authored by Kevin's avatar Kevin
Browse files

Layout aligned to dp grid for portrait (1/3)

This CL sets fixed dp values for the recents item views based off the UX
spec.  Vertical margins will be handled by an item decorator in the next
CL to handle special cases.

Bug: 131610834
Test: Builds
Change-Id: Ieb7936bd24933552844a6bd1bdb9e3101b8cdca4
parent 06e0d80d
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -18,14 +18,12 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/clear_all_item_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    android:layout_height="@dimen/clear_all_item_view_height">
    <Button
        android:id="@+id/clear_all_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginVertical="16dp"
        android:layout_width="@dimen/clear_all_button_width"
        android:layout_height="match_parent"
        android:layout_gravity="center_horizontal"
        android:paddingHorizontal="32dp"
        android:background="@drawable/clear_all_button"
        android:gravity="center"
        android:text="@string/recents_clear_all"
+2 −4
Original line number Diff line number Diff line
@@ -17,14 +17,13 @@
<com.android.quickstep.views.TaskItemView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_height="@dimen/task_item_height"
    android:orientation="horizontal">
    <com.android.quickstep.views.TaskThumbnailIconView
        android:id="@+id/task_icon_and_thumbnail"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginHorizontal="8dp"
        android:layout_marginTop="16dp">
        android:layout_marginHorizontal="@dimen/task_thumbnail_icon_horiz_margin">
        <ImageView
            android:id="@+id/task_thumbnail"
            android:layout_width="match_parent"
@@ -39,7 +38,6 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_marginHorizontal="8dp"
        android:singleLine="true"
        android:textColor="@android:color/white"
        android:textSize="24sp"/>
+6 −0
Original line number Diff line number Diff line
@@ -15,5 +15,11 @@
     limitations under the License.
-->
<resources>
    <dimen name="task_item_height">60dp</dimen>
    <dimen name="task_thumbnail_icon_horiz_margin">16dp</dimen>

    <dimen name="task_thumbnail_corner_radius">3dp</dimen>

    <dimen name="clear_all_item_view_height">36dp</dimen>
    <dimen name="clear_all_button_width">106dp</dimen>
</resources>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ public final class IconRecentsView extends FrameLayout {
            mTaskRecyclerView.setItemAnimator(mDefaultItemAnimator);
            mLoadingContentItemAnimator.setOnAnimationFinishedRunnable(
                    () -> mTaskRecyclerView.setItemAnimator(new DefaultItemAnimator()));
            // TODO: Add item decorator for vertical item margins

            mEmptyView = findViewById(R.id.recent_task_empty_view);
            mContentView = mTaskRecyclerView;