Jump to content
  • Advertisement
Sign in to follow this  

How do you get the position of buttons from the XML file?

This topic is 638 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to get the position of image buttons. I'm going to programmically add images instead of doing so in the XML file. There is another major problem I need to address. Inside of the XML my buttons are placed relative to a parent. Even if I positioned my asset where the buttons are and their size was correct I would still need to space them correctly inside my HorizontalScrollView . Is there any way to specify layout_margin as a percentage of the parent instead of in dp?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!