Show all Items in ListView in Android - android

I have started building an app with two ListView's under each other.
Now i put an ScrollView over it, because the amout of itmes might get very big and therefore i want the whole layout to be scrollable and not the lists itself. But my solution dosent work!
btw: i dont want to replace my ListViews with a LinearLayout or so because then all my adapters are gone.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout 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"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="#style/Heading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ListView1" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
style="#style/ButtonStyle.SpinnerAddButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableRight="#drawable/ic_add_black_24dp"
android:onClick="addToList1" />
</LinearLayout>
<ListView
android:id="#+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/marginLeft"
android:layout_marginRight="#dimen/marginLeft" />
<!--Second list-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
style="#style/Heading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ListView2" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<Button
style="#style/ButtonStyle.SpinnerAddButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableRight="#drawable/ic_add_black_24dp"
android:onClick="addToList2" />
</LinearLayout>
<ListView
android:id="#+id/listView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/marginLeft"
android:layout_marginRight="#dimen/marginLeft" />
</LinearLayout>
</ScrollView>
My Layout now shows all the ListViews under each other but only one Item per ListView and you can then scroll through this Lists.

You should should use one listview and just have different viewtypes.
#Override
public int getItemViewType(int position) {
return isFirstItem(position) ? TYPE_ITEMA : TYPE_ITEMB;
}
#Override
public int getViewTypeCount() {
return 2;
}

Related

How to fix "vertical alignment ListView in widget - the size of height sometimes less than text content"

