Rename widgets two pane sheet layout files and spec files to more fitting name
Currently the names used for widgets two pane sheet files are similar to full sheet files, just with "_large_screen" added to it. This is not a good name as it can cause confusion. The new name includes "_two_pane" which is more indicative of the actual functionality of these files.
Fix: 276917926
Test: verify widget picker two pane still works
Change-Id: I23cf2a20fc137cc3e99c5fdc90100648a0926368
diff --git a/res/drawable/bg_widgets_header_large_screen.xml b/res/drawable/bg_widgets_header_two_pane.xml
similarity index 100%
rename from res/drawable/bg_widgets_header_large_screen.xml
rename to res/drawable/bg_widgets_header_two_pane.xml
diff --git a/res/layout/widgets_list_row_header_two_pane.xml b/res/layout/widgets_list_row_header_two_pane.xml
index 6465db5..c0a6ea8 100644
--- a/res/layout/widgets_list_row_header_two_pane.xml
+++ b/res/layout/widgets_list_row_header_two_pane.xml
@@ -24,7 +24,7 @@
android:focusable="true"
launcher:appIconSize="48dp"
android:descendantFocusability="afterDescendants"
- android:background="@drawable/bg_widgets_header_large_screen" >
+ android:background="@drawable/bg_widgets_header_two_pane" >
<ImageView
android:id="@+id/app_icon"
diff --git a/res/layout/widgets_full_sheet_large_screen.xml b/res/layout/widgets_two_pane_sheet.xml
similarity index 97%
rename from res/layout/widgets_full_sheet_large_screen.xml
rename to res/layout/widgets_two_pane_sheet.xml
index f563baa..4333a80 100644
--- a/res/layout/widgets_full_sheet_large_screen.xml
+++ b/res/layout/widgets_two_pane_sheet.xml
@@ -42,7 +42,7 @@
android:layout_marginTop="24dp"
android:gravity="center_horizontal"
android:layout_below="@id/collapse_handle"
- android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:text="@string/widget_button_text"
android:textColor="?android:attr/textColorSecondary"
android:textSize="24sp" />
@@ -76,7 +76,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
- android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:visibility="gone" />
</FrameLayout>
@@ -85,8 +85,8 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.67"
- android:layout_marginEnd="@dimen/widget_list_horizontal_margin_large_screen"
- android:paddingTop="@dimen/widget_list_horizontal_margin_large_screen"
+ android:layout_marginEnd="@dimen/widget_list_horizontal_margin_two_pane"
+ android:paddingTop="@dimen/widget_list_horizontal_margin_two_pane"
android:gravity="end"
android:layout_gravity="end"
android:orientation="horizontal">
@@ -118,7 +118,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal=
- "@dimen/widget_list_horizontal_margin_large_screen"
+ "@dimen/widget_list_horizontal_margin_two_pane"
android:visibility="gone" />
</LinearLayout>
</ScrollView>
diff --git a/res/layout/widgets_full_sheet_paged_view_large_screen.xml b/res/layout/widgets_two_pane_sheet_paged_view.xml
similarity index 96%
rename from res/layout/widgets_full_sheet_paged_view_large_screen.xml
rename to res/layout/widgets_two_pane_sheet_paged_view.xml
index f729981..5cc2406 100644
--- a/res/layout/widgets_full_sheet_paged_view_large_screen.xml
+++ b/res/layout/widgets_two_pane_sheet_paged_view.xml
@@ -17,7 +17,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<FrameLayout
- android:id="@+id/widgets_full_sheet_paged_view_large_screen"
+ android:id="@+id/widgets_two_pane_sheet_paged_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
@@ -29,7 +29,7 @@
android:layout_height="match_parent"
android:clipToPadding="false"
android:descendantFocusability="afterDescendants"
- android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
launcher:pageIndicator="@+id/tabs" >
<com.android.launcher3.widget.picker.WidgetsRecyclerView
@@ -62,7 +62,7 @@
android:clipToPadding="false"
android:elevation="0.1dp"
android:paddingBottom="8dp"
- android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
launcher:layout_sticky="true">
<include layout="@layout/widgets_search_bar" />
@@ -73,7 +73,7 @@
android:layout_height="match_parent"
android:id="@+id/suggestions_header"
android:layout_marginTop="8dp"
- android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:orientation="horizontal">
</LinearLayout>
@@ -84,7 +84,7 @@
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingVertical="8dp"
- android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:background="?android:attr/colorBackground"
style="@style/TextHeadline"
launcher:layout_sticky="true">
diff --git a/res/layout/widgets_full_sheet_recyclerview_large_screen.xml b/res/layout/widgets_two_pane_sheet_recyclerview.xml
similarity index 93%
rename from res/layout/widgets_full_sheet_recyclerview_large_screen.xml
rename to res/layout/widgets_two_pane_sheet_recyclerview.xml
index 8fef303..09cef88 100644
--- a/res/layout/widgets_full_sheet_recyclerview_large_screen.xml
+++ b/res/layout/widgets_two_pane_sheet_recyclerview.xml
@@ -17,7 +17,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<FrameLayout
- android:id="@+id/widgets_full_sheet_recyclerview_large_screen"
+ android:id="@+id/widgets_two_pane_sheet_recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
@@ -28,7 +28,7 @@
android:id="@+id/primary_widgets_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:clipToPadding="false" />
<!-- SearchAndRecommendationsView without the tab layout as well -->
@@ -47,7 +47,7 @@
android:clipToPadding="false"
android:elevation="0.1dp"
android:paddingBottom="8dp"
- android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
launcher:layout_sticky="true">
<include layout="@layout/widgets_search_bar" />
@@ -58,7 +58,7 @@
android:layout_height="match_parent"
android:id="@+id/suggestions_header"
android:layout_marginTop="8dp"
- android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
+ android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:orientation="horizontal">
</LinearLayout>
</com.android.launcher3.views.StickyHeaderLayout>
diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml
index b89910d..4d0ac38 100644
--- a/res/values-sw720dp-land/dimens.xml
+++ b/res/values-sw720dp-land/dimens.xml
@@ -31,7 +31,7 @@
<!-- Widget picker-->
<dimen name="widget_list_horizontal_margin">49dp</dimen>
- <dimen name="widget_list_horizontal_margin_large_screen">24dp</dimen>
+ <dimen name="widget_list_horizontal_margin_two_pane">24dp</dimen>
<!-- Bottom sheet-->
<dimen name="bottom_sheet_extra_top_padding">0dp</dimen>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 68e668f..923883b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -193,7 +193,7 @@
<dimen name="widget_list_header_view_vertical_padding">20dp</dimen>
<dimen name="widget_list_entry_spacing">2dp</dimen>
<dimen name="widget_list_horizontal_margin">16dp</dimen>
- <dimen name="widget_list_horizontal_margin_large_screen">24dp</dimen>
+ <dimen name="widget_list_horizontal_margin_two_pane">24dp</dimen>
<dimen name="widget_preview_shadow_blur">0.5dp</dimen>
<dimen name="widget_preview_key_shadow_distance">1dp</dimen>
diff --git a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
index 2325376..46cfb3c 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java
@@ -688,7 +688,7 @@
WidgetsFullSheet sheet;
if (isTwoPane) {
sheet = (WidgetsTwoPaneSheet) launcher.getLayoutInflater().inflate(
- R.layout.widgets_full_sheet_large_screen,
+ R.layout.widgets_two_pane_sheet,
launcher.getDragLayer(),
false);
} else {
diff --git a/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java b/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java
index 46aae9d..d85737b 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java
@@ -64,7 +64,7 @@
0,
view.getMeasuredWidth(),
view.getMeasuredHeight() - getResources().getDimensionPixelSize(
- R.dimen.widget_list_horizontal_margin_large_screen),
+ R.dimen.widget_list_horizontal_margin_two_pane),
view.getResources().getDimensionPixelSize(
R.dimen.widget_list_top_bottom_corner_radius)
);
@@ -91,8 +91,8 @@
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
- int contentLayoutRes = mHasWorkProfile ? R.layout.widgets_full_sheet_paged_view_large_screen
- : R.layout.widgets_full_sheet_recyclerview_large_screen;
+ int contentLayoutRes = mHasWorkProfile ? R.layout.widgets_two_pane_sheet_paged_view
+ : R.layout.widgets_two_pane_sheet_recyclerview;
layoutInflater.inflate(contentLayoutRes, findViewById(R.id.recycler_view_container), true);
setupViews();