Every widget has a method called setGravity.
http://developer.android.com/reference/android/widget/TextView.html#setGravity%28int%29

On Thu, Oct 7, 2010 at 12:42 AM, Sables <[email protected]> wrote:

> Hi,
> I can't seem to find anywhere a way to programmatically change the the
> alignment of the button.
>
> In the XML it is simply  layout_gravity="Center" or something.
>
> How do we do this in the code?
>
> LayoutParams do not seem to cater for this.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to