Can you post your layout files? Are you using dips in your layout files? Mark On Jul 1, 2016 7:02 PM, "Bob B." <[email protected]> wrote:
> I have been reading over this information, forums, developer site, etc. > for the past week and still have been unsuccessful in fully understanding > how to size images such that things appear acceptable on different sized > devices. Certainly there is something I am missing, as this can't be that > difficult, can it? If someone could please point me in the right > direction, I would be ever so grateful. > > I am using qualifiers on the drawable and layout folders in an attempt to > handle the various screen sizes and densities. > > I have created drawable-ldpi, drawable-mdpi, drawable-hdpi, and > drawable-xhdpi > I have created layout-w320dp, layout-w480dp, layout-w600dp, and > layout-w720dp > > I have placed a copy of the layout I am dealing with in each of the layout > folders so I can adjust each as needed. > > I have placed my graphics that I am testing with in their respective > drawable folder. > > I initially designed my app using a Galaxy Tab 10" and scaled my graphics > (png) files in GIMP with a dpi of 320 and sized to fit how I wanted them to > look in the 10" environment. > > I then took the original graphic (unmodified) that was used for the > previously mentioned image and made the mdpi version by changing the dpi to > 160 and setting the pixel width/height to 1/2 of the previously mentioned > image. > > For the rest, I followed the information from the design guide of... > > ldpi = .75 of the mdpi > hdpi = 1.5 of the mdpi > With the first image created being the xhdpi > > Question 1: Should you scale all images such that the following are true, > regardless of the dimensions of each image? > > - ldpi images should always be 120dpi > - mdpi images should always be 160dpi > - hdpi images should always be 240dpi > - xhdpi images should always be 320dpi > > Here is an example of what I have done and what specifically is not > working. > > I have a logo that is 400 x 400 and has a dpi of 320. This image looks > beautiful on my tablet and the image file resides in the xhdpi folder > I then took a copy of this image and scaled it to 200 x 200 with a dpi of > 160 for my mdpi version and placed the file in the mdpi folder. > When viewing a 10" device in Android Studio, it looks great > When viewing a phone 3-4" device in Android Studio, the logo in HUGE! > > My goal is basically this. > > If I have an image that takes up exactly 1/4 of my screen on a tablet in > the lower left corner, I want that image to take up the same 1/4 of the > screen on the smaller devices, not be huge, taking up pretty much the > entire screen. > > Question 2: I thought Android was supposed to down-sample the images of > larger than what was needed so it would essentially scale things down for > me, with a better goal of providing assets that are close to where they > should be, which is what I am attempting to do. Is this not the case? > > There has to be some formula / step that I am simply missing here so if > anyone could shed some light on this for me, I would greatly appreciate it. > > Thank you all! > > Bob > > > -- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/android-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/android-developers/390111ec-3b70-4668-8d35-a688a974fe26%40googlegroups.com > <https://groups.google.com/d/msgid/android-developers/390111ec-3b70-4668-8d35-a688a974fe26%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/CAEqej2NJASgA7qZ0iEgyrFqDFCuDEiOwciOm0qatp8sp_9yxRg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

