What to use in this case?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

What to use in this case?

Postby navajo » Mon Jun 29, 2009 10:38 am

Hi,
I need 4 radio_buttons in 1 radio_group. Would like to layout them like this:

___________ ____________
|RadioButton1| | RadioButton2|

___________ ____________
|RadioButton3| | RadioButton4|

How can i achieve this? Dont want to use RelativeLayout if there is another way to solve this.

Thanks,
navajo
In a world without walls and fences... who needs Windows and Gates?
navajo
Junior Developer
Junior Developer
 
Posts: 15
Joined: Fri Dec 21, 2007 5:55 pm
Location: Germany

Top

Postby KillaChaos » Mon Jun 29, 2009 8:43 pm

Two horzintal linear layouts nested in a vertical linear layout
KillaChaos
Freshman
Freshman
 
Posts: 6
Joined: Mon Jun 22, 2009 10:30 pm

Postby navajo » Mon Jun 29, 2009 9:05 pm

I tried that before but then RadioButtons dont belong to same RadioGroup.
In a world without walls and fences... who needs Windows and Gates?
navajo
Junior Developer
Junior Developer
 
Posts: 15
Joined: Fri Dec 21, 2007 5:55 pm
Location: Germany

Postby Fluckysan » Wed Jul 01, 2009 8:55 am

What about a GridView ?
Fluckysan
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Jul 01, 2009 7:57 am

Postby Billaferd » Thu Jul 02, 2009 3:38 am

I think a GridView needs to be bound to some data. But I think a TableLayout might do the trick. You should be able to nest it within a RadioGroup layout.
Billaferd
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Jul 02, 2009 3:32 am
Location: Canada

Postby shishir.bobby » Thu Jul 02, 2009 11:20 am

try this.........hope this will help u


<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
android:id="@+id/widget0"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<RadioButton
android:id="@+id/widget28"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton"
android:layout_x="40px"
android:layout_y="102px"
>
</RadioButton>
<RadioButton
android:id="@+id/widget29"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton"
android:layout_x="167px"
android:layout_y="103px"
>
</RadioButton>
<RadioButton
android:id="@+id/widget30"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton"
android:layout_x="44px"
android:layout_y="176px"
>
</RadioButton>
<RadioButton
android:id="@+id/widget31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RadioButton"
android:layout_x="169px"
android:layout_y="174px"
>
</RadioButton>
</AbsoluteLayout>
shishir.bobby
Experienced Developer
Experienced Developer
 
Posts: 76
Joined: Thu Apr 09, 2009 11:41 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests