summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-03-10 16:28:47 -0700
committerWinson Chung <winsonc@google.com>2015-03-12 18:57:02 -0700
commit93f98eaf1800024cb2f28379bdd997f3debae63a (patch)
tree5b9efef68c1b651ec13b69ede29bb20bd67cb64f /res
parent74081b02730bb7205f5cfe43f206039df38a20db (diff)
downloadandroid_packages_apps_Trebuchet-93f98eaf1800024cb2f28379bdd997f3debae63a.tar.gz
android_packages_apps_Trebuchet-93f98eaf1800024cb2f28379bdd997f3debae63a.tar.bz2
android_packages_apps_Trebuchet-93f98eaf1800024cb2f28379bdd997f3debae63a.zip
Adding app grid layout with fastscroller.
- Adding filtering and using alphabetic index for app grouping. Change-Id: I745b644fa8f90f5ff24a8642ac377ef1c65d8aff
Diffstat (limited to 'res')
-rw-r--r--res/drawable/apps_list_fastscroll_bg.xml24
-rw-r--r--res/drawable/apps_list_scrollbar_thumb.xml21
-rw-r--r--res/drawable/apps_list_search_bg.xml23
-rw-r--r--res/layout-sw600dp/apps_view.xml8
-rw-r--r--res/layout/apps_grid_row_icon_view.xml13
-rw-r--r--res/layout/apps_grid_row_view.xml38
-rw-r--r--res/layout/apps_list_reveal_view.xml2
-rw-r--r--res/layout/apps_list_row_icon_view.xml5
-rw-r--r--res/layout/apps_list_row_view.xml7
-rw-r--r--res/layout/apps_list_view.xml41
-rw-r--r--res/layout/apps_view.xml2
-rw-r--r--res/values-sw600dp/dimens.xml1
-rw-r--r--res/values/attrs.xml1
-rw-r--r--res/values/colors.xml4
-rw-r--r--res/values/dimens.xml6
-rw-r--r--res/values/strings.xml4
16 files changed, 138 insertions, 62 deletions
diff --git a/res/drawable/apps_list_fastscroll_bg.xml b/res/drawable/apps_list_fastscroll_bg.xml
new file mode 100644
index 000000000..4ec18488b
--- /dev/null
+++ b/res/drawable/apps_list_fastscroll_bg.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <solid android:color="@color/apps_view_scrollbar_thumb_color" />
+ <size
+ android:width="48dp"
+ android:height="48dp" />
+ <corners android:radius="4dp" />
+</shape> \ No newline at end of file
diff --git a/res/drawable/apps_list_scrollbar_thumb.xml b/res/drawable/apps_list_scrollbar_thumb.xml
new file mode 100644
index 000000000..ddd65b231
--- /dev/null
+++ b/res/drawable/apps_list_scrollbar_thumb.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <solid android:color="@color/apps_view_scrollbar_thumb_color" />
+ <size android:width="4dp"/>
+</shape> \ No newline at end of file
diff --git a/res/drawable/apps_list_search_bg.xml b/res/drawable/apps_list_search_bg.xml
new file mode 100644
index 000000000..eda33a918
--- /dev/null
+++ b/res/drawable/apps_list_search_bg.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <solid android:color="#ffffff" />
+ <corners
+ android:topLeftRadius="3dp"
+ android:topRightRadius="3dp" />
+</shape> \ No newline at end of file
diff --git a/res/layout-sw600dp/apps_view.xml b/res/layout-sw600dp/apps_view.xml
index 1f773b307..3bb6ec505 100644
--- a/res/layout-sw600dp/apps_view.xml
+++ b/res/layout-sw600dp/apps_view.xml
@@ -23,12 +23,12 @@
android:descendantFocusability="afterDescendants">
<include
layout="@layout/apps_list_reveal_view"
- android:layout_width="420dp"
- android:layout_height="match_parent"
+ android:layout_width="@dimen/apps_container_width"
+ android:layout_height="540dp"
android:layout_gravity="center" />
<include
layout="@layout/apps_list_view"
- android:layout_width="420dp"
- android:layout_height="match_parent"
+ android:layout_width="@dimen/apps_container_width"
+ android:layout_height="540dp"
android:layout_gravity="center" />
</com.android.launcher3.AppsContainerView> \ No newline at end of file
diff --git a/res/layout/apps_grid_row_icon_view.xml b/res/layout/apps_grid_row_icon_view.xml
index 11c8eeb4d..81e74b985 100644
--- a/res/layout/apps_grid_row_icon_view.xml
+++ b/res/layout/apps_grid_row_icon_view.xml
@@ -13,10 +13,17 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<com.android.launcher3.BubbleTextView
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto"
style="@style/WorkspaceIcon.AppsCustomize"
- android:id="@+id/application_icon"
+ android:id="@+id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left|center_vertical"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
android:focusable="true"
- android:background="@drawable/focusable_view_bg" />
+ android:background="@drawable/focusable_view_bg"
+ launcher:deferShadowGeneration="true" />
+
diff --git a/res/layout/apps_grid_row_view.xml b/res/layout/apps_grid_row_view.xml
deleted file mode 100644
index bce43bc1b..000000000
--- a/res/layout/apps_grid_row_view.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="@dimen/apps_view_row_height"
- android:paddingTop="12dp"
- android:paddingBottom="12dp"
- android:orientation="horizontal"
- android:focusable="true"
- android:background="@drawable/focusable_view_bg"
- android:descendantFocusability="afterDescendants">
- <TextView
- android:id="@+id/section"
- android:layout_width="48dp"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:paddingRight="8dp"
- android:paddingBottom="12dp"
- android:gravity="right"
- android:textColor="#1ca195"
- android:textSize="16sp"
- android:textAllCaps="true"
- android:focusable="false" />
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/apps_list_reveal_view.xml b/res/layout/apps_list_reveal_view.xml
index 4a26787c8..19e462bee 100644
--- a/res/layout/apps_list_reveal_view.xml
+++ b/res/layout/apps_list_reveal_view.xml
@@ -15,7 +15,7 @@
-->
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/all_apps_transition_overlay"
+ android:id="@+id/apps_view_transition_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
diff --git a/res/layout/apps_list_row_icon_view.xml b/res/layout/apps_list_row_icon_view.xml
index 607af9b0b..867dbdc99 100644
--- a/res/layout/apps_list_row_icon_view.xml
+++ b/res/layout/apps_list_row_icon_view.xml
@@ -20,9 +20,10 @@
style="@style/WorkspaceIcon.AppsCustomize"
android:id="@+id/application_icon"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:focusable="true"
android:background="@drawable/focusable_view_bg"
launcher:iconPaddingOverride="24dp"
launcher:textSizeOverride="16dp"
- launcher:layoutHorizontal="true" />
+ launcher:layoutHorizontal="true"
+ launcher:deferShadowGeneration="true" />
diff --git a/res/layout/apps_list_row_view.xml b/res/layout/apps_list_row_view.xml
index c4dcd0018..83c175bb8 100644
--- a/res/layout/apps_list_row_view.xml
+++ b/res/layout/apps_list_row_view.xml
@@ -26,9 +26,8 @@
android:layout_width="64dp"
android:layout_height="match_parent"
android:paddingLeft="16dp"
- android:gravity="left|center_vertical"
- android:textColor="#009688"
- android:textSize="24sp"
- android:textAllCaps="true"
+ android:gravity="start|center_vertical"
+ android:textColor="@color/apps_view_section_text_color"
+ android:textSize="@dimen/apps_view_section_text_size"
android:focusable="false" />
</LinearLayout> \ No newline at end of file
diff --git a/res/layout/apps_list_view.xml b/res/layout/apps_list_view.xml
index b1b0f310b..dfb2fc42f 100644
--- a/res/layout/apps_list_view.xml
+++ b/res/layout/apps_list_view.xml
@@ -13,18 +13,41 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ListView
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/apps_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_gravity="center"
- android:paddingTop="12dp"
- android:paddingBottom="12dp"
- android:clipToPadding="false"
- android:scrollbars="vertical"
+ android:orientation="vertical"
android:elevation="15dp"
android:background="@drawable/apps_list_bg"
- android:visibility="gone"
- android:focusable="true"
- android:descendantFocusability="afterDescendants" /> \ No newline at end of file
+ android:visibility="gone">
+ <EditText
+ android:id="@+id/app_search_box"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:hint="@string/apps_view_search_bar_hint"
+ android:maxLines="1"
+ android:singleLine="true"
+ android:scrollHorizontally="true"
+ android:gravity="fill_horizontal"
+ android:textSize="16sp"
+ android:textColor="#4c4c4c"
+ android:textColorHint="#9c9c9c"
+ android:imeOptions="flagNoExtractUi"
+ android:background="@drawable/apps_list_search_bg"
+ android:elevation="4dp" />
+ <com.android.launcher3.AppsContainerRecyclerView
+ android:id="@+id/apps_list_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:paddingTop="12dp"
+ android:paddingBottom="12dp"
+ android:clipToPadding="false"
+ android:scrollbars="vertical"
+ android:scrollbarThumbVertical="@drawable/apps_list_scrollbar_thumb"
+ android:focusable="true"
+ android:descendantFocusability="afterDescendants" />
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/apps_view.xml b/res/layout/apps_view.xml
index 19ad3d2c9..c1bae63f6 100644
--- a/res/layout/apps_view.xml
+++ b/res/layout/apps_view.xml
@@ -19,7 +19,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="8dp"
- android:background="#22000000"
+ android:background="@drawable/apps_customize_bg"
android:descendantFocusability="afterDescendants">
<include
layout="@layout/apps_list_reveal_view" />
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index f7ad0c4cd..d9075872a 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -18,6 +18,7 @@
<dimen name="app_icon_size">64dp</dimen>
<!-- Apps view -->
+ <dimen name="apps_container_width">480dp</dimen>
<dimen name="apps_view_row_height">76dp</dimen>
<!-- AppsCustomize -->
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 4e7c59280..845b18230 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -24,6 +24,7 @@
<attr name="iconSizeOverride" format="dimension" />
<attr name="iconPaddingOverride" format="dimension" />
<attr name="textSizeOverride" format="dimension" />
+ <attr name="deferShadowGeneration" format="boolean" />
</declare-styleable>
<!-- Page Indicator specific attributes. -->
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 2daf9fe12..590a8872b 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -36,4 +36,8 @@
<color name="outline_color">#FFFFFFFF</color>
<color name="widget_text_panel">#FF374248</color>
+<!-- Apps view -->
+ <color name="apps_view_scrollbar_thumb_color">#009688</color>
+ <color name="apps_view_section_text_color">#009688</color>
+
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 013bd925b..9b4c56094 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -47,7 +47,13 @@
<dimen name="toolbar_button_horizontal_padding">12dip</dimen>
<!-- Apps view -->
+ <dimen name="apps_container_width">0dp</dimen>
+ <dimen name="apps_grid_view_start_margin">52dp</dimen>
<dimen name="apps_view_row_height">64dp</dimen>
+ <dimen name="apps_view_section_text_size">24sp</dimen>
+ <dimen name="apps_view_fast_scroll_gutter_size">48dp</dimen>
+ <dimen name="apps_view_fast_scroll_popup_size">64dp</dimen>
+ <dimen name="apps_view_fast_scroll_text_size">48dp</dimen>
<!-- AllApps/Customize/AppsCustomize -->
<!-- The height of the tab bar - if this changes, we should update the
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 74b88148c..0d113dbf7 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -71,6 +71,10 @@
drop if there are multiple choices. [CHAR_LIMIT=35] -->
<string name="external_drop_widget_pick_title">Choose widget to create</string>
+ <!-- Apps view -->
+ <!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
+ <string name="apps_view_search_bar_hint">Search Apps</string>
+
<!-- Folders -->
<skip />
<!-- Label of Folder name field in Rename folder dialog box -->