I'm creating widget where I'm using ListView in RelativeLayout where parent is Linear Layout.
Showing ListView work almost always right!, but sometimes height of the ListView is less than the real wrap_content. Example is visible on screenshots.
The height of ListView is randomly OK or WRONG. I can not find, where is the problem.
My intent is to have ListView centered vertically in the widget.
Used RemoteViewsService.RemoteViewsFactory.
You can check the XML files attached.
And screenshots for better understand the issue.
Right Height | Wrong Height
Widget.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/linearLayoutWidgetScrollable"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp"
android:layout_marginRight="2dp"
android:layout_marginBottom="2dp"
android:orientation="horizontal"
android:padding="#dimen/widget_margin">
<ImageView
android:id="#+id/imageViewVectorArrowL"
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|center_vertical"
android:contentDescription="#string/share_quote_button" />
<RelativeLayout
android:id="#+id/relativeLayoutWidgetScrollable"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ListView
android:id="#+id/listViewWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foregroundGravity="center_vertical"
android:layout_centerInParent="true"
android:layout_margin="0dp"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:divider="#null"
android:dividerHeight="0dp"
android:scrollbars="none"
/>
<!--sibling with empty view for ListView-->
<TextView
android:id="#+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"/>
</RelativeLayout>
<ImageView
android:id="#+id/imageViewVectorArrowR"
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|center_vertical"
android:contentDescription="#string/share_quote_button" />
<ImageView
android:id="#+id/imageViewVectorButton"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="top|center_vertical"
android:layout_marginStart="-24dp"
android:layout_marginLeft="-24dp"
android:contentDescription="#string/share_quote_button" />
<ImageView
android:id="#+id/imageViewVectorButtonTts"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="bottom|center_vertical"
android:layout_marginStart="-24dp"
android:layout_marginLeft="-24dp"
android:contentDescription="#string/share_quote_button" />
</LinearLayout>
Row.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:layout_gravity="center_vertical"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical">
<TextView
android:id="#+id/textViewFortudeInListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="true"
android:contentDescription="#string/widget_initializing_title"
android:gravity="center_horizontal"
android:text="#string/widget_initializing_title"
android:textColor="#color/black"
android:textSize="16sp" />
<TextView
android:id="#+id/textViewAuthorInListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="true"
android:contentDescription="#string/widget_initializing_title"
android:gravity="end"
android:textColor="#color/black"
android:textSize="16sp" />
</LinearLayout>
I expected that Show ListView get always right height size of ListView as the text size equal. Actually, as it should be.
Thank you
Vojtech, thank you.
I added SystemClock.sleep to the folowing code and It Works.
public RemoteViews getViewAt(int position) {
SystemClock.sleep(50);
RemoteViews views = new RemoteViews(mContext.getPackageName(), R.layout.widget_row);
Again Thanks!

View doesn't reappear after setVisibility(View.GONE)

I have a LinearLayout which I'm trying to make VISIBLE, then GONE, then VISIBLE again. However after making it GONE, it doesn't become visible again. As a note, it works fine if I make it INVISIBLE: it appears and disappears with no problem.
These are my files:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/noconnectionll"
android:visibility="gone"
android:padding="#dimen/node_default_spacing"
android:background="#color/category_no_internet"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="#string/no_internet_short"
android:textColor="#fff"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
<Button
android:id="#+id/no_connection_retry"
android:text="#string/try_again"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ListView
android:dividerHeight="0dp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout
android:id="#+id/spinner_wrapper"
tools:visibility="visible"
android:visibility="invisible"
android:background="#a0ffffff"
android:gravity="center_horizontal|center_vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/spinner"
android:src="#drawable/ic_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="#+id/category_loading"
android:text="#string/loading"
android:textColor="#000"
android:padding="#dimen/activity_padding"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
This is the method I'm using to show/hide:
private void hideOrShowLoading(final boolean show) {
final ViewGroup spinnerWrapper = (ViewGroup)ll.findViewById(R.id.spinner_wrapper);
final View spinner = ll.findViewById(R.id.spinner);
if (show) {
spinnerWrapper.setVisibility(View.VISIBLE); // Not working after being set to GONE previously
final Animation rotation = AnimationUtils.loadAnimation(getContext(), R.anim.rotate);
rotation.setFillAfter(true);
spinner.startAnimation(rotation);
} else {
spinnerWrapper.setVisibility(View.GONE);
spinner.clearAnimation();
}
}
Any tips? Could it have something to do with the ListView above it having a height of 0 and a weight of 1?
Thanks
Update
I also tried the following after the if (show) block, with no luck:
listview.invalidate();
spinnerWrapper.invalidate();
ll.invalidate();
ll.requestLayout();
ll is the LinearLayout that contains both.
While I believe this is caused by the layout_weight=1 property, I wasn't able to properly fix this.
The following hack did work. Basically, I'm surrounding the spinnerWrapper in another linear layout which is always visible.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/noconnectionll"
tools:visibility="visible"
android:visibility="gone"
android:padding="#dimen/node_default_spacing"
android:background="#color/category_no_internet"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:text="#string/no_internet_short"
android:textColor="#fff"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
<Button
android:id="#+id/no_connection_retry"
android:text="#string/try_again"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<ListView
tools:background="#d496d4"
android:dividerHeight="0dp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<!-- Weird bug with layout_weight=1 on the listview above means we need this linearlayout -->
<LinearLayout
android:background="#0ca917"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="#+id/spinner_wrapper"
android:background="#a0ffffff"
android:gravity="center_horizontal|center_vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/spinner"
android:src="#drawable/ic_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="#+id/category_loading"
android:text="#string/loading"
android:textColor="#000"
android:padding="#dimen/activity_padding"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

How to add multiple expandable TextViews

In my layout I made a LinearLayout with multiple ScrollViews in it, it's supposed to hold a FAQs section there, in the Scrollviews I added multiple expandable TextViews.
The problem is when I just have one it works very fine, when I however add a expandable TextView to the second ScrollView, the Activity keeps crashing and design time shows rendering problems here is my layout code commenting out the second expandable TextView would make it work:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignLeft="#+id/linkbot"
android:layout_alignStart="#+id/linkbot"
android:layout_alignRight="#+id/linkbot"
android:layout_alignEnd="#+id/linkbot"
android:layout_above="#+id/linkbot"
android:layout_below="#+id/textView">
<ScrollView
android:id="#+id/faq1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_above="#+id/faq2"
>
<com.ms.square.android.expandabletextview.ExpandableTextView
android:id="#+id/expandable_text_view1"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:animDuration="200"
app:maxCollapsedLines="1"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="#+id/expandable_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
/>
<ImageButton
android:id="#+id/expand_collapse"
android:layout_width="wrap_content"
android:layout_gravity="bottom|end"
android:background="#android:color/transparent"
android:padding="14dp"
android:layout_height="match_parent" />
</LinearLayout>
</com.ms.square.android.expandabletextview.ExpandableTextView>
</ScrollView>
<ScrollView
android:id="#+id/faq2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<com.ms.square.android.expandabletextview.ExpandableTextView
android:id="#+id/expandable_text_view2"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:animDuration="200"
app:maxCollapsedLines="1"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="#+id/expandable_text2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
/>
<ImageButton
android:id="#+id/expand_collapse2"
android:layout_width="wrap_content"
android:layout_gravity="bottom|end"
android:background="#android:color/transparent"
android:padding="14dp"
android:layout_height="wrap_content" />
</LinearLayout>
</com.ms.square.android.expandabletextview.ExpandableTextView>
</ScrollView>
</LinearLayout>
You have in both ScrollView's #+id/expandable_text/#+id/expandable_text2 and #+id/expand_collapse/#+id/expand_collapse2. Just substitute both with #id/expandable_text and #id/expand_collapse respectively and it will work fine.
If you notice on the ExpandableTextView library documentation, it says that TextView and ImageButton ids inside ExpandableTextView must be set to #id/expandable_text and #id/expand_collapse.

Two ListViews in a vertical LinearLayout

I need to arrange two ListViews in a vertical LinearLayout in such a way that 2nd ListView will be at the end of last item of first ListView.
If ListView1 is empty, the view should be something like this.
As ListView1.size() increases ListView2 should be pulled down to a limit.
ListView1 reaches a fixed height (or weight) , it should stop expanding and start scrolling.
I think there is no method in android to set maxHeight for View.
I have already tried almost all combinations of layout_height="wrap_content", fixed heights and weights for both ListViews. In all cases,
either 1st requirement(image1) will fail : ListView1 will not be at top
or last requirement(image3) will fail : ListView2 will get pushed out of the screen.
Any help or suggestions will be appreciated. Thanks in advance.
Edit:
my current code is:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1" >
<ListView
android:id="#+id/myOrderListView"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="0.6" >
</ListView>
<ListView
android:id="#+id/myCompletedOrderListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_weight="0.4" >
</ListView>
</LinearLayout>
I have tried with different weight combinations, like:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1" >
<ListView
android:id="#+id/myOrderListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.6" >
</ListView>
<ListView
android:id="#+id/myCompletedOrderListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_weight="0.4" >
</ListView>
</LinearLayout>
But it will fail last requirement.
Edit2: #dangVarmit
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1" >
<ListView
android:id="#+id/myOrderListView"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
<ListView
android:id="#+id/myCompletedOrderListView"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="20dp" >
</ListView>
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
If you mean this, It still fails req3.
You can find the below code for right and left listview you can change it to above and bottom listview or as you want to show
main_activity.xml
<?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">
<LinearLayout
android:id="#+id/main_top_bit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/orange">
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:orientation="horizontal">
<Button
android:id="#+id/button_1"
style="#style/landscape_top_button"
android:text="button1" />
<Button
android:id="#+id/button_2"
style="#style/landscape_top_button"
android:text="button2"/>
</LinearLayout>
</LinearLayout>
<View android:id="#+id/main_horizontal_bar"
android:layout_height="3dip" android:layout_width="fill_parent"
android:background="#color/gray" android:layout_marginTop="1dip" />
</LinearLayout>
<LinearLayout
android:id="#+id/lower_linear_layout"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="#+id/main_top_bit">
<RelativeLayout
android:layout_below="#+id/lower_linear_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="150dip"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#color/teal"
android:id="#+id/org_left_linearlayout2">
<Button
android:id="#+id/button_3"
style="#style/landscape_top_button"
android:text="button3"/>
<Button
android:id="#+id/button_4"
style="#style/landscape_top_button"
android:text="button4" />
</LinearLayout>
<ListView
android:background="#color/green"
android:id="#+id/lstLeft"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/org_left_linearlayout2"
android:layout_above="#+id/org_left_bottom_rl"
android:cacheColorHint="#00000000"/>
<RelativeLayout
android:id="#+id/org_left_bottom_rl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#color/purple" >
<Button
android:text="button5"
android:id="#+id/button_5"
android:layout_alignParentLeft="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</Button>
</RelativeLayout>
</RelativeLayout>
<View
android:layout_width="3dip"
android:layout_height="fill_parent"
android:background="#color/gray">
</View>
<RelativeLayout
android:layout_below="#+id/lower_linear_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#color/olive"
android:id="#+id/org_right_linearlayout2">
<Button
android:id="#+id/button_6"
style="#style/landscape_top_button"
android:text="button6" />
<Button
android:id="#+id/button_7"
style="#style/landscape_top_button"
android:text="button7" />
</LinearLayout>
<ListView
android:id="#+id/lstRight"
android:background="#color/blue"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/org_right_linearlayout2"
android:layout_above="#+id/org_right_bottom_rl"
android:cacheColorHint="#00000000"/>
<RelativeLayout
android:id="#+id/org_right_bottom_rl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#color/red"
android:layout_alignParentBottom="true">
<Button
android:text="button8"
android:id="#+id/button_8"
android:layout_alignParentRight="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</Button>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
MainActivity.java
public class MainActivity extends Activity {
private final String TAG = this.getClass().getName();
ListView leftList;
ListView rightList;
static final String[] FRUITS = new String[] {"Apple", "Bananna", "Cherry", "Pear", "Strawberry"};
static final String[] VEGETABLES = new String[] {"Asparagus", "Bamboo shoots", "Celery", "Ginger", "Spinach"};
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
leftList = (ListView) findViewById(R.id.lstLeft);
rightList = (ListView) findViewById(R.id.lstRight);
populateLeftList();
populateRightList();
}
public void populateLeftList(){
leftList.setAdapter(new ArrayAdapter<string>(this, android.R.layout.simple_list_item_1, FRUITS));
}
public void populateRightList(){
rightList.setAdapter(new ArrayAdapter<string>(this, android.R.layout.simple_list_item_1, VEGETABLES));
}
}
for list1, layout_height=wrap_content, remove layout_weight
for list2, layout_height=100dp (any fixed value), remove layout_weight
add <Space layout_weight=1 layout_height=0dp/> at the end of the list.
that should give you the results you are looking for.
I have found one solution by myself. It works perfectly as i wanted. I dont know whether it is a good approach or not. I am searching for an xml solution.
getDeviceHeight() is my method to find device height in pixels.
200 is the approximate height of other ui elements above My ListViews.
myorderList is my first ListView
if(myorderList.getHeight() > ((getDeviceHeight()/2) - 200)) {
LayoutParams params = myorderList.getLayoutParams();
params.height = (int)((getDeviceHeight()/2) - 200);
myorderList.setLayoutParams(params);
}
This should be done when there is any kind of changes happening to the first ListView.
Edit:
This will also fail when items removed after reaching maximum height :-(

Can not arrange two listview with some other widgets in one layout in android

I have 4 textview and two listview and I want them in one RelativeLayout. But the problem is that first listview takes whole screen and its below views will be hidden.
How can I arrange them correctly so that first listview takes half of screen and another takes the other half ?
This is how it look likes:
And this is my xml :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/baseLayerText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_alignParentTop="true"
android:gravity="right"
android:text="#string/baseLayers" />
<TextView
android:id="#+id/baseLayerLine"
android:layout_width="match_parent"
android:layout_height="2dip"
android:layout_below="#+id/baseLayerText"
android:background="#FF00FF00" />
<ListView
android:id="#+id/baseLayerList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/baseLayerLine" >
</ListView>
<TextView
android:id="#+id/overlayLayerText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/baseLayerList"
android:layout_gravity="right"
android:gravity="right"
android:text="#string/overlayLayers" />
<TextView
android:id="#+id/overlayLayerLine"
android:layout_width="match_parent"
android:layout_height="2dip"
android:layout_below="#+id/overlayLayerText"
android:background="#FF00FF00" />
<ListView
android:id="#+id/overlayLayerList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/overlayLayerLine"
android:layout_alignParentBottom="true" >
</ListView>
</RelativeLayout>

Categories

Resources