Android layouts - images for the different screen resolutions and the same density -


i want show images on background image. background image contains empty squares, , want show apple image must appear in 1 of squares. have problems apple sizes, background scales , fits screen, apple image stays same different resolution , same density devices.

say have 2 ldpi devices 240x320 , 480x800 resolutions. when keep drawable aple file in drawable-ldpi folder, , use wrap_content height , width (or fixed dp values) 2 devices draw apple same size, described in documentation.

the linearlayout works slow when stack them. using relaytivelayout must programmatically resize images "not good" solution guess.

i've found solution here https://github.com/intuit/sdp maps dp-s.

they set dimen-s values-sw300dp be

<dimen name="_10sdp">10.00dp</dimen> 

and values-sw480dp be

<dimen name="_10sdp">16.00dp</dimen> 

and on different cases ...

so when set of apple _10sdp means different dp-s 2 devices same density , solves problem. solution seems me? there other easy ways?

this indeed recommended solution see in iosched github repository source of knowing whether desired common practice @ least according google since know spend lot of time create code reflect best practices , obtain new apis


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -