android-resolution

AndEngine - Sprites are not getting scaled on different devices

不想你离开。 提交于 2019-12-10 11:19:37
问题 Code : This is how m initializing camera. I', trying to get resolution of device and based on that i set camera width and height. public class GameActivity extends SimpleBaseGameActivity { private SmoothCamera mCamera; private DisplayMetrics dM; private int CAMERA_WIDTH, CAMERA_HEIGHT; private double ScreenWidth, ScreenHeight, resolutionRatio; public EngineOptions onCreateEngineOptions() { //set Camera getDeviceResolution(); setCamera(); EngineOptions options = new EngineOptions(true,

Android - Screen Resolution and Screen Density

吃可爱长大的小学妹 提交于 2019-12-10 09:21:58
问题 As per managing resources(images) in > Android 1.6 version, we need to keep different-resolutions image in Drawable-Hdpi, Drawable-Mdpi, Drawable-Lpi folder particularly. And as per this page: http://developer.android.com/guide/practices/screens_support.html , In Low density section - there are three resolutions used: 240*320 , 240x400 , 240x432 for the Small screen, Normal Screen, Large Screen particularly. same way for Medium density section - there are three resolutions used: 320x480 ,

how to use drawable to compatible with all screen sizes (idpi, mdpi, hdpi, xhdpi, xxhdpi)

青春壹個敷衍的年華 提交于 2019-12-10 00:03:19
问题 Hello I am new in android programing so I want to know: How to use drawable to compatible with all screen sizes (idpi, mdpi, hdpi, xhdpi, xxhdpi) Actually I am confused about drawable screen sizes compatibility with all screen sizes so I want to know that: If I want my app to compatible with all screen size do I need to put images in every drawable folder for example: background image • drawable-ldpi ( 240x320 for QVGA Device 2.7 ) put image with this resolution • drawable-mdpi ( 320x480 for

Android - Setting for Tablets

≡放荡痞女 提交于 2019-12-08 12:25:26
问题 I am pretty new to Android. I wanted to know that if i want to design a tablet application then what changes i want make in the existing code which i designed for normal phone. I did the Research and found, res/layout/my_layout.xml // layout for normal screen size ("default") res/layout-small/my_layout.xml // layout for small screen size res/layout-large/my_layout.xml // layout for large screen size res/layout-xlarge/my_layout.xml // layout for extra large screen size res/layout-xlarge-land

AndEngine - Sprites are not getting scaled on different devices

a 夏天 提交于 2019-12-06 06:19:44
Code : This is how m initializing camera. I', trying to get resolution of device and based on that i set camera width and height. public class GameActivity extends SimpleBaseGameActivity { private SmoothCamera mCamera; private DisplayMetrics dM; private int CAMERA_WIDTH, CAMERA_HEIGHT; private double ScreenWidth, ScreenHeight, resolutionRatio; public EngineOptions onCreateEngineOptions() { //set Camera getDeviceResolution(); setCamera(); EngineOptions options = new EngineOptions(true, ScreenOrientation.LANDSCAPE_FIXED, new RatioResolutionPolicy((int)this.getCameraWidth(),(int)this

Android - Screen Resolution and Screen Density

白昼怎懂夜的黑 提交于 2019-12-05 13:55:06
As per managing resources(images) in > Android 1.6 version, we need to keep different-resolutions image in Drawable-Hdpi, Drawable-Mdpi, Drawable-Lpi folder particularly. And as per this page: http://developer.android.com/guide/practices/screens_support.html , In Low density section - there are three resolutions used: 240*320 , 240x400 , 240x432 for the Small screen, Normal Screen, Large Screen particularly. same way for Medium density section - there are three resolutions used: 320x480 , 480x800 , 480x854 for the Small screen, Normal Screen, Large Screen particularly. and same way for High

how to use drawable to compatible with all screen sizes (idpi, mdpi, hdpi, xhdpi, xxhdpi)

妖精的绣舞 提交于 2019-12-04 21:35:11
Hello I am new in android programing so I want to know: How to use drawable to compatible with all screen sizes (idpi, mdpi, hdpi, xhdpi, xxhdpi) Actually I am confused about drawable screen sizes compatibility with all screen sizes so I want to know that: If I want my app to compatible with all screen size do I need to put images in every drawable folder for example: background image • drawable-ldpi ( 240x320 for QVGA Device 2.7 ) put image with this resolution • drawable-mdpi ( 320x480 for HVGA Device 3.2 ) put image with this resolution • drawable-hdpi ( 480x800 for WVGA Device 4.0 ) put

Which part of Android is in charge of picking a correct resource profile?

喜你入骨 提交于 2019-12-04 00:58:17
问题 I have a weird problem. Before you come to an idea to lash out on me, I am working on a custom Jelly Bean. Therefore the "usual nice approaches" might not work here, and dirty workarounds have to be made. I have an APK which contains the following in assets: layout layout-mdpi layout-land layout-large-mdpi layout-large-land-mdpi layout-large-hdpi layout-large-xhdpi And some other metrics code returned this: D/AppDemo( 2091): measured width: 1920 PE width: 1920 scaleFactor = 1.0 D/AppDemo(

Colors Rendering Differently on Different Devices

折月煮酒 提交于 2019-12-02 03:06:33
Im setting the button state like <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="#FFF"></item> <item android:state_enabled="true" android:color="#000"></item> <item android:state_focused="true" android:state_pressed="false" android:color="#ffffff" /> <item android:color="#c7c7c7" /> </selector> the problem is they are rendering differently on different devices like on Huwaei Ascend they are not that crisp but on Galaxy Device they are sharp and very crisp. How can i make them look same on all devices. Regards. You have to

Which part of Android is in charge of picking a correct resource profile?

我怕爱的太早我们不能终老 提交于 2019-12-01 03:49:19
I have a weird problem. Before you come to an idea to lash out on me, I am working on a custom Jelly Bean. Therefore the "usual nice approaches" might not work here, and dirty workarounds have to be made. I have an APK which contains the following in assets: layout layout-mdpi layout-land layout-large-mdpi layout-large-land-mdpi layout-large-hdpi layout-large-xhdpi And some other metrics code returned this: D/AppDemo( 2091): measured width: 1920 PE width: 1920 scaleFactor = 1.0 D/AppDemo( 2091): [ANDROID] measured width: 1920 measured height: 1080 D/AppDemo( 2091): [ANDROID] scale for