Hey People У меня проблема с тем, что когда список растет, он идет за editText ... Я не хочу, чтобы он заходил за представление. Я хочу, чтобы он оставался над editText. Не могли бы вы мне помочь? Я ценю вашу помощь.Почему listVIew идет за EditText?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical">
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:paddingBottom="10dp"></ListView>
<GridLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="2">
<EditText
android:id="@+id/edit_text"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_column="0"
android:layout_row="0"
android:layout_gravity="fill_horizontal|bottom"
android:hint="Type text here..."
android:maxLines="3"
android:scrollbars="vertical"
android:maxEms="10"/>
<Button
android:id="@+id/button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_column="1"
android:layout_row="0"
android:text="Send"
android:layout_gravity="bottom"
android:onClick="insertTo"
/>
</GridLayout>
</LinearLayout>
Его не происходит за 'editText', его последний предел текст для прокрутки в конце границы списка. – Pankaj
это не позади. Это поведение по умолчанию, так как ваш основной макет - это линейный макет, а дочерние элементы выравниваются по вертикали. Это показано так, что из-за paddingBottom в listview –