Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Crystal Ball Mod Advice

ok i have another question (wasnt sure if i should start a new post)

so im up to here... "Android Development > Build a Simple Android App > Pretty Little Things > Positioning Text Using a Linear Layout"

now ill admit im straying from the original design, im using a different picture and the crystal ball is smaller and slightly to the left bottom of the screen

how do i position the text,layout,view etc if i dont want it central

(btw ive seen the next section on animation and im happy i can create a new anim to go with it)

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Copying from other thread:


Cool - glad you're experimenting!

So we are using a RelativeLayout, meaning that everything inside needs to be relative to the layout borders or something else inside the layout. What you probably want to set first are the "layout alignment" properties. Select the TextView or whatever in the Graphical Layout editor, and then in the Properties pane, expand "Layout Parameters." There are a group that begin with "Align" that allow you to align to the parent (the RelativeLayout itself) or to other items by their IDs.

You can also center and set margins by expanding "Margins" to hopefully get things right where you want them.

For a full list of parameters you can look at the documentation for RelativeLayout.

If this isn't enough information, post more specific questions in here and I or other members can hopefully help.

Thanks for the reply on this and the other thread. Ill have a play :)