secondary_launcher.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (C) 2020 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.secondarydisplay.SecondaryDragLayer
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. android:layout_width="match_parent"
  16. android:layout_height="match_parent"
  17. android:id="@+id/drag_layer"
  18. android:padding="@dimen/dynamic_grid_edge_margin">
  19. <GridView
  20. android:layout_width="match_parent"
  21. android:layout_height="match_parent"
  22. android:layout_marginBottom="100dp"
  23. android:theme="@style/HomeScreenElementTheme"
  24. android:layout_gravity="center_horizontal|top"
  25. android:layout_margin="@dimen/dynamic_grid_edge_margin"
  26. android:id="@+id/workspace_grid" />
  27. <ImageButton
  28. android:id="@+id/all_apps_button"
  29. android:layout_width="wrap_content"
  30. android:layout_height="wrap_content"
  31. android:layout_gravity="bottom|end"
  32. android:layout_margin="40dp"
  33. android:padding="16dp"
  34. android:src="@drawable/ic_apps"
  35. android:background="@drawable/bg_all_apps_button"
  36. android:contentDescription="@string/all_apps_button_label"
  37. android:onClick="onAppsButtonClicked" />
  38. <view
  39. class="com.android.launcher3.allapps.SecondaryLauncherAllAppsContainerView"
  40. android:id="@+id/apps_view"
  41. android:layout_width="match_parent"
  42. android:layout_height="match_parent"
  43. android:clipChildren="true"
  44. android:clipToPadding="false"
  45. android:focusable="false"
  46. android:saveEnabled="false"
  47. android:layout_gravity="bottom|end"
  48. android:background="@drawable/round_rect_primary"
  49. android:elevation="2dp"
  50. android:visibility="invisible" >
  51. <include
  52. layout="@layout/all_apps_bottom_sheet_background"
  53. android:visibility="gone" />
  54. <include
  55. layout="@layout/search_results_rv_layout"
  56. android:visibility="gone" />
  57. <include
  58. layout="@layout/all_apps_rv_layout"
  59. android:visibility="gone" />
  60. <com.android.launcher3.allapps.FloatingHeaderView
  61. android:id="@+id/all_apps_header"
  62. android:layout_width="match_parent"
  63. android:layout_height="wrap_content"
  64. android:layout_below="@id/search_container_all_apps"
  65. android:clipToPadding="false"
  66. android:paddingTop="@dimen/all_apps_header_top_padding"
  67. android:orientation="vertical" >
  68. <com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip
  69. android:id="@+id/tabs"
  70. android:layout_width="match_parent"
  71. android:layout_height="@dimen/all_apps_header_pill_height"
  72. android:orientation="horizontal"
  73. style="@style/TextHeadline">
  74. <Button
  75. android:id="@+id/tab_personal"
  76. android:layout_width="0dp"
  77. android:layout_height="match_parent"
  78. android:layout_weight="1"
  79. android:background="?android:attr/selectableItemBackground"
  80. android:text="@string/all_apps_personal_tab"
  81. android:textAllCaps="true"
  82. android:textColor="@color/all_apps_tab_text"
  83. android:textSize="14sp" />
  84. <Button
  85. android:id="@+id/tab_work"
  86. android:layout_width="0dp"
  87. android:layout_height="match_parent"
  88. android:layout_weight="1"
  89. android:background="?android:attr/selectableItemBackground"
  90. android:text="@string/all_apps_work_tab"
  91. android:textAllCaps="true"
  92. android:textColor="@color/all_apps_tab_text"
  93. android:textSize="14sp" />
  94. </com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip>
  95. </com.android.launcher3.allapps.FloatingHeaderView>
  96. <com.android.launcher3.allapps.search.AppsSearchContainerLayout
  97. android:id="@id/search_container_all_apps"
  98. android:layout_width="match_parent"
  99. android:layout_height="@dimen/all_apps_search_bar_field_height"
  100. android:layout_centerHorizontal="true"
  101. android:layout_gravity="top|center_horizontal"
  102. android:background="@drawable/bg_all_apps_searchbox"
  103. android:elevation="1dp"
  104. android:focusableInTouchMode="true"
  105. android:gravity="center"
  106. android:hint="@string/all_apps_search_bar_hint"
  107. android:imeOptions="actionSearch|flagNoExtractUi"
  108. android:inputType="text|textNoSuggestions|textCapWords"
  109. android:maxLines="1"
  110. android:padding="8dp"
  111. android:saveEnabled="false"
  112. android:scrollHorizontally="true"
  113. android:singleLine="true"
  114. android:textColor="?android:attr/textColorSecondary"
  115. android:textColorHint="@drawable/all_apps_search_hint"
  116. android:textSize="16sp" />
  117. <include layout="@layout/all_apps_fast_scroller" />
  118. </view>
  119. </com.android.launcher3.secondarydisplay.SecondaryDragLayer>