Update ScrollView to NestedScrollView in the font size page

To ensure that the collapsing toolbar work as usual, we need to change
the ScrollView to NestedScrollView.

Bug: 176884647
Test: manual test and visual verified
1) Navigate to Settings -> Display -> Font size
2) Check if the sample text area is scrollable

Change-Id: I1cb8a20f1efd69213e1eaadfe84a53aff9bc640f
This commit is contained in:
Mill Chen
2021-01-06 21:08:30 +08:00
parent 90c976b8c0
commit dda4c34d59
3 changed files with 18 additions and 16 deletions

View File

@@ -36,7 +36,7 @@
android:padding="6dp" />
</LinearLayout>
<ScrollView
<androidx.core.widget.NestedScrollView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
@@ -104,5 +104,5 @@
android:layout_marginBottom="16dp"
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead" />
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

View File

@@ -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"
@@ -68,7 +69,7 @@
android:tintMode="src_in"
android:scaleType="center"
android:focusable="true"
android:contentDescription="@string/font_size_make_smaller_desc" />
android:contentDescription="@string/font_size_make_smaller_desc"/>
<com.android.settings.widget.LabeledSeekBar
android:id="@+id/seek_bar"
@@ -87,7 +88,7 @@
android:tintMode="src_in"
android:scaleType="center"
android:focusable="true"
android:contentDescription="@string/font_size_make_larger_desc" />
android:contentDescription="@string/font_size_make_larger_desc"/>
</LinearLayout>
<TextView
@@ -95,7 +96,7 @@
android:layout_height="wrap_content"
android:text="@string/font_size_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>

View File

@@ -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" >
@@ -57,4 +58,4 @@
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"/>
</LinearLayout>
</view>
</ScrollView>
</androidx.core.widget.NestedScrollView>