UI not aligned on samsung gt i8262 - android-layout

I have encountered a problem while adjusting UI for various devices on android.
I created res/values-hdpi folder and similar other folders to put the dimensions of the layout there and adjust app's UI. I tested it on two devices
1) HTC ONE S
2) Samsung GT i8262
Both the devices comes under normal hdpi category according to android developers site. But the layout is completely misaligned in samsung device. Is there a solution to this sort of problem. I have also checked by changing the dimensions in the values-hdpi folder to confirm that both devices pick from same resource and it does!!! Both pick the dimensions from values-hdpi folder but misaligned in one of them.
Note: Both devices have only hardware buttons no navigation bar. So need not worry about that.
My guess is that HTC ONE S is 256 ppi, samsung gt i8262 is 207 ppi, but both have 4.3" screens, is this the problem?? How do I solve this if this is the case?

I finally created two values folders values-sw360dp-hdpi for HTC 1S and values-sw320dp-hdpi for Samsung GT i8262 and it worked.

Related

Phone skin: round corners and a camera are small compared to the emulated phone screen, how to make them fit?

I downloaded skin of galaxy A52 from official samsung website: https://developer.samsung.com/galaxy-emulator-skin/galaxy-a.html.
Moved the file into the right directory, added the device: size 6.5 and resolution 1080x2400 and API is 31. I was following this tutorial: https://www.youtube.com/watch?v=6JIPsZpIJzE.
My question is: I have those corners and a camera too small, how do I resize them to fit naturally?
To change that you need to locate to the "Device frame skin definition" folder that you downloaded and pasted before. For me that was this folder:
C:\Program-Files\Android\Android Studio\plugins\android\resources\device-art-resources\Galaxy_A52
You should open "layout" file and see how different frames are set. In my situation I found that fore_port.png was at the forefront. I checked and it had dimensions 324x720. Dimensions of the screen are 1080x2400 so you should google "change dimensions of png" and change them. Then, replace the file. After this, restart android studio and everything works.
Now I have something that looks like this:

Drawable icons for app

Recently, I've been working for some theming project for Android launchers. I need some guidance and advice from the people around here that could help me with this.
I have created one sample icon for Opera mobile with the size of 192x192. The question is, if I made that icon size as mentioned, should I create another size for it, e.g. 128x128? I'm a bit confused.
Thanks.
I am not sure if understand your question. If you add a drawable resource to Android Studio, it automatically resizes it to multiple sizes. If you have created one, that will be resized automatically.
Hope this helps.
If you want to design icons for android, you better design some for different resolutions. You have to make an icon for each. See at this article https://developer.android.com/guide/practices/screens_support.html#overview. There are the different densities and the multiplication factors.

Scaled Assets for Splash Screen in UWP

In appxmanifest file, there are five options for Splash screen : 620x300, 775x375, 930x450, 1240x600 and 2480x1200.
I have the following resolutions in my 15" laptop :
1366x768 (Recommended)
1360x768
1280x720
1280x600
1024x768
800x600
My question is, if I provide all five image in appxmanifest for Splash Screen, how those going to effect my laptop's different reolustion. I looked into MSDN blogs mentioning about some scale factor. I also noticed that, for each splash screen image, corresponds to a name like "SplashScreen.scale-100", "SplashScreen.scale-125", "SplashScreen.scale-150", "SplashScreen.scale-200" and "SplashScreen.scale-400"..
Actually it's a very beginning level question, but I am kind of puzzled up with all those
You have one minute video which explain Scaling and effective pixels in UWP apps. In addition, the Store picks the assets to download based in part of the DPI of the device. Only the assets that best match the device are downloaded. By the way, don't hesite to add a maximum of assets.
To help you, the following extension can generate the different size for you.
UWP Tile Generator Extension for Visual Studio

Samsung Galaxy Tab 1 layout problems

I'm having trouble running my app on the Galaxy tab original 7". It appears to make everything 1.5 times bigger, i.e. if I specify 40dip for a textSize in my layout, it will display as 60 dip when I run it on the tablet.
I tried messing around with the display metrics and changing the density and densityDpi to 1. (When I run a toString of the display metrics in the Galaxy tab 2, they are both 1, whereas the Galaxy tab 1 has values of 1.5)
The app runs very well on every phone I've tested it on, and on the Galaxy tab 2, so I can't figure out what the problem is. I even tried creating a dummy app with just a textView with a size of 40dip, and it still converted it to 60.
Any ideas?
Does the answer to this question help you? Seems that he is having the same (or similar) problem.
Android layout on emulator vs device
Android, concerning the User Interface design

Problems with supporting tablets and handsets simultaneously - orientation

In my main Game Activity I force the orientation to portrait. This is clearly not a good idea on tablets. What is the best way to check the SDK version and not do this for tablets (or perhaps even force landscape)? I assume I then need to specify a layout-land-large folder and put the files in there. Is there anything else I need to do? I read something somewhere that I also need to specify screen sizes somewhere in the manifest.
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
I.e. should it be in -large or xlarge?
I would definitely check out the documentation here.
You can simply declare two different layouts in and folders specifying two different View orientations.
Please let me know if you need any clarification, and I'll get back to you :)
Hope this helped!
res/values for handsets in portrait mode.
res/values-sw600dp for 7" tablet in portrait mode
res/values-sw720dp for 10" tablet in portrait mode
res/values-sw720dp-land for 10" tablet in landscape mode
and reference to Android Developer Guide -- How to support multiple screens

Resources