i'm building custom dialog box application. while doing so, ok , cancel buttons going right bottom of view i.e. bottom edges of dialog box. how can pull these little there slight gap between buttons , bottom edge of dialog box. xml code follows:
<textview android:id="@+id/settingsview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:layout_margintop="18dp" android:text="select settings" /> <radiobutton android:id="@+id/onemin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/settingsview" android:layout_below="@+id/settingsview" android:layout_margintop="14dp" android:text="@string/radio_one" /> <radiobutton android:id="@+id/twomin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/onemin" android:layout_below="@+id/onemin" android:text="@string/radio_two" /> <radiobutton android:id="@+id/tenmins" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/twomin" android:layout_below="@+id/twomin" android:text="@string/radio_three" /> <button android:id="@+id/set" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignright="@+id/onemin" android:layout_below="@+id/tenmins" android:layout_marginright="54dp" android:layout_margintop="30dp" android:background="@drawable/custom_btn_livid_brown" android:text="@string/submit_btn" /> <button android:id="@+id/cancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbaseline="@+id/set" android:layout_alignbottom="@+id/set" android:layout_torightof="@+id/twomin" android:background="@drawable/custom_btn_livid_brown" android:text="@string/cancel" />
have tried using gravities? solution when have trouble positioning widgets.
basically, need parent "container" buttons in , position them changing gravities within container widgets.
vogella has tutorial topic!!
Comments
Post a Comment