screen-resolution

Android: drawable resolutions

二次信任 提交于 2019-12-04 10:32:34
问题 I've been through this post (and others) as well as through the documentation about supporting different screen resolutions in Android, but I couldn't find a clear answer to a (simple) question: Is it ok to just use "res/drawable" for images in an android app? Background: The only images that are needed in this specific app are the app icon itself and an icon for a notification, there won't be any images in any layout. So in my understanding, if no "hdpi"-, "mdpi"- and "ldpi"-folders are

SDL - Get native Screen Resolution

血红的双手。 提交于 2019-12-04 10:13:27
My code: window.cpp Window::Window(int w, int h, const char *title, const char *icon) { height = h; width = w; if(SDL_Init( SDL_INIT_EVERYTHING ) == 0) { SDL_WM_SetCaption(title, NULL); SDL_WM_SetIcon(SDL_LoadBMP(icon),NULL); screen = SDL_SetVideoMode(width, height, 32, SDL_SWSURFACE | SDL_RESIZABLE | SDL_DOUBLEBUF); if(screen == NULL) { running = false; return; } fullscreen = false; } else running = false; return; } Window::Window() { const SDL_VideoInfo* info = SDL_GetVideoInfo(); screenWidth = info->current_w; screenHeight = info->current_h; Window(640, 480, "Flatgu game", "rsc/img/icon.bmp

My Windows Forms application size is changing on different notebooks

让人想犯罪 __ 提交于 2019-12-04 10:07:21
Coding my project was going well. But today I noticed a problem. My main notebook has full hd (1920x1080) resolution and I am coding my projects here. When I changed my main notebook's resolution to 1280x1024, 1280x800, or 1024x768 there is no problem. My application's resolution is 1024x768 and it is not collapsing. This is the printscreen. But my other notebook has 1366x768 resolution. And I am running my application on this notebook. Oh! There is a disappointment. My application screen shifted. This is the bad printscreen. I do not understand why. What can I do correcting this error? Paul

How to show the same part of game on every aspect ratio on Android devices with Unity?

寵の児 提交于 2019-12-04 09:15:01
I'm coming from Libgdx engine to Unity and I'm a beginner programmer. I try to make a game in Unity for Android and iOS devices, but I have a problem with the aspect ratio/resolution scaling. In Libgdx if you have develop something you give a "default" resolution, and everything will be scaled to the device's screen, not matter if it has bigger or smaller resolution, and nothing will be cut off from the screen. On the other side, in Unity if I make a game it will crop the screen to the chosen aspect ratio, which is not the best if you want the same experience across all the devices available.

Strategies for Handling Multiple Screen Resolutions and Aspect Ratios in Web Development

会有一股神秘感。 提交于 2019-12-04 07:35:31
问题 Back in the day, 800 x 600 was the screen resolution to design for - and maybe 640 x 480. Then along came 1024 x 768, etc, etc, etc. But then it gets worse: now we have not only different resolutions but also different aspect ratios. What strategies do people use to accommodate today's ever-expanding range of screen sizes and aspect ratios? (BTW - I was only thinking about laptop / desktop hardware, but of course there's smart-phones and tablets to consider too.) 回答1: I know this would be a

Bad Swing UI scaling on high resolution (MS Surface)

不想你离开。 提交于 2019-12-04 02:47:43
I'm currently working on a little Java application, that involves Swing GUIs. On my development PC everything looks fine but when I run it on my MS Surface, some icons seem to be too large for the components (or the components too small for the icons). Here's what I mean: Google research has lead me to conclude that this is due to Surface's high resolution and Win8's zooming to let some items appear a little larger. So I reset that zoom to 100% and it actually fixed the bad scaling. Unfortunately, this doesn't really fix my problem. Everything is far too small without the zoom, so I'd rather

Automatic image resizing in a CSS flow layout to simulate a html-table layout

雨燕双飞 提交于 2019-12-04 02:36:26
I have an image that, depending on the screen resolution, drops down out of sight in my CSS flow layout because I have set its width and height to static values. Is there a way in a CSS flow layout to have the image automatically resize while someone is making the browser window smaller. I have seen this done in a html-table layout and I assume the tables make it possible there - is there a way to also do this in a CSS flow layout? A quick test shows that this: <img class="test" src="testimage.jpg" /> combined with: img.test { width: 50%; } Resizes the way you probably want. The image

Objective C - how to get current screen resolution?

Deadly 提交于 2019-12-03 23:39:40
问题 is there any way to get the users screen resolution with objective c? Thanks. Solution: int width = [[NSScreen mainScreen] frame].size.width; int height = [[NSScreen mainScreen] frame].size.height; 回答1: Check out NSScreen. 来源: https://stackoverflow.com/questions/1868677/objective-c-how-to-get-current-screen-resolution

multi resolution support for all android devices

有些话、适合烂在心里 提交于 2019-12-03 16:32:06
I am porting my cocos2d iPhone game to android using cocos2d-x. I am now facing a problem with screen resolution: I want to use one high resolution image in my game which should be supportable by all screens lower then a given resolution. I read this nice tutorial of multiple resolution on forum . It's really helpful, but I am not achieving my solution. There is explanation of scale-factor of resource of Design Resolution & Resource Resolution. But, in my case, it scales either height wise or width wise. Not a perfect scaling of my image. Can someone clarify why for me? In AppDeligate.cpp add

Difficulty to understand how to support multiple screen

喜你入骨 提交于 2019-12-03 13:59:15
问题 I have seen so many questions on StackOverFlow how to support multiple screens. But most of the answers provide this link and this. And in the first one link I have got this. I am working with screen sizes first time so please help me. xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp And in case of xhdpi they suggest 320 density . I am confused so I have following questions.