android - How to put 2 ListView and put TextView in TableView after Listview? -


i have 2 listview in 1 activity

example:

[tablerow - 4 textview in 1 row] [listview1] [tablerow - 4 textview in 1 row] [listview2] 

i tried: linearlayout , set vertical; layout_weight; relativelayout; android:width="0dp"; layout_below / above

sometimes, listview overlap, second tablerow not displayed.

may know how solve ?

here activity xml file.

<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.bus">  <tablerow     android:id="@+id/table1"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="@drawable/border"     android:gravity="center_horizontal">      <textview         android:id="@+id/tvleaving"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/leaving"         android:textstyle="bold" />      <textview         android:id="@+id/hc1"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/ch"         android:textstyle="bold" />      <textview         android:id="@+id/hc2"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/westlake"         android:textstyle="bold" />      <textview         android:id="@+id/arriving"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/arrive"         android:textstyle="bold" /> </tablerow>   <listview     android:id="@+id/listview1"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_weight="1"     android:paddingtop="40dp" />   <tablerow     android:id="@+id/table2"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:layout_margintop="600dp"     android:background="@drawable/border"     android:gravity="center_horizontal">      <textview         android:id="@+id/tvleaving2"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/leaving"         android:textstyle="bold" />      <textview         android:id="@+id/hc3"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/ch"         android:textstyle="bold" />      <textview         android:id="@+id/hc4"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/west"         android:textstyle="bold" />      <textview         android:id="@+id/arriving2"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:gravity="center"         android:text="@string/arrive"         android:textstyle="bold" /> </tablerow>  <listview         android:id="@+id/listview2"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_weight="1" /> 

thanks in advance.

try using way.

<linearlayout  android:orientation="vertical">   <linearlayout  android:orientation="vertical"   android:layout_weight="1">   <tablerow/>   <listview/>  </linearlayout>   <linearlayout  android:orientation="vertical"  android:layout_weight="1">   <tablerow/>   <listview/>  </linearlayout>  </linearlayout> 

Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -