I was making a layout that horizontally displays a checkbox, twolinelistitem which vertically consists of two textviews, textview, and lastly a radiobutton which must be on the most right edge.
However, when I finished it, somehow radiobuttons are placed more down than it should be and I have no idea how to figure out. I changed the main layout to tablelayout but nothing changed. If you don’t mind, would you please help me to solve this? Below is my code and screenshot to show what happened.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox android:layout_height="wrap_content" android:layout_width="wrap_content"
android:id="@+id/checkBox1" />
<TwoLineListItem android:id="@+id/twoLineListItem1"
android:layout_weight="1"
android:paddingTop="10px"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:id="@+id/textView1"
android:text="TextView"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView android:id="@+id/textView2"
android:text="TextView"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:paddingTop="30px"/>
</TwoLineListItem>
<TextView android:text="TextView"
android:id="@+id/textView3"
android:layout_weight="1"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:paddingTop="10px"/>
<RadioButton android:id="@+id/radioButton1"
android:gravity="right"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
And this is the screenshot that contains a problem:http://img684.imageshack.us/img684/3979/1134p.jpg
Thanks in advance
Put these 2 lines to the radioButton Tag