summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin <kevhan@google.com>2019-04-29 11:25:16 -0700
committerKevin <kevhan@google.com>2019-04-29 13:12:54 -0700
commiteb815415da35c68ba05cc57c844b46c69be99b02 (patch)
tree927795936e3febce0a10220af81cb597f4f30a97
parent06e0d80d15d98ca075905b71a2e9a8893109cc2f (diff)
downloadandroid_packages_apps_Trebuchet-eb815415da35c68ba05cc57c844b46c69be99b02.tar.gz
android_packages_apps_Trebuchet-eb815415da35c68ba05cc57c844b46c69be99b02.tar.bz2
android_packages_apps_Trebuchet-eb815415da35c68ba05cc57c844b46c69be99b02.zip
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
-rw-r--r--go/quickstep/res/layout/clear_all_button.xml8
-rw-r--r--go/quickstep/res/layout/task_item_view.xml6
-rw-r--r--go/quickstep/res/values/dimens.xml6
-rw-r--r--go/quickstep/src/com/android/quickstep/views/IconRecentsView.java1
4 files changed, 12 insertions, 9 deletions
diff --git a/go/quickstep/res/layout/clear_all_button.xml b/go/quickstep/res/layout/clear_all_button.xml
index be76d5366..85ccb88ca 100644
--- a/go/quickstep/res/layout/clear_all_button.xml
+++ b/go/quickstep/res/layout/clear_all_button.xml
@@ -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"
diff --git a/go/quickstep/res/layout/task_item_view.xml b/go/quickstep/res/layout/task_item_view.xml
index 1483d4cf5..699178d57 100644
--- a/go/quickstep/res/layout/task_item_view.xml
+++ b/go/quickstep/res/layout/task_item_view.xml
@@ -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"/>
diff --git a/go/quickstep/res/values/dimens.xml b/go/quickstep/res/values/dimens.xml
index ee154fcaf..db3cc213a 100644
--- a/go/quickstep/res/values/dimens.xml
+++ b/go/quickstep/res/values/dimens.xml
@@ -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
diff --git a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
index cf6eb6d33..e4795ce02 100644
--- a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
+++ b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
@@ -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;