jj wrote:
> is there a way of placing UI components (EditText, Button, etc..) in a
> specific place of the screen?
> (apart from the xml code, I want to do this programatically)

You can create widget objects:

Button btn1=new Button(this);

and add them to containers (subclasses of ViewGroup, like LinearLayout).

The add() method on containers usually takes a LayoutParams structure, 
where you can specify the details that, in XML, you might express via 
layout_ attributes (e.g., android:layout_gravity).

You can also inflate a widget, or a tree of widgets, from XML through 
the use of LayoutInflater, allowing you to describe the widgets in XML 
but still control when they get created and how they get used from Java.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to