简体   繁体   中英

Resize PSD for Android Layout

I'm trying to make an Android app based on iOS PSD file. After reading few documentation on the internet, I decided to create just 3 layout for my Android app : MDPI, HDPi, XHDPI only. I won't build my app for LDPI.

now, the question is...

can I keep the grey box dimension, for example 30x30 px. then, when user's device is HDPI or XHDPI it will shows more grey box instead of resizing the grey box into several dimension : 45x45 (HDPI) or 60x60 (XHDPI). which at the end, user still see 3 grey box on large screen resolution.

can it be done in android? thanks

在此输入图像描述

I think you just need to put the same image in MDPI, HDPI and XHDPI. Then the image stays the same size and you have more space to put more grey boxes inside screen. If you want more grey boxes you need to put that in code. Look over here for how to get screen sizes: https://stackoverflow.com/a/1016941/2767703

//use 40 for extra space between grey boxes
for(int i = 0; i < screensize/40; i++)
{
    placeBox((i*30) + 10, y);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM