I made an activity in java that creates a relative layout and 2 views, and I want to arrange them one below the other in the middle of the screen, but I can't find any of the xml orders in java at android.com. thanks
Asked
Active
Viewed 366 times
1 Answers
0
you can arrange(front or back) layout views through layout xml itself see this link Animate listview from back of layout

Community
- 1
- 1

Mohammed Azharuddin Shaikh
- 41,633
- 14
- 96
- 115
-
I know but I want to arrange them through the Activity, not an xml file – Someonation Dec 26 '11 at 12:08
-
samething can be done in Activity too, view.addview(bottom), view.addview(middle), view.addview(top). In short newly added view is at the top – Mohammed Azharuddin Shaikh Dec 26 '11 at 12:16
-
when I use add view they go one above the other, how do I tell the second one to align below the first? – Someonation Dec 26 '11 at 12:23
-
Use Relative layout, or can use linearlayout by setting orientation property to VERTICAL – Mohammed Azharuddin Shaikh Dec 26 '11 at 12:27
-
i am using relative, and i'm adding them one after an other via addView, i'm adding them to the layout with addView – Someonation Dec 26 '11 at 12:30
-
see concept of layoutparams you will get you know how to align – Mohammed Azharuddin Shaikh Dec 26 '11 at 12:52
-
1http://stackoverflow.com/questions/2305395/laying-out-views-in-relativelayout-programmatically – Mohammed Azharuddin Shaikh Dec 26 '11 at 12:57