I embedded RelativeLayout in a LinearLayout, but can't see widgets in LinearLayout
This is the XML Code. The problem is that I can't see the textView tvDisplayName, although I don't get any errors. Why is this?
Thanks for your help?
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/llLinear"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:id="@+id/rlRel">
<TextView
android:id="@+id/tvName"
android:text="Name:"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"/>
<EditText
android:id="@+id/etName"
android:text="Enter Name Here"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tvName"
android:layout_alignBaseline="@id/tvName">
</EditText>
<Button
android:id="@+id/btnOK"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Okay"
android:layout_below="@id/etName"
android:layout_alignRight="@id/etName">
</Button>
<Button
android:id="@+id/btnCancel"
android:text="Cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/btnOK"
android:layout_alignBottom="@id/btnOK"/>
</RelativeLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tvDisplayName"
android:text="Test">
</TextView>
</LinearLayout>
Re: I embedded RelativeLayout in a LinearLayout, but can't see widgets in LinearLayou
XML is correct but maybe you have a problem with Relative Layout Height =wrap content
Has your device screen enough space to show Relative Layout Compnents + TextView?