This is what am trying to accomplish. A textView and beneath that a radioButton group in which radioButtons are added programmatically. Am able to get only the radioButton group displayed with radioButtons and not the textView. radioButton group is taking up all the space in layout and textView is invisible.
I have looked into numerous posts on stackoverflow.com on formatting and displaying in layout but still could not figure where am making the mistake.
Could you please help me with the issue?
<?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"
android:orientation="horizontal" >
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
<TextView
android:id="@+id/sample"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginBottom="20dp"
android:layout_marginTop="20dp"
android:background="@color/black"
android:gravity="center"
android:text="@string/sample"
android:textColor="@color/white" />
<RadioGroup
android:id="@+id/radio_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical" >
</RadioGroup>
</RelativeLayout>
Adding XML that is working as expected for posterity