Don
Don

Reputation: 21

Android: Need help setting view alignment in code

I basically want to have several views aligned with each other using a relative layout. I can do so using xml, but unfortunately I can't find any documentation that tells me what methods I need to call to get the same effect in code (All the examples and things just use xml). Since the imageviews are being made dynamically xml isn't an option for what I want to do. I've looked at layoutparameters which seems to let me change some options, but I'm not seeing a method that will let me change alignment relative to another view. Any help is appreciated.

Upvotes: 0

Views: 467

Answers (2)

Don
Don

Reputation: 21

After playing around with it some more found that addRule is the method I need. Couldn't find it because I was looking for something with the term alignment in it.

Upvotes: 1

Related Questions