How to provide spacing between android Radio Buttons of Vertical orientation -


i got scenario need provide spacing between radio buttons arranged vertically.
below layout:

<?xml version="1.0" encoding="utf-8"?>  <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"      android:layout_width="match_parent"      android:layout_height="wrap_content"      android:orientation="vertical"       android:paddingleft="20dp"      android:paddingstart="20dp"      android:paddingright="20dp"      android:paddingend="20dp"     >        <textview          android:id="@+id/textview1"          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:text="my text view"          android:textsize="20dp"          android:textcolor="#000000"          android:gravity="center_vertical"          android:background="@drawable/roundedlabel"         />        <radiogroup          android:id="@+id/radiogroup1"          android:layout_width="152dp"          android:layout_height="wrap_content"          android:paddingtop="10dp"          >            <radiobutton              android:id="@+id/radio0"              android:layout_width="wrap_content"              android:layout_height="wrap_content"              android:text="text view1"               android:textsize="20dp"               android:paddingtop="10dp"                 />            <radiobutton              android:id="@+id/radio1"              android:layout_width="wrap_content"              android:layout_height="wrap_content"              android:textsize="20dp"              android:text="text view2"              />          <radiobutton              android:id="@+id/radio2"              android:layout_width="wrap_content"              android:layout_height="wrap_content"              android:textsize="20dp"              android:text="text view3"                             />            <radiobutton              android:id="@+id/radio3"              android:layout_width="wrap_content"              android:layout_height="wrap_content"               android:textsize="20dp"               android:text="text v4iew"               />      </radiogroup>          </linearlayout>


tried put android:paddingtop="10dp" each of radio button takes text bottom, radio button remains on same position.
can me how provide spacing between radio buttons arranged in vertical orientation?

try using layout_margin attribute, works padding, may have effect want. can use android:layout_margin="20dp" or can set individual sides, can padding (ex: android:layout_marginleft="20dp").


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -