• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to scale images correctly? (different sreens)

howtodoit

Lurker
Hello.

I started programming with LibGDX and i think this is the best library for Android Development but i have one problem. The Problem is with other screens and sizes. I have coded so much and game looks great on my phone (SGS II) but on my friend's phone (with the smaller screen) it looks not so good.

Here is the screen:
scaled.php

http://desmond.imageshack.us/Himg829/scaled.php?server=829&filename=skalowanie.jpg&res=medium

As you can see there are pixels on the bombs on the smaller screen but on the bigger on there is no pixelization. How to solve this problem? How to make images more smooth not pixelated.

Is there any way to fix it?

Can anyone help?
Thx!
 
Dont think this will help,but In android canvas to scale an image,you make a matrix and put it into the bitmap then use the scale method.
 
In eclipse we are given 3 folders:

Drawable-ldpi
Drawable-mdpi
Drawable-hdpi

We place our images in mdpi then create smaller/larger copies of these images to be put into the ldpi/hdpi folders. Android's OS chooses the correct image automaticly based on the pixel density of the phone.
 
Back
Top Bottom