ListView (Inside Linear Layout) вместе с TextViews и EditText не прокручивался - PullRequest
0 голосов
/ 05 июля 2019

Вот мой макет, который содержит TextViews и EditText и ImageButtons ListView добавляется в качестве последнего элемента в макете, поэтому результаты поиска будут отображаться в формате списка. Когда элементы списка становятся достаточно большими, чтобы пользователь захотел прокрутить их, представление списка не отвечает на прокрутку. ПРИМЕЧАНИЕ. Я удаляю некоторые атрибуты margin и padding для сокращения XML-файла ..

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorPrimary"
    android:orientation="vertical">

    <TextView
        android:id="@+id/textView2"
        android:layout_width="match_parent"
        android:layout_height="36dp"
        android:fontFamily="@font/abeezee"
        android:text="Welcome to MeetUps"
        android:textSize="32sp"
         />

    <TextView
        android:id="@+id/textView3"
        android:layout_width="match_parent"
        android:text="Find Your Mentor , Be A Mentor ."
        android:textColor="#cccccc"
        android:textSize="18sp"
       />

    <EditText
        android:id="@+id/searchRegd"
        android:background="@drawable/et_search_background"
        android:hint="Search By Regd No."
        android:textColorHint="#3c3c3c"
     />
    <Button
        android:id="@+id/action_search"
        android:layout_width="32dp"
        android:foreground="?attr/selectableItemBackground"/>
<LinearLayout
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <EditText
        android:id="@+id/searchSurname"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="36dp"
        android:hint="Surname"
        android:textColorHint="#3c3c3c"
        />
    <EditText
        android:id="@+id/searchFirstName"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="36dp"

        android:background="@drawable/et_search_background"
        android:hint="First Name"
        android:textColorHint="#3c3c3c"

        />
    <EditText
        android:id="@+id/searchLastName"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="36dp"
        android:hint="Last Name"
        android:textColorHint="#3c3c3c"
       />
</LinearLayout>

    <Button
        android:id="@+id/action_search_name"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:background="@drawable/ic_search_black_24dp"
        android:layout_gravity="center_horizontal"
        android:textColor="#ffffff"
        android:foreground="?attr/selectableItemBackground"/>



        <ListView
            android:id="@+id/listViewMeetups"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:foreground="?attr/selectableItemBackground">

        </ListView>

</LinearLayout>

Я хочу, чтобы список можно было прокручивать .. когда список становится большим

enter image description here

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...