Solved

Android app side by side controls

Posted on 2014-11-25
4
339 Views
Last Modified: 2014-11-25
I am very new to android development and I am doing my first app. I would like to place a textbox (numeric) and radiobox  controls side by side (see the attachment) - how do I do that. Every time I drop a control onto the page it wants to put it in the same location as the previous control
siidebyside.png
0
Comment
Question by:r3nder
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Chris Harte earned 250 total points
ID: 40464481
You are going to have to manually code your xml layout files. (I assume you are using the graphics editor).

http://developer.android.com/guide/topics/ui/declaring-layout.html

Post the contents of your xml so we can check you are not doing anything obviously wrong.
0
 
LVL 6

Author Comment

by:r3nder
ID: 40464513
thank you MunterMan - I will post the code when I get home
0
 
LVL 9

Assisted Solution

by:BobHavertyComh
BobHavertyComh earned 250 total points
ID: 40464702
Put these things inside of a LinearLayout and set android:orientation="horizontal". Then adjust the margins, padding etc....for the controls you put inside to control spacing. If you have more than these controls or you will have more, put the LinearLayout that has a horizontal orientation inside of a LinearLayout with a vertical orientation. This way you can keep adding LijnearLayouts with horizontal orientation to the wrapping LinearLayout that has a vertical orientation so that you can stack your horizontal linearlayouts one on top of the other within your vertical linearlayout.
0
 
LVL 6

Author Closing Comment

by:r3nder
ID: 40466074
thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now