Wednesday, 18 September 2013

XML view with relative percentages

XML view with relative percentages

I've been creating Android apps for well over 2 years, I've created games
and animated live wallpapers as well as using some basic XML to create
some settings. I've mainly used my own custom views written in JAVA using
the canvas class. Now I want to move across to XML views because of the
speed of development it offers.
Anyhow, I'm trying to figure out how to create an Android XML view using
percentages of the screen instead of DP.
Link to what I'm trying to say:
http://imgur.com/FZemLXy
What would be the best way of doing this? And can someone give me an
example? It needs to have the same percentages on every screen it's
displayed on.

No comments:

Post a Comment