Reputation: 60859
I have a button inside of a LinearLayout that is oriented vertically. Not sure why the button doesn't show up?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical">
<com.commonsware.cwac.tlv.TouchListView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tlv="http://schemas.android.com/apk/res/org.stocktwits.activity"
android:id="@android:id/list"
android:layout_width="fill_parent"
android:drawSelectorOnTop="false"
tlv:normal_height="64dip"
tlv:grabber="@+id/icon"
tlv:remove_mode="slideRight"
android:layout_height="wrap_content"/>
<Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
</LinearLayout>
Upvotes: 2
Views: 1071
Reputation: 1006574
android:height="wrap_content"
has no meaning for vertically-scrollable widgets like ListView
. Use android:layout_weight
with your LinearLayout
or a RelativeLayout
to achieve whatever look you are trying to achieve.
Upvotes: 1
Reputation: 100358
Try adding this to your LinearLayout:
android:layout_width="fill_parent"
android:layout_height="fill_parent"
I'm guessing the layout is just not showing?
Upvotes: 1