in fact I have the following problem:
I have two ListView
loaded automatically with two adapters, the problem is in the XML
, both list only displays the first element.
here is my xml code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.hrizi.onescore.home_links.searshscore">
<include
android:id="@+id/toolbar"
layout="@layout/apptoolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:scaleType="fitCenter" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="66dp"
android:fillViewport="true">
<LinearLayout
android:id="@+id/ll1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="@+id/sv_search"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/edittextbackground"
android:hint="Search ..."
android:inputType="text"
android:textAlignment="center"></EditText>
<Button
android:id="@+id/btn_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_weight="1"
android:background="@color/coloronscore"
android:onClick="btnsearchOnClick"
android:text="Search"
android:textAllCaps="false"
android:textColor="@color/colorwhite" />
</LinearLayout>
<!--Result of research-->
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="248dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:paddingBottom="5dp" />
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="248dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:paddingBottom="5dp" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
the problem I think in the ScrollView
or something else that flushes to that.
thank you in advance .