Quantcast
Channel: Active questions tagged listview - Stack Overflow
Viewing all articles
Browse latest Browse all 688

How can I set the maximum height on a ListView?

$
0
0

I would like to create a UI where half of the screen is a ListView and the bottom half is another view. Not sure how to specify the maximum height for the ListView.

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:orientation="vertical"    android:layout_width="fill_parent"    android:layout_height="fill_parent"><TextView      android:layout_width="fill_parent"    android:layout_height="wrap_content" android:text="Hello StockTwits!"/><ListView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/ListView"></ListView><ViewFlipper android:id="@+id/ViewFlipper" android:layout_width="fill_parent" android:layout_height="fill_parent"><LinearLayout android:id="@+id/LinearLayoutST" android:layout_height="fill_parent" android:layout_width="fill_parent"><ImageView android:id="@+id/ImageView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/icon"></ImageView></LinearLayout><LinearLayout android:id="@+id/LinearLayoutChart" android:layout_height="fill_parent" android:layout_width="fill_parent"><TextView android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="View 2"></TextView></LinearLayout><LinearLayout android:id="@+id/LinearLayoutDetails" android:layout_height="fill_parent" android:layout_width="fill_parent"><TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="View 3"></TextView></LinearLayout></ViewFlipper></LinearLayout>

Viewing all articles
Browse latest Browse all 688

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>