Я добавил представление прокрутки в макете, представление прокрутки имеет атрибуты родительского соответствия для высоты и ширины, также fillViewPort верно для представления прокрутки, оно работает на других устройствах, но не работает в ОС Android 4.1.2.
Планировка:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
android:background="@android:color/white"
android:layout_height="match_parent">
<!-- <RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<!– <ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0.5"
android:scaleType="fitXY"
android:src="@drawable/page"/>–>
</RelativeLayout>-->
<ScrollView
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:weightSum="8">
<TextView
android:id="@+id/main_welcome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dimen_20dp"
android:text="@string/welcome"
android:textColor="@color/colorPrimary"
android:textStyle="bold" />
<GridView
android:id="@+id/gridviewMain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/dimen_40dp"
android:layout_marginLeft="@dimen/dimen_40dp"
android:layout_marginRight="@dimen/dimen_40dp"
android:columnWidth="80dp"
android:horizontalSpacing="@dimen/dimen_10dp"
android:numColumns="2"
android:stretchMode="columnWidth"
android:verticalSpacing="10dp"></GridView>
</LinearLayout>
</ScrollView>
<TextView
android:id="@+id/textView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_centerInParent="false"
android:text="For Any Queries Related To Mobile App Click On Service Request"
android:textAlignment="center" />
</RelativeLayout>
В чем может быть причина этого? Все остальные виды прокрутки работают на том же устройстве, но не работают на этом экране.
Пожалуйста, помогите. Спасибо ..