I have a Fragment
with a ScrollView
inside a RelativeLayout
that used to work without any problem until now that I upgraded the project's targetSdkVersion
and compileSdkVersion
from, respectively, 22 and 23 to 27 and, according to this change, I upgraded the com.android.support
libraries from 23.0.1 to 27.1.1.
Now, while in Android Studio layout design the ScrollView
seems to work, when deployed to device it does not scroll anymore.
I already tried the solutions proposed in the many threads about ScrollView
not scrolling (using NestedScrollView
, etc), to no avail. Here it follows the XML layout:
<RelativeLayout
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"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- ... Other stuff here ... -->
</LinearLayout>
</ScrollView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_alignParentBottom="true"
android:background="@color/white"
android:paddingTop="10dp">
<Button
style="@style/FlatButton"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_centerVertical="false"
android:layout_marginLeft="13.5dp"
android:layout_marginRight="13.5dp"
android:alpha="1"
android:background="@drawable/shape_radius"
android:text="@string/getapp_save"
android:textColor="#ffffff"
android:textSize="18sp"
android:visibility="visible">
</Button>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/gradient_bottom_white_transparent">
</RelativeLayout>
</RelativeLayout>
Thanks in advance.