diff options
| author | 2023-07-26 15:07:53 -0700 | |
|---|---|---|
| committer | 2023-09-16 22:42:21 -0700 | |
| commit | 928bc9858768b3697c64a2fd30b48e206768e7d3 (patch) | |
| tree | 3b76fe7ea516ef9d11e5cab5021cfdc6bde8411b /java/res | |
| parent | c7d61dc6a727ffad6e6d26f312e6d5928c93bd6b (diff) | |
Add headline view argument to content preview UI
"Sticky" headline is one of the requirements of the scrollable preview
feature. Currently headling row is included in every preview type we
have and to be "sticky" it should be moved out of all of them. This
change is a preparation work that makes all of the preview UI
controllers aware of a possible external headline row (but no actual
external headline view is used).
Bug: 287102904
Test: manual testing of all preivew types checking that there are no
regressions
Test: atest com.android.intentresolver.contentpreview
Change-Id: Ib6110aaa82246e3354fdce18f431ab1c116e7b73
Diffstat (limited to 'java/res')
| -rw-r--r-- | java/res/layout/chooser_grid_preview_file.xml | 8 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_files_text.xml | 8 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_image.xml | 8 | ||||
| -rw-r--r-- | java/res/layout/chooser_grid_preview_text.xml | 8 |
4 files changed, 28 insertions, 4 deletions
diff --git a/java/res/layout/chooser_grid_preview_file.xml b/java/res/layout/chooser_grid_preview_file.xml index 3c836b4c..90832d23 100644 --- a/java/res/layout/chooser_grid_preview_file.xml +++ b/java/res/layout/chooser_grid_preview_file.xml @@ -26,7 +26,13 @@ android:orientation="vertical" android:background="?androidprv:attr/materialColorSurfaceContainer"> - <include layout="@layout/chooser_headline_row"/> + <ViewStub + android:id="@+id/chooser_headline_row_stub" + android:layout="@layout/chooser_headline_row" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="@dimen/chooser_edge_margin_normal" + android:layout_marginBottom="@dimen/chooser_view_spacing" /> <RelativeLayout android:layout_width="match_parent" diff --git a/java/res/layout/chooser_grid_preview_files_text.xml b/java/res/layout/chooser_grid_preview_files_text.xml index c64d7ddd..e7747496 100644 --- a/java/res/layout/chooser_grid_preview_files_text.xml +++ b/java/res/layout/chooser_grid_preview_files_text.xml @@ -25,7 +25,13 @@ android:orientation="vertical" android:background="?androidprv:attr/materialColorSurfaceContainer"> - <include layout="@layout/chooser_headline_row" /> + <ViewStub + android:id="@+id/chooser_headline_row_stub" + android:layout="@layout/chooser_headline_row" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="@dimen/chooser_edge_margin_normal" + android:layout_marginBottom="@dimen/chooser_view_spacing" /> <LinearLayout android:layout_width="match_parent" diff --git a/java/res/layout/chooser_grid_preview_image.xml b/java/res/layout/chooser_grid_preview_image.xml index 4a832324..4745e04c 100644 --- a/java/res/layout/chooser_grid_preview_image.xml +++ b/java/res/layout/chooser_grid_preview_image.xml @@ -26,7 +26,13 @@ android:importantForAccessibility="no" android:background="?androidprv:attr/materialColorSurfaceContainer"> - <include layout="@layout/chooser_headline_row"/> + <ViewStub + android:id="@+id/chooser_headline_row_stub" + android:layout="@layout/chooser_headline_row" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="@dimen/chooser_edge_margin_normal" + android:layout_marginBottom="@dimen/chooser_view_spacing" /> <com.android.intentresolver.widget.ScrollableImagePreviewView android:id="@+id/scrollable_image_preview" diff --git a/java/res/layout/chooser_grid_preview_text.xml b/java/res/layout/chooser_grid_preview_text.xml index df906cce..f3045c34 100644 --- a/java/res/layout/chooser_grid_preview_text.xml +++ b/java/res/layout/chooser_grid_preview_text.xml @@ -27,7 +27,13 @@ android:orientation="vertical" android:background="?androidprv:attr/materialColorSurfaceContainer"> - <include layout="@layout/chooser_headline_row" /> + <ViewStub + android:id="@+id/chooser_headline_row_stub" + android:layout="@layout/chooser_headline_row" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingHorizontal="@dimen/chooser_edge_margin_normal" + android:layout_marginBottom="@dimen/chooser_view_spacing" /> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" |