Change ScrollView to NestedScrollView for screen size page
To make sure the collapsing toolbar work as usual, we need to use NestedScrollView instead of ScrollView in the screen size page. Bug: 176896338 Test: manual test and visual verified 1) Navigate to Settings -> Display -> Display size 2) Change the size on the seekbar 3) Observe and check if the preview window can be scrolled Change-Id: Ia5bb66ef63b9d9a7713cebddbf6ab6258ff82b8d
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
android:padding="6dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
@@ -106,5 +106,5 @@
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</LinearLayout>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/preview_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="400dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/colorBackgroundFloating"
|
||||
android:contentDescription="@string/preview_pager_content_description" />
|
||||
|
@@ -14,17 +14,18 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
<androidx.core.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<include layout="@layout/preview_seek_bar_view_pager" />
|
||||
<include layout="@layout/preview_seek_bar_view_pager"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
@@ -40,7 +41,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="6dp" />
|
||||
android:padding="6dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/current_label"
|
||||
@@ -49,7 +50,7 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="6dp"
|
||||
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.TextView"
|
||||
android:elevation="2dp" />
|
||||
android:elevation="2dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -66,7 +67,7 @@
|
||||
android:tintMode="src_in"
|
||||
android:scaleType="center"
|
||||
android:focusable="true"
|
||||
android:contentDescription="@string/screen_zoom_make_smaller_desc" />
|
||||
android:contentDescription="@string/screen_zoom_make_smaller_desc"/>
|
||||
|
||||
<com.android.settings.widget.LabeledSeekBar
|
||||
android:id="@+id/seek_bar"
|
||||
@@ -85,7 +86,7 @@
|
||||
android:tintMode="src_in"
|
||||
android:scaleType="center"
|
||||
android:focusable="true"
|
||||
android:contentDescription="@string/screen_zoom_make_larger_desc" />
|
||||
android:contentDescription="@string/screen_zoom_make_larger_desc"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@@ -93,7 +94,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/screen_zoom_summary"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead" />
|
||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
@@ -13,7 +13,8 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -75,4 +76,4 @@
|
||||
app:iconBackgroundColor="@color/message_icon_background_incoming" />
|
||||
</LinearLayout>
|
||||
</view>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
@@ -14,7 +14,8 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
@@ -223,4 +224,4 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</view>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
Reference in New Issue
Block a user