summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorMario Bertschler <bmario@google.com>2017-03-04 00:05:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-03-04 00:05:40 +0000
commit86515dd1488c058fd332355f19a9d832d673f19f (patch)
treeefd3181a760eacb94f3ec7ceaefac0c6ca4fa7f7 /res
parent61d351fe82f26acd6afd580b71ee9c535ab66c54 (diff)
parent0fc6f684e730b0137900fe317f2c759c1b3909c7 (diff)
downloadandroid_packages_apps_Trebuchet-86515dd1488c058fd332355f19a9d832d673f19f.tar.gz
android_packages_apps_Trebuchet-86515dd1488c058fd332355f19a9d832d673f19f.tar.bz2
android_packages_apps_Trebuchet-86515dd1488c058fd332355f19a9d832d673f19f.zip
Merge "App discovery integration in All Apps search" into ub-launcher3-dorval
Diffstat (limited to 'res')
-rw-r--r--res/drawable/ic_instant_app.xml43
-rw-r--r--res/drawable/ic_star_rating.xml27
-rw-r--r--res/layout/all_apps_discovery_item.xml111
-rw-r--r--res/layout/all_apps_discovery_loading_divider.xml40
4 files changed, 221 insertions, 0 deletions
diff --git a/res/drawable/ic_instant_app.xml b/res/drawable/ic_instant_app.xml
new file mode 100644
index 000000000..be5a3e049
--- /dev/null
+++ b/res/drawable/ic_instant_app.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="@dimen/badge_size"
+ android:height="@dimen/badge_size"
+ android:viewportWidth="18"
+ android:viewportHeight="18">
+
+ <path
+ android:fillColor="@android:color/black"
+ android:fillType="evenOdd"
+ android:strokeWidth="1"
+ android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
+ <path
+ android:fillColor="@android:color/white"
+ android:fillType="evenOdd"
+ android:strokeWidth="1"
+ android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
+ <path
+ android:fillColor="@android:color/white"
+ android:fillType="evenOdd"
+ android:strokeWidth="1"
+ android:pathData="M 9 0 C 13.9705627485 0 18 4.02943725152 18 9 C 18 13.9705627485 13.9705627485 18 9 18 C 4.02943725152 18 0 13.9705627485 0 9 C 0 4.02943725152 4.02943725152 0 9 0 Z" />
+ <path
+ android:fillColor="@android:color/black"
+ android:fillAlpha="0.87"
+ android:fillType="evenOdd"
+ android:strokeWidth="1"
+ android:pathData="M 6 10.4123279 L 8.63934949 10.4123279 L 8.63934949 15.6 L 12.5577168 7.84517705 L 9.94547194 7.84517705 L 9.94547194 2 Z" />
+</vector>
diff --git a/res/drawable/ic_star_rating.xml b/res/drawable/ic_star_rating.xml
new file mode 100644
index 000000000..4e34fa33e
--- /dev/null
+++ b/res/drawable/ic_star_rating.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="12dp"
+ android:height="12dp"
+ android:viewportWidth="12"
+ android:viewportHeight="12">
+
+ <path
+ android:fillColor="#FB8C00"
+ android:fillType="evenOdd"
+ android:strokeWidth="1"
+ android:pathData="M 9.76511755 11.9348136 L 8.33665684 7.16088817 L 12.080006 4.41656311 L 7.49967039 4.41856896 L 6.03138903 0 L 4.57932894 4.41856896 L -1.34115008e-16 4.41656311 L 3.72612122 7.16088817 L 2.29967385 11.9348136 L 6.03138903 8.82574452 Z" />
+</vector> \ No newline at end of file
diff --git a/res/layout/all_apps_discovery_item.xml b/res/layout/all_apps_discovery_item.xml
new file mode 100644
index 000000000..2b21ef570
--- /dev/null
+++ b/res/layout/all_apps_discovery_item.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+<com.android.launcher3.discovery.AppDiscoveryItemView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clickable="true"
+ android:background="?android:selectableItemBackground">
+
+ <ImageView
+ android:id="@+id/image"
+ android:layout_width="56dp"
+ android:layout_height="56dp"
+ android:padding="8dp"
+ android:scaleType="fitCenter"/>
+
+ <ImageView
+ android:id="@+id/badge"
+ android:layout_width="16dp"
+ android:layout_height="16dp"
+ android:scaleType="fitCenter"
+ android:src="@drawable/ic_instant_app"
+ android:layout_marginRight="6dp"
+ android:layout_marginBottom="6dp"
+ android:layout_alignRight="@+id/image"
+ android:layout_alignBottom="@+id/image"
+ android:clickable="false"/>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_centerVertical="true"
+ android:layout_toRightOf="@id/image">
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="?android:textColorSecondary"
+ android:textSize="15sp"/>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <TextView
+ android:id="@+id/rating"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:textColorSecondary"
+ android:textSize="14sp"
+ android:layout_gravity="center_vertical"/>
+
+ <com.android.launcher3.discovery.RatingView
+ android:id="@+id/rating_view"
+ android:layout_width="80dp"
+ android:layout_height="16dp"
+ android:layout_marginLeft="5dp"
+ android:layout_marginRight="5dp"
+ android:layout_gravity="center_vertical"/>
+
+ <TextView
+ android:id="@+id/review_count"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="5dp"
+ android:textColor="?android:textColorHint"
+ android:textSize="14sp"
+ android:layout_gravity="center_vertical"/>
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="1"/>
+
+ <TextView
+ android:id="@+id/price"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:textColorHint"
+ android:textSize="14sp"
+ android:layout_marginRight="12dp"
+ android:textAllCaps="true"/>
+ </LinearLayout>
+ </LinearLayout>
+
+ <ImageView
+ android:importantForAccessibility="no"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
+ android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
+ android:src="@drawable/all_apps_divider"
+ android:scaleType="fitXY"
+ android:focusable="false" />
+</com.android.launcher3.discovery.AppDiscoveryItemView> \ No newline at end of file
diff --git a/res/layout/all_apps_discovery_loading_divider.xml b/res/layout/all_apps_discovery_loading_divider.xml
new file mode 100644
index 000000000..c7b5ad23d
--- /dev/null
+++ b/res/layout/all_apps_discovery_loading_divider.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="20dp"
+ android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
+ android:paddingRight="@dimen/container_fastscroll_thumb_max_width">
+
+ <ProgressBar
+ android:id="@+id/loadingProgressBar"
+ style="@android:style/Widget.Material.ProgressBar.Horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="6dp"
+ android:maxHeight="6dp"
+ android:indeterminate="true"
+ android:layout_gravity="center"/>
+
+ <View
+ android:id="@+id/loadedDivider"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:background="@drawable/all_apps_divider"
+ android:layout_gravity="center"
+ android:visibility="invisible"/>
+
+</FrameLayout> \ No newline at end of file