Splash Screen in Android/PhoneGap local build is condensed - android

The Splash screen is being condensed for some reason. The sizes I currently have are correct at so this leads me to think it has to do with something related to the xml files. Can someone help?
LDPI:
Portrait: 200x320px
MDPI:
Portrait: 320x480px
HDPI:
Portrait: 480x800px
XHDPI:
Portrait: 720px1280px
Here are screenshots of the condensed/error version (on Left and captured on Samsung s4) and the correct version (on right and captured on Nexus 7):

Splash Screens for the Android Platform :-
Place 9-patch image files in the Android project's platforms/android/res/drawable* directories.
The size for each should be:
xlarge (xhdpi): at least 960 × 720
large (hdpi): at least 640 × 480
medium (mdpi): at least 470 × 320
small (ldpi): at least 426 × 320
Refer Phonegap Document

Related

Allocated Memory (RAM) in Android Studio. Is it normal?

I have created an Android application that contains 6 imageviews, and some texts.. the size of the APK file is about (2 Megabyte). When I run the application of a real Android Device (HTC One M8-eye) it takes about (66 MegaByte) RAM of the device (Allocated Memory).
I also used (leakcanary), and the result is (there is no leak) in this app.
Is it normal?
is there any suggestions to reduce this size??
Any answer is appreciated..
Thanks
This problem can be solved by creating different drawable folders (LDPI, MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI).
I also used the (android drawable importer plugin) to import photos and generate different sizes and put them to different drawable folders.
Following are some important information:
LDPI: Portrait: 200 X 320px. Landscape: 320 X 200px.
MDPI: Portrait: 320 X 480px. Landscape: 480 X 320px.
HDPI: Portrait: 480 X 800px. Landscape: 800 X 480px.
XHDPI: Portrait: 720 X 1280px. Landscape: 1280 X 720px.
XXHDPI: Portrait: 960 X 1600px. Landscape: 1600 X 960px.
XXXHDPI: Portrait: 1280 X 1920px. Landscape: 1920 X 1280px.
The Result:: Used ammount of RAM is reduced from 60 Mega to about 13 Mega.

Slices for Android Device (Samsung Galaxy S4-xxhpi)?

Samsung Galaxy S4 resolution is of 1080 x 1920. I made a PSD of this size and did slicing.
After slicing, I put these into my project and coded something like this for ImageView.
<ImageView
android:id="#+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center_horizontal"
android:src="#drawable/logo" />
Even when I run, it shows too big in my Android device.
I little studies over internet and found that it must divide it with 3, to get
1080 / 3 = 360 dp
1920 / 3 = 640 dp
where it says to slice it on 360 x 640.
On the other end, I found that it must be 640 x 960
Can anyone tell me what PSD I should choose and than do its respective slicing.
If you can give for all sizes, It would be helpful for me.
ldpi
mdpi
hdpi
xhdpi
xxhdpi
xxxhdpi
Thanks.
For Android Devices
LDPI- icon-36x36, splash-426x320
MDPI- icon-48x48, splash-470x320
HDPI- icon 72x72, splash- 640x480
XHDPI- icon-96x96, splash- 960x720
XXHDPI- icon- 144x144
For Android Tablet Devices
LDPI:
Portrait: 200x320px
Landscape: 320x200px
MDPI:
Portrait: 320x480px
Landscape: 480x320px
HDPI:
Portrait: 480x800px
Landscape: 800x480px
XHDPI:
Portrait: 720px1280px
Landscape: 1280x720px
For More Details You Can see Developers Guide Here
Thanks.!

Image resolution for mdpi, hdpi, xhdpi and xxhdpi

