android - Two ListView Side By Side -


i have 2 listview. , need place them side side horizontally. problem - 1 list visible. (note : second list in right side of layout , can have @ 1 character. , first list expand fill rest of screen.)

help me please.

the layout this.

------------ |       |  | |       |  | |       |  | |       |  | |       |  | |       |  | |       |  | |       |  | |       |  | ------------ 

<linearlayout     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:layout_weight="1"     android:orientation="vertical" >      <listview         android:layout_width="fill_parent"         android:layout_height="fill_parent" /> </linearlayout>  <linearlayout     android:layout_width="wrap_content"     android:layout_height="fill_parent"     android:orientation="vertical" >      <listview         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:drawselectorontop="true" /> </linearlayout> 

shaiful

i think use code work fine. have use layout_weight = 0.5 , things work fine.

<linearlayout android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_marginbottom="60dp" android:layout_margintop="60dp" android:orientation="horizontal" android:id="@+id/linearlayout2">     <listview         android:id="@+id/sportslist"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:entries="@array/sports_array"         android:layout_weight="0.5"/>      <listview         android:id="@+id/sportslist_1"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:entries="@array/sports_array"         android:layout_weight="0.5"/> </linearlayout> 

so, use 2 list views in linear layout , give weight of each layout 0.5 . think helps.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -