widgets_full_sheet_paged_view.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (C) 2021 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. <merge xmlns:android="http://schemas.android.com/apk/res/android"
  14. xmlns:launcher="http://schemas.android.com/apk/res-auto">
  15. <com.android.launcher3.workprofile.PersonalWorkPagedView
  16. android:id="@+id/widgets_view_pager"
  17. android:layout_width="match_parent"
  18. android:layout_height="match_parent"
  19. android:clipToPadding="false"
  20. android:layout_below="@id/collapse_handle"
  21. android:descendantFocusability="afterDescendants"
  22. launcher:pageIndicator="@+id/tabs">
  23. <com.android.launcher3.widget.picker.WidgetsRecyclerView
  24. android:id="@+id/primary_widgets_list_view"
  25. android:layout_width="match_parent"
  26. android:layout_height="match_parent"
  27. android:paddingHorizontal="@dimen/widget_list_horizontal_margin"
  28. android:clipToPadding="false" />
  29. <com.android.launcher3.widget.picker.WidgetsRecyclerView
  30. android:id="@+id/work_widgets_list_view"
  31. android:layout_width="match_parent"
  32. android:layout_height="match_parent"
  33. android:paddingHorizontal="@dimen/widget_list_horizontal_margin"
  34. android:clipToPadding="false" />
  35. </com.android.launcher3.workprofile.PersonalWorkPagedView>
  36. <!-- SearchAndRecommendationsView contains the tab layout as well -->
  37. <com.android.launcher3.widget.picker.SearchAndRecommendationsView
  38. android:id="@+id/search_and_recommendations_container"
  39. android:layout_width="match_parent"
  40. android:layout_height="wrap_content"
  41. android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin"
  42. android:layout_below="@id/collapse_handle"
  43. android:paddingBottom="0dp"
  44. android:orientation="vertical">
  45. <TextView
  46. android:id="@+id/title"
  47. android:layout_width="match_parent"
  48. android:layout_height="wrap_content"
  49. android:gravity="center_horizontal"
  50. android:textSize="24sp"
  51. android:layout_marginTop="24dp"
  52. android:textColor="?android:attr/textColorSecondary"
  53. android:text="@string/widget_button_text"/>
  54. <FrameLayout
  55. android:id="@+id/search_bar_container"
  56. android:layout_width="match_parent"
  57. android:layout_height="wrap_content"
  58. android:elevation="0.1dp"
  59. android:background="?android:attr/colorBackground"
  60. android:paddingBottom="8dp"
  61. android:clipToPadding="false">
  62. <include layout="@layout/widgets_search_bar" />
  63. </FrameLayout>
  64. <com.android.launcher3.widget.picker.WidgetsRecommendationTableLayout
  65. android:id="@+id/recommended_widget_table"
  66. android:layout_width="match_parent"
  67. android:layout_height="wrap_content"
  68. android:layout_marginTop="8dp"
  69. android:background="@drawable/widgets_recommendation_background"
  70. android:paddingVertical="@dimen/recommended_widgets_table_vertical_padding"
  71. android:visibility="gone" />
  72. <com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip
  73. android:id="@+id/tabs"
  74. android:layout_width="match_parent"
  75. android:layout_height="64dp"
  76. android:gravity="center_horizontal"
  77. android:orientation="horizontal"
  78. android:paddingVertical="8dp"
  79. android:paddingLeft="@dimen/widget_tabs_horizontal_padding"
  80. android:paddingRight="@dimen/widget_tabs_horizontal_padding"
  81. android:background="?android:attr/colorBackground"
  82. style="@style/TextHeadline">
  83. <Button
  84. android:id="@+id/tab_personal"
  85. android:layout_width="0dp"
  86. android:layout_height="match_parent"
  87. android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
  88. android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
  89. android:layout_weight="1"
  90. android:background="@drawable/all_apps_tabs_background"
  91. android:text="@string/widgets_full_sheet_personal_tab"
  92. android:textColor="@color/all_apps_tab_text"
  93. android:textSize="14sp"
  94. style="?android:attr/borderlessButtonStyle" />
  95. <Button
  96. android:id="@+id/tab_work"
  97. android:layout_width="0dp"
  98. android:layout_height="match_parent"
  99. android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding"
  100. android:layout_marginVertical="@dimen/widget_apps_tabs_vertical_padding"
  101. android:layout_weight="1"
  102. android:background="@drawable/all_apps_tabs_background"
  103. android:text="@string/widgets_full_sheet_work_tab"
  104. android:textColor="@color/all_apps_tab_text"
  105. android:textSize="14sp"
  106. style="?android:attr/borderlessButtonStyle" />
  107. </com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip>
  108. </com.android.launcher3.widget.picker.SearchAndRecommendationsView>
  109. </merge>