diff options
author | Tony Wickham <twickham@google.com> | 2017-03-30 23:26:12 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-03-30 23:26:12 +0000 |
commit | 52f0130a76addcfec25775004c24346dc69b30d3 (patch) | |
tree | 480a0ea0971ea74f46227625507693aceb06a943 /res | |
parent | 65caaf60cec88db83e2c2626a9fd8cce12842928 (diff) | |
parent | d73fbb5f975ceedaec6463164ee39b3f32623151 (diff) | |
download | android_packages_apps_Trebuchet-52f0130a76addcfec25775004c24346dc69b30d3.tar.gz android_packages_apps_Trebuchet-52f0130a76addcfec25775004c24346dc69b30d3.tar.bz2 android_packages_apps_Trebuchet-52f0130a76addcfec25775004c24346dc69b30d3.zip |
Merge "Add WidgetsAndMore bottom sheet" into ub-launcher3-dorval
am: d73fbb5f97
Change-Id: I5d1bad3ea83e672076dbd3b6f2d80d5149f3921c
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/widgets_and_more.xml | 80 | ||||
-rw-r--r-- | res/layout/widgets_scroll_container.xml | 32 | ||||
-rw-r--r-- | res/values/strings.xml | 4 |
3 files changed, 116 insertions, 0 deletions
diff --git a/res/layout/widgets_and_more.xml b/res/layout/widgets_and_more.xml new file mode 100644 index 000000000..7a6d00688 --- /dev/null +++ b/res/layout/widgets_and_more.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2017 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<com.android.launcher3.widget.WidgetsAndMore + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="8dp" + android:background="?android:attr/colorPrimary" + android:elevation="@dimen/deep_shortcuts_elevation" + android:layout_gravity="bottom"> + + <TextView + android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="48dp" + android:gravity="center_horizontal|bottom" + android:fontFamily="sans-serif" + android:textStyle="bold" + android:textColor="?android:attr/textColorPrimary" + android:textSize="20sp"/> + + <TextView + android:layout_width="match_parent" + android:layout_height="48dp" + android:gravity="center_horizontal|top" + android:fontFamily="sans-serif" + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp" + android:text="@string/long_press_widget_to_add"/> + + <TextView + android:id="@+id/widgets_header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fontFamily="sans-serif" + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp" + android:textStyle="bold" + android:text="@string/widget_button_text"/> + + <include layout="@layout/widgets_scroll_container" + android:id="@+id/widgets" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/widget_row_padding" + android:layout_marginBottom="@dimen/widget_row_padding"/> + + <TextView + android:id="@+id/shortcuts_header" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fontFamily="sans-serif" + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp" + android:textStyle="bold" + android:text="@string/widgets_bottom_sheet_custom_shortcuts_section_title"/> + + <include layout="@layout/widgets_scroll_container" + android:id="@+id/shortcuts" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/widget_row_padding" + android:layout_marginBottom="@dimen/widget_row_padding" /> + +</com.android.launcher3.widget.WidgetsAndMore>
\ No newline at end of file diff --git a/res/layout/widgets_scroll_container.xml b/res/layout/widgets_scroll_container.xml new file mode 100644 index 000000000..33c981a31 --- /dev/null +++ b/res/layout/widgets_scroll_container.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2017 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<HorizontalScrollView + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/widgets_scroll_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?android:attr/colorPrimaryDark" + android:scrollbars="none"> + <LinearLayout + android:id="@+id/widgets_cell_list" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="0dp" + android:paddingEnd="0dp" + android:orientation="horizontal" + android:showDividers="none"/> +</HorizontalScrollView>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 9d9e1dfae..99ff581e8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -203,6 +203,10 @@ <!-- Title for an app whose download has been started. --> <string name="app_waiting_download_title"><xliff:g id="name" example="Messenger">%1$s</xliff:g> waiting to install</string> + <!-- Strings for widgets & more in the popup container/bottom sheet --> + <string name="widgets_and_more" translatable="false">Widgets & more</string> + <string name="widgets_bottom_sheet_custom_shortcuts_section_title" translatable="false">Custom shortcuts</string> + <!-- Strings for accessibility actions --> <!-- Accessibility action to add an app to workspace. [CHAR_LIMIT=30] --> <string name="action_add_to_workspace">Add to Home screen</string> |