{Dynamic} Layout_Gravity for a button

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

{Dynamic} Layout_Gravity for a button

Postby Furaimeru » Mon Feb 08, 2010 9:23 pm

Hey

I am confused :)

I can't find the method to change the gravity of a Button to be on the right side.

I know that the XML-Element layout_gravity has to be set to "right", but how to solve this Dynamically?

Button now
I[BT]........I
Should be there dynamically
I........[BT]I


I hope on answers,
Fuu
Furaimeru
Freshman
Freshman
 
Posts: 2
Joined: Sun Feb 07, 2010 8:48 pm

Top

Postby Furaimeru » Sun Feb 14, 2010 9:47 pm

no way? =/
Furaimeru
Freshman
Freshman
 
Posts: 2
Joined: Sun Feb 07, 2010 8:48 pm

Postby pskink » Mon Feb 15, 2010 10:15 am

you should use one subclass of http://developer.android.com/intl/de/re ... arams.html

probably LinearLayout.LayoutParams
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests