At present the resolution of Android wear devices is:
280x280 or
320x320
Does anyone know if you should have graphics for both the screen sizes and place them under the hdpi and xhdpi folders?
Also is there a way to auto scale down your images from 320x320 so that they work on a 280x280 device?
Thanks!
hdpi should be all that you need, all watches are a hdpi density
I would create background images at 320x320 and android will automatically scale them down to 280x280 if needed.
You will need to watch out for round devices, as they are 320x320 but the corners will be cut off
Related
I have a picture and want to use it as the app icon for my android app. I use the ImageAsset in Android Studio to create multiple icons for different phones, so I only need one picture.
My picture turned out too small (144px x 144px) and I cannot find information about the sizes on the developer pages.
Who can help me with this question?
"512 x 512 pixel image [is] appropriate for the Google Play store"
To start Image Asset Studio, follow these steps:
In the Project window, select the Android view.
Right-click the res folder and select New > Image Asset.
Continue by following the steps to:
If your app supports Android 8.0, create adaptive and legacy launcher icons.
If your app supports versions no higher than Android 7.1, create a legacy launcher icon only.
Create an action bar or tab icon.
Create a notification icon.
for more detail
Use App Icon Creater from Android Studio. Go to File -> New -> Image Asset and select Launcher Icons
1/ The suitable place to but app launcher icons is mipmap folder, not drawable like other images. According to this answer, images in the mipmap folder use different resolutions from the device’s current density.
My ic_launcher in mipmap-xxhdpi is also 144x144 but it still looks good on my device
2/ Check your source image when creating an app logo with Image Asset tools. Use a high-resolution image for better result. I used a 512x512 image
I would create separate images for each one:
LDPI should be 36 x 36.
MDPI should be 48 x 48.
TVDPI should be 64 x 64.
HDPI should be 72 x 72.
XHDPI should be 96 x 96.
XXHDPI should be 144 x 144.
XXXHDPI should be 192 x 192.
Then just put each of them in the separate stalks of the drawable folder.
You are also required to give a large version of your icon when uploading your app onto the Google Play Store and this should be WEB 512 x 512. This is so large so that Google can rescale it to any size in order to advertise your app throughout the Google Play Store and not add pixelation to your logo.
Basically, all of the other icons should be in proportion to the 'baseline' icon, MDPI at 48 x 48.
LDPI is MDPI x 0.75.
TVDPI is MDPI x 1.33.
HDPI is MDPI x 1.5.
XHDPI is MDPI x 2.
XXHDPI is MDPI x 3.
XXXHDPI is MDPI x 4.
This is all explained on the Iconography page of the Android Developers website:
http://developer.android.com/design/style/iconography.html
196 is a right side of android icon,create 196 icon side and create multiple images.
i'm developing an app to manipulate image taken by camera in real time. Though when i run the same code in android studio emulator i get the colors i need. Though when i do it in real device the colors are shifted.
for example Dark blue in emulator is slightly lighter. Red in emulator is lighter in real device. i tried it in several real devices. In all cases colors are lighter than expected.
Why this is happening?? Is there any differences in webcam in a laptop which emulator pickup the image and real device cameras??
How can i make the colors same as the images in webcam pictures in emulator?
Found an answer for my issue. Just needed to adjust the contrast of my laptop's webcam. All working as expected.
I'm trying to understand multi-screen support in android. Yes I read the documentation, but still have few questions.
As I understand i need to create drawables for each density, but what to do with text size?
I want to set title on my activity which will fit any screen (need to big big enough and don't warp the text)
I test in on my Nexus7 (large screen) and it looks good with android:textSize="100dp"'
When i launch it on emulator with 'normal screen' size i get very big text.
So is it right solution to make layouts for each screen size?
'layout'
'layout-large'
'layout-small'
....
and just make android:textSize="70dp" for normal screen and android:textSize="50dp" for small screen?
And another one question how to test all this in more efficient way?
I need to create emulators with? Where to get parameters with which create emulators to get this results?
XLarge screen
ldpi
mdpi
tvdpi
hdpi
xhdpi
Large screen
ldpi
mdpi
tvdpi
hdpi
xhdpi
Medium screen
ldpi
mdpi
tvdpi
hdpi
xhdpi
Small screen
ldpi
mdpi
tvdpi
hdpi
xhdpi
For text size you should use sp units. Docs say:
Scale-independent Pixels - This is like the dp unit, but it is also
scaled by the user's font size preference. It is recommend you use
this unit when specifying font sizes, so they will be adjusted for
both the screen density and the user's preference.
As I understand i need to create drawables for each density, but what to do with text size?
As WebnetMobile indicates, you start by using sp, as this takes the user's choice of font scale into account. However, you may need more than that.
So is it right solution to make layouts for each screen size?
I would recommend using dimension resources, with different definitions for the text size dimension as needed for your different scenarios.
Where possible, though, design your UI to be more flexible about font sizes. Again, if you use sp, the user can change the size of the text on Android 4.0+, to make it bigger or smaller, to help them read the text on their device. Hence, you cannot assume that you are in complete control over the size of the font, and therefore need to design accordingly. This is not significantly different than designing a Web site that takes into account users' adjustments to font size in their browser.
And another one question how to test all this in more efficient way? I need to create emulators with?
You will need emulators or devices for whatever scenarios concern you.
Where to get parameters with which create emulators to get this results?
On the (now-current) R21 versions of the tools, you set the screen size and density in the Device Definitions tab of the AVD Manager, then create AVDs based upon those definitions as needed.
Inorder to test in different screens and density you can create emulators with different combinations. When we create the emulator device we can set the Density (Abstracted LCD density under hardware).
ldpi - 120
mdpi - 160
hdpi - 240
xhdpi - 320
You can set the screen size also while start the emulator
I'm having a weird problem. I have been testing my app with hdpi resources up until recently. My designer sent over some mdpi assets and now my application is defaulting to the mdpi assets. How can I make sure the hdpi assets are being used for my phone?
your device was defaulting to the hdpi graphics because there were no other graphics available. but since you now added mdpi, your phone has a choice between the 2 and it will choose the most compatible for the device. you can't force your application to use HDPI unless you only supply the HDPI graphics
You cant, the hdpi, mdpi etc are handset attributes. If you design the app correctly you will have an asset hierarchy that will address all screen densities. So I recommend that you focus on that.
To elaborate, for a robust android app, you will have resources in hdpi, mdpi, ldpi and xdpi folders, maybe even ndpi folders, all based on a well defined asset heirarchy. You can read more about it here.
At the moment I have just targeted my UI graphics for the hdpi resolutions for android and this works flawlessly, the graphics are designed with 3 resolutions in mind with only the background image being altered really. Problem is the plan was to use the same images for hdpi (480x800 and 480x854) and as well as mdpi (320x480). But when I test it for mdpi with the images in both the -hdpi and copied into -mdpi it doesn't scale them down, do I have to resize all the images and have them duplicated for the mdpi screens?
Sorry if this is not very eloquent it is the first time I have done any UI design for android and still don't understand it properly.
Android should correctly use the right image when you use R.drawable and your images are in drawable-hdpi, drawable-mdpi etc. Since that is what I think you've described as what you've done, it hints that maybe you've hardcoded a size? Are you using ImageView and set a size for them? If so, did you do it in Java code or in XML? If in Java code the values would be in pixels, so 50px on mdpi screens will look larger than on hdpi screens. If you used XML did you again set a size with px? If so, you should use dp.