title: Android - List view with single choice radio buttons
body: <p>I have a list view with 2 radio button items. When inflated it from a layout, it is happening to be scrollable even if there is a lot of space as shown below.<img src="https://i.stack.imgur.com/kCOip.png" alt="enter image description here">
  As shown in screenshot, I have 2 radio buttons. 
  1. Distance
  2. Rating</p>
  
  <p>But the "rating" radio button is not visible and I have to scroll to see it. Why is this happening. I tried to setting the layout height to wrap content, fill parent and match parent. But that didn't solve the problem. Any idea why is this happening?</p>
  
  <p>here i am referencing the list view :</p>
  
  <pre><code>ListView radio_list = (ListView) view.findViewById(R.id.RadioList);
  radio_list.setAdapter(new ArrayAdapter&lt;String&gt;(this,
                  android.R.layout.simple_list_item_single_choice,
                  radio_list_items));
  
  radio_list.setItemsCanFocus(true);
  radio_list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  </code></pre>
  
  <p>my xml:</p>
  
  <pre><code>&lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical" &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent" &gt;
  
              &lt;TextView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="#ffffff"
                  android:paddingLeft="10dp"
                  android:text="SEARCH"
                  android:textColor="#FF3300"
                  android:textSize="20dp" &gt;
              &lt;/TextView&gt;
          &lt;/LinearLayout&gt;
  
          &lt;RelativeLayout
              android:id="@+id/searchTextLayout"
              android:layout_width="match_parent"
              android:layout_height="50dip"
              android:layout_alignParentLeft="true"
              android:layout_alignParentTop="true"
              android:layout_marginBottom="20dip"
              android:layout_marginLeft="20dip"
              android:layout_marginRight="20dip"
              android:layout_marginTop="20dip"
              android:orientation="horizontal" &gt;
  
              &lt;ImageButton
                  android:id="@+id/searchTextButton"
                  android:layout_width="wrap_content"
                  android:layout_height="match_parent"
                  android:layout_alignParentLeft="true"
                  android:background="#685E5C"
                  android:contentDescription="Sample"
                  android:scaleType="fitCenter"
                  android:src="@drawable/abs__ic_search" /&gt;
  
              &lt;EditText
                  android:id="@+id/searchText"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_toRightOf="@id/searchTextButton"
                  android:background="@drawable/background_black_border_full"
                  android:padding="8dp"
                  android:textColor="@android:color/white" /&gt;
          &lt;/RelativeLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent" &gt;
  
              &lt;TextView
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="#ffffff"
                  android:paddingLeft="10dp"
                  android:text="SORT BY"
                  android:textColor="#FF3300"
                  android:textSize="20dp" &gt;
              &lt;/TextView&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content" &gt;
  
              &lt;ListView
                  android:id="@+id/RadioList"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                 /&gt;
          &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>