all_apps_discovery_item.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (C) 2017 The Android Open Source Project
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. -->
  13. <com.android.launcher3.discovery.AppDiscoveryItemView
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. android:layout_width="match_parent"
  16. android:layout_height="wrap_content"
  17. android:clickable="true"
  18. android:background="?android:selectableItemBackground">
  19. <ImageView
  20. android:id="@+id/image"
  21. android:layout_width="56dp"
  22. android:layout_height="56dp"
  23. android:padding="8dp"
  24. android:scaleType="fitCenter"
  25. android:focusable="false"
  26. android:importantForAccessibility="no"/>
  27. <LinearLayout
  28. android:layout_width="match_parent"
  29. android:layout_height="wrap_content"
  30. android:orientation="vertical"
  31. android:layout_centerVertical="true"
  32. android:layout_toRightOf="@id/image">
  33. <TextView
  34. android:id="@+id/title"
  35. android:layout_width="match_parent"
  36. android:layout_height="wrap_content"
  37. android:textColor="?android:textColorSecondary"
  38. android:textSize="15sp"/>
  39. <LinearLayout
  40. android:layout_width="match_parent"
  41. android:layout_height="wrap_content"
  42. android:orientation="horizontal">
  43. <TextView
  44. android:id="@+id/rating"
  45. android:layout_width="wrap_content"
  46. android:layout_height="wrap_content"
  47. android:textColor="?android:textColorSecondary"
  48. android:textSize="14sp"
  49. android:layout_gravity="center_vertical"
  50. android:includeFontPadding="false"/>
  51. <com.android.launcher3.discovery.RatingView
  52. android:id="@+id/rating_view"
  53. android:layout_width="70dp"
  54. android:layout_height="16dp"
  55. android:layout_marginLeft="5dp"
  56. android:layout_marginRight="5dp"
  57. android:layout_gravity="center_vertical"/>
  58. <TextView
  59. android:id="@+id/review_count"
  60. android:layout_width="wrap_content"
  61. android:layout_height="wrap_content"
  62. android:layout_marginLeft="5dp"
  63. android:textColor="?android:textColorHint"
  64. android:textSize="14sp"
  65. android:layout_gravity="center_vertical"/>
  66. <Space
  67. android:layout_width="0dp"
  68. android:layout_height="0dp"
  69. android:layout_weight="1"/>
  70. <TextView
  71. android:id="@+id/price"
  72. android:layout_width="wrap_content"
  73. android:layout_height="wrap_content"
  74. android:textColor="?android:textColorHint"
  75. android:textSize="14sp"
  76. android:layout_marginRight="12dp"
  77. android:textAllCaps="true"/>
  78. </LinearLayout>
  79. </LinearLayout>
  80. <ImageView
  81. android:importantForAccessibility="no"
  82. android:layout_width="match_parent"
  83. android:layout_height="wrap_content"
  84. android:layout_alignParentBottom="true"
  85. android:paddingLeft="@dimen/container_fastscroll_thumb_max_width"
  86. android:paddingRight="@dimen/container_fastscroll_thumb_max_width"
  87. android:src="@drawable/all_apps_divider"
  88. android:scaleType="fitXY"
  89. android:focusable="false" />
  90. </com.android.launcher3.discovery.AppDiscoveryItemView>