In a project, a listview and 3 include layouts are used.
It turns out that when the listview is wrap_content, the layout cannot be opened. But all layouts do not fill the screen. In addition, when the soft keyboard is invoked in the include, the listview still does not move, which causes the editing content to be awkward.
By trial and error, the summary is to set the height for the listview. But it seems that listview.setOverScrollMode(View.OVER_SCROLL_NEVER); does not work. The layout code is as follows:
(Because there can be only one element inside ScrollView, linearLayout is used to include other elements.)
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<ListView
android:id="@+id/plv"
android:layout_width="match_parent"
android:layout_height="230dp"
tools:ignore="NestedScrolling" />
<include
android:id="@+id/plable"
layout="@layout/style_lable" />
<include
android:id="@+id/poffset"
layout="@layout/price_offset" />
<include
android:id="@+id/pedit"
layout="@layout/style_edit" />
< span style="background-color: #ffffff; font-family:'PingFang SC','Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px;">
< img alt="Share picture" style="background-color: #ffffff; font-family:'PingFang SC','Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px;" src="/ wp-content/uploads/images/mobile/android/1626792382142.png" width="216" height="432">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<ListView
android:id="@+id/plv"
android:layout_width="match_parent"
android:layout_height="230dp"
tools:ignore="NestedScrolling" />
<include
android:id="@+id/plable"
layout="@layout/style_lable" />
<include
android:id="@+id/poffset"
layout="@layout/price_offset" />
<include
android:id="@+id/pedit"
layout="@layout/style_edit" />
< span style="background-color: #ffffff; font-family:'PingFang SC','Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px;">
< img alt="Share picture" style="background-color: #ffffff; font-family:'PingFang SC','Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px;" src="/ wp-content/uploads/images/mobile/android/1626792382145.png" width="216" height="432">