overview_actions_container.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright (C) 2021 The Android Open Source Project
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!-- NOTE! don't add dimensions for margins / gravity to root view in this file, they need to be
  15. loaded at runtime. -->
  16. <com.android.quickstep.views.GoOverviewActionsView
  17. xmlns:android="http://schemas.android.com/apk/res/android"
  18. android:layout_width="match_parent"
  19. android:layout_height="wrap_content">
  20. <LinearLayout
  21. android:id="@+id/action_buttons"
  22. android:layout_width="match_parent"
  23. android:layout_height="@dimen/overview_actions_height"
  24. android:layout_gravity="top|center_horizontal"
  25. android:orientation="horizontal">
  26. <Space
  27. android:layout_width="0dp"
  28. android:layout_height="1dp"
  29. android:layout_weight="1" />
  30. <LinearLayout
  31. android:id="@+id/layout_translate"
  32. style="@style/GoOverviewActionButtonContainer">
  33. <ImageButton
  34. android:id="@+id/action_translate"
  35. style="@style/GoOverviewActionButton"
  36. android:src="@drawable/ic_translate"
  37. android:contentDescription="@string/action_translate" />
  38. <TextView
  39. style="@style/GoOverviewActionButtonCaption"
  40. android:text="@string/action_translate" />
  41. </LinearLayout>
  42. <Space
  43. android:id="@+id/spacer_translate"
  44. android:layout_width="@dimen/go_overview_button_container_margin"
  45. android:layout_height="1dp" />
  46. <LinearLayout
  47. android:id="@+id/layout_listen"
  48. style="@style/GoOverviewActionButtonContainer">
  49. <ImageButton
  50. android:id="@+id/action_listen"
  51. style="@style/GoOverviewActionButton"
  52. android:src="@drawable/ic_listen"
  53. android:contentDescription="@string/action_listen"
  54. android:background="@drawable/round_rect_button" />
  55. <TextView
  56. style="@style/GoOverviewActionButtonCaption"
  57. android:text="@string/action_listen" />
  58. </LinearLayout>
  59. <Space
  60. android:id="@+id/spacer_listen"
  61. android:layout_width="@dimen/go_overview_button_container_margin"
  62. android:layout_height="1dp" />
  63. <LinearLayout
  64. android:id="@+id/layout_screenshot"
  65. style="@style/GoOverviewActionButtonContainer">
  66. <ImageButton
  67. android:id="@+id/action_screenshot"
  68. style="@style/GoOverviewActionButton"
  69. android:src="@drawable/ic_screenshot"
  70. android:contentDescription="@string/action_screenshot"
  71. android:background="@drawable/round_rect_button" />
  72. <TextView
  73. style="@style/GoOverviewActionButtonCaption"
  74. android:text="@string/action_screenshot" />
  75. </LinearLayout>
  76. <Space
  77. android:layout_width="0dp"
  78. android:layout_height="1dp"
  79. android:layout_weight="1" />
  80. <!-- Will be enabled in a future version. -->
  81. <LinearLayout
  82. style="@style/GoOverviewActionButtonContainer"
  83. android:visibility="gone" >
  84. <ImageButton
  85. android:id="@+id/action_search"
  86. style="@style/GoOverviewActionButton"
  87. android:src="@drawable/ic_search"
  88. android:contentDescription="@string/action_search"
  89. android:background="@drawable/round_rect_button" />
  90. <TextView
  91. style="@style/GoOverviewActionButtonCaption"
  92. android:text="@string/action_search" />
  93. </LinearLayout>
  94. <!-- Unused. Included only for compatibility with parent class. -->
  95. <Button
  96. android:id="@+id/action_share"
  97. style="@style/GoOverviewActionButton"
  98. android:layout_width="wrap_content"
  99. android:layout_height="wrap_content"
  100. android:drawableStart="@drawable/ic_share"
  101. android:text="@string/action_share"
  102. android:theme="@style/ThemeControlHighlightWorkspaceColor"
  103. android:visibility="gone" />
  104. </LinearLayout>
  105. </com.android.quickstep.views.GoOverviewActionsView>