apps_customize_widget.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (C) 2011 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.PagedViewWidget
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. xmlns:launcher="http://schemas.android.com/apk/res-auto"
  16. android:layout_width="match_parent"
  17. android:layout_height="match_parent"
  18. android:layout_weight="1"
  19. android:orientation="vertical"
  20. android:background="@drawable/focusable_view_bg"
  21. android:focusable="true">
  22. <LinearLayout
  23. android:orientation="horizontal"
  24. android:layout_width="match_parent"
  25. android:layout_height="wrap_content"
  26. android:layout_weight="1">
  27. <FrameLayout
  28. android:id="@+id/left_border"
  29. android:layout_width="1dp"
  30. android:layout_height="match_parent"
  31. android:background="@color/widget_text_panel"
  32. android:visibility="gone" />
  33. <!-- The preview of the widget or shortcut. -->
  34. <com.android.launcher3.PagedViewWidgetImageView
  35. android:id="@+id/widget_preview"
  36. style="@style/PagedViewWidgetImageView"
  37. android:layout_width="match_parent"
  38. android:layout_height="match_parent"
  39. android:layout_weight="1"
  40. android:paddingTop="@dimen/app_widget_preview_padding_top"
  41. android:paddingEnd="@dimen/app_widget_preview_padding_right"
  42. android:paddingRight="@dimen/app_widget_preview_padding_right"
  43. android:scaleType="matrix" />
  44. <FrameLayout
  45. android:id="@+id/right_border"
  46. android:layout_width="1dp"
  47. android:layout_height="match_parent"
  48. android:background="@color/widget_text_panel"
  49. android:visibility="gone" />
  50. </LinearLayout>
  51. <LinearLayout
  52. android:layout_width="match_parent"
  53. android:layout_height="wrap_content"
  54. android:paddingTop="@dimen/app_widget_preview_label_vertical_padding"
  55. android:paddingBottom="@dimen/app_widget_preview_label_vertical_padding"
  56. android:paddingLeft="@dimen/app_widget_preview_label_horizontal_padding"
  57. android:paddingRight="@dimen/app_widget_preview_label_horizontal_padding"
  58. android:background="@color/widget_text_panel"
  59. android:orientation="horizontal">
  60. <!-- The name of the widget. -->
  61. <TextView
  62. android:id="@+id/widget_name"
  63. android:layout_width="wrap_content"
  64. android:layout_height="wrap_content"
  65. android:layout_weight="1"
  66. android:gravity="start"
  67. android:singleLine="true"
  68. android:ellipsize="marquee"
  69. android:fadingEdge="horizontal"
  70. android:textColor="#FFFFFFFF"
  71. android:textSize="12sp"
  72. android:textAlignment="viewStart"
  73. android:fontFamily="sans-serif-condensed"
  74. android:shadowRadius="2.0"
  75. android:shadowColor="#B0000000" />
  76. <!-- The original dimensions of the widget (can't be the same text as above due to different
  77. style. -->
  78. <TextView
  79. android:id="@+id/widget_dims"
  80. android:layout_width="wrap_content"
  81. android:layout_height="wrap_content"
  82. android:layout_gravity="center"
  83. android:layout_marginStart="5dp"
  84. android:layout_weight="0"
  85. android:gravity="start"
  86. android:textColor="#FFFFFFFF"
  87. android:textSize="12sp"
  88. android:fontFamily="sans-serif-condensed"
  89. android:shadowRadius="2.0"
  90. android:shadowColor="#B0000000" />
  91. </LinearLayout>
  92. </com.android.launcher3.PagedViewWidget>