I have a background for my app in resolutions 720x1280 pixels, 1080x1920 pixels and 1440x2560 pixels.
In which folders (mdpi, hdpi, xhdpi and xxhdpi) should I put each background?
Please read the Android Documentation regarding screen sizes.
From a base image size, there is a 3:4:6:8:12:16 scaling ratio in drawable size by DPI.
LDPI - 0.75x
MDPI - Original size // means 1.0x here
HDPI - 1.5x
XHDPI - 2.0x
XXHDPI - 3x
XXXHDPI - 4.0x
For example, 100x100px image on a MDPI will be the same size of a 200x200px on a XHDPI screen.
Require Screen sizes for splash :
LDPI: Portrait: 200 X 320px
MDPI: Portrait: 320 X 480px
HDPI: Portrait: 480 X 800px
XHDPI: Portrait: 720 X 1280px
XXHDPI: Portrait: 960 X 1600px
XXXHDPI: Portrait: 1440 x 2560px
Require icon Sizes for App :
http://iconhandbook.co.uk/reference/chart/android/
DP size of any device is (actual resolution / density conversion factor).
Density conversion factor for density buckets are as follows:
ldpi: 0.75
mdpi: 1.0 (base density)
hdpi: 1.5
xhdpi: 2.0
xxhdpi: 3.0
xxxhdpi: 4.0
Examples of resolution/density conversion to DP:
ldpi device of 240 X 320 px will be of 320 X 426.66 DP. 240 / 0.75 = 320 dp 320 / 0.75 = 426.66 dp
xxhdpi device of 1080 x 1920 pixels (Samsung S4, S5) will be of 360 X 640 dp. 1080 / 3 = 360 dp 1920 / 3 = 640 dp
This image show more:
For more details about DIP read here.
Check the image above I hope it will help someone.
Link to the whole article itself
Your inputs lack one important information of device dimension.
Suppose now popular phone is 6 inch(the diagonal of the display), you will have following results
DPI: Dots per inch - number of dots(pixels) per segment(line) of 1 inch.
DPI=Diagonal/Device size
Scaling Ratio= Real DPI/160.
160 is basic density (MHDPI)
DP: (Density-independent Pixel)=1/160 inch, think of it as a measurement unit
in order to know the phone resolution simply create a image with label mdpi, hdpi, xhdpi and xxhdpi. put these images in respective folder like mdpi, hdpi, xhdpi and xxhdpi. create a image view in layout and load this image.
the phone will load the respective image from a specific folder. by this you will get the phone resolution or *dpi it is using.

Android maintain same proportion for all different screen sizes and resolution

I want my application components to look in a scaling mechanism. Means image size must look in proportion with screen size.
I know that to use 4 different drawable folders.
Considering hdpi as base (480 x 800) ratio would be:
mdpi 66.66%
hdpi 100%
xhdpi 133.33%
however xhdpi size accoring to above ration is 640 x 1060.
But samsung s3 screen size is 720 x 1280
So suppose If I have image of 100 x 100 in hdpi, and so 133 x 133 in xhdpi
But after applying above rule, Image in samsung s3 not looking proportionality with screen size as image size is based on xhdpi (133 x 133).
Same problem in hdpi with 480 x 854 screen size. Suppose I have to display images on screen, how to filled up that 54 px gap? as our images are based on 480 x 800 in hdpi folder .
So my question is how can we get smaller image for smaller screen size and bigger image for bigger screen size so that all layout and images looks in proportional with screen size?
If you do not compromise not even with a fewer pixels on the screen then it would be ideal for you to use
layout-sw720dp folder for Samsung S3
More info is provided in the official documentation
below are some typical screen widths to be used
res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)
and make your drawable folder like below
xhdpi: 720x1280
large-hdpi: 640x960
hdpi: 480x640
mdpi: 320x480
ldpi: 240x320

android: Galaxy Note 2 : for which pixel layout images/icon should be prepared?

I am developing an app which must support Samsung Galaxy Note - 2.
Now note-2's pixel resolution is 1,280 x 720. Reference Wikipedia.
While developing an app, I found that it was picking images from res/drawable-hdpi.
So for what resolution layout I should prepare the images ? Or do need to make separate resource folder ?
Resources are picked based on DPI a quick reference for what DPI each device uses can be found here:
http://blog.blundell-apps.com/list-of-android-devices-with-pixel-density-buckets/
For image scaling, the images should roughly be sized like so:
if an image is to use 100 dp then the actual images sizes will be:
ldpi: 75px
mdpi: 100px
hdpi: 150px
xhdpi: 200px
if you want to use 100 px on your NOTE 2 then the image sizes will be
ldpi: 50px
mdpi: 66.67px
hdpi: 100px
xhdpi: 133.33px
you can use the following site do do quick calculations:
http://labs.skinkers.com/content/android_dp_px_calculator/
Prepare images for hdpi resolution -- 480x800 hdpi.
Galaxy Note 2 is normal size, xhdpi density and long. You can prepare layout or drawable for xhdpi. For details, please check this post Galaxy Note 2 screen specifications. If you don't have xhdpi resource, android will try to find resource in hdpi.
The Galaxy Note uses hdpi which is a pixel density of 240dpi
Android Device Resolutions

Categories

Resources