diff options
author | Mario Bertschler <bmario@google.com> | 2017-02-17 12:16:13 -0800 |
---|---|---|
committer | Mario Bertschler <bmario@google.com> | 2017-03-03 13:05:57 -0800 |
commit | 0fc6f684e730b0137900fe317f2c759c1b3909c7 (patch) | |
tree | 05b8a9aa9863127e6f9728c13a71968c9e5ab1c6 /res/layout/all_apps_discovery_item.xml | |
parent | 74480b7bca8451eaea64236cb4b4c8e31def6b9b (diff) | |
download | android_packages_apps_Trebuchet-0fc6f684e730b0137900fe317f2c759c1b3909c7.tar.gz android_packages_apps_Trebuchet-0fc6f684e730b0137900fe317f2c759c1b3909c7.tar.bz2 android_packages_apps_Trebuchet-0fc6f684e730b0137900fe317f2c759c1b3909c7.zip |
App discovery integration in All Apps search
This is the basis for app discovery integration while searching in all apps.
This does NOT include binding to the actual service and retrieving results,
but instead provides all the UI to show suggested instant apps and apps
from a store with star rating and pricing.
Change-Id: I1605b52848491acee4ac1d15c0112e6a768363f6
Diffstat (limited to 'res/layout/all_apps_discovery_item.xml')
-rw-r--r-- | res/layout/all_apps_discovery_item.xml | 111 |
1 files changed, 111 insertions, 0 deletions
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 |