I have installed robowm and created the sample app given on the offical website.
It works perfectly on emulator with screen size of 3.5 inch, but black bars occur on top and bottom of screen when I test it with 4 inch emulator or iPhone 5.
Seems like robovm is not supporting 4 inch screen size.
Does anyone know how to solve this problem?
RoboVM definitely supports the 4 inch screen. You just have to tell iOS that your app supports the larger screen. The way to do this is to provide a launch screen with the right name and dimensions. Put an image named Default-568h#2x.png with dimensions 640x1136 pixels in your resources/ folder in your RoboVM project and iOS will let your app use the full screen.
Related
I am developing an application that will run on two devices, a J2 smartphone with a 5-inch display (960x540) and a 7-inch tablet (800x1280). I'm having trouble making screens responsive to both screens. I created dimens.xmls files with different dimensions for the respective screens, as shown below.
I created two dimension files.
where in the large-hdpi are the font sizes, icons, margins and paddings for the tablet's 7 inch screen.
and in this dimension, they are the sizes referring to the 5 inch screen.
Although I made the two dimension files, for each screen with different sizes, when running the application run on both devices, only the configuration contained in large-hdpi that works on both screens. If I change a font size in large-hdpi, in the preview of android studio, it already shows me the change in the 5 inch screen, and it was to change only in the 7 inch screen. So, I would like to know how I can have different sizes for these two screens.
According to the official Android documentation, these two resolutions belong to the "large" qualifier/group. This is the reason that both receive the same dimen values.
https://developer.android.com/training/multiscreen/screensizes#TaskUseSizeQuali
Although, this type of qualifiers should only be used with earlier versions of Android (versions 3.1 and earlier), which most probably you won't be supporting in your project.
Instead, you should use the smallest width qualifiers which are density-independent and you can define the exact density-independent pixels on your values files. You can read more here:
https://developer.android.com/training/multiscreen/screensizes#TaskUseSWQuali
I'm developing a JavaFX application but I don't know how to make it auto adjustable across different screens. As I'm developing on laptop having resolution (1920 x 1080), everything is going ok here, but when I move the app to my another laptop having resolution (1366 x 768), the app view becomes large enough to be fit on the screen. As given in the following pictures:
With 1920 x 1080 :
https://drive.google.com/file/d/1iXJ86VNaitU_csM4nuudesAJJvLvg180/view?usp=sharing
With 1366 x 768 :
https://drive.google.com/file/d/1_1igAmvyTnqdRXYMjcI9--7p8mNp3qSj/view?usp=sharing
Kindly help me out of this problem, as my software is only getting delayed of this tiny bug.
stage.setMinHeight(Screen.getPrimary().getBounds().getHeight()); stage.setMinWidth(Screen.getPrimary().getBounds().getWidth());
I have a custom info window set up for my marker with simple 9patch file for its background. It seems to be working perfectly but when I run the app on emulator (Nexus 6P) it is misaligned - left side of 9patch ends up being shorter then the right side. You can see what I am talking about on this picture:
As you can see on the photo, left size is larger and therefore info windows seems of center. This happens is emulator but on my Galaxy S6 everything appears normal. I am not sure if it is the emulator or pixel density problem.
I also don't think its problem with 9patch since in preview everything seems to be normal.
Also in XML layotu where I use the background, preview shows normally sized info window.
Happy New Year,
I am developing my application by following This tutorial (using LibGdx, extents Game, with AbstractScreen, using Stage). However, currently I am experiencing a very funny issue. Everything display correct on my Samsung phone but not on my ASUS Nexus 7. Please see this link for the recorded video (MP4: ~800kb) of both devices. As you can see from the Samsung phone, you can see the “Fullmoon Inc.” splash screen (~25 secs). However, my nexus 7 display nothing at all even though I am sure that my application is running on my nexus 7 (sound played on certain timeframe). I tried to update my nexus 7, reset back to factory default, run on empty profile, still no luck at all. I am absolutely no idea what to do to fix it.
Another thing is that the loading bar on the loading screen (from 5secs – 23secs) is not display correctly. According to the following code, the loading bar (the yellow windows) should load in a smooth manner. However, as per what you can see on the video, it is not. Currently the bar only display "After" everything is loaded. Can anyone please lead me back to the correct path?
loadingPercent = Interpolation.linear.apply(loadingPercent, thisApps.assetManager.getProgress(), 0.1f);
this.loadingYellowBox.setWidth(-1040 + (int) (loadingPercent * 1040));
Thank you very much, and all comments are welcome.
I can answer the second part of question. AssetManager calculates percent based om number of asssets not on their size. Suppose you have huge texture atlas which is packed in one texture and several other small resources. Loading of the atlas takes 9 seconds and there are 4 other small resource which take 1 second to load.
So, see what happens. You have 20%-20%-20%-20%-20% when you expect 90%-10&.
If you want to more precise percentage you need to calculate percentage some other way.
Blank screen glitch is trickier. You need to check that Stage is properly initialized, aspect ratio is correct, resources are loaded correctly. You can download source code for libgdx, add it to your project and go through render method with debugger. If you find something suspicious there you can update this post or create a new one.
i finally figured out where the problem came from. the issue is that when i pack all my images, i set the Max page width and Max page height to 4086. i am guessing that somehow Nexus did not "really" load those images. problem solved when i reduced both Max page width and Max page height to 2048. anyway, i still appreciated helps from both #noone and #son-of-the-northern-darkness
I've got Android application running in landscape mode on 10" tablet with 1280x800 px resolution. App contains web view including picture with 1280x720 px size, so it's kind of full screen web view.
If I run the very same application on HTC One X smartphone, which is 4.7", 720 x 1280 px, also in landscape mode, web view seems to display only part of the picture, much less as I would expect. It even looks like physical 1/4 of the original, top left quarter.
Does anybody have any experience of running same app on similar or even different resolutions with completely different physical screen sizes?
Any recommendations?
For instance, I would like to run this app also on 7" tablets, where the resolution is only 1024x600 px. Can I still do that without need of changing picture size?
That is just the behavior of a web view/web page in general. Unless you tell it to with JavaScript or css, it wont care how big your screen is and will display all the content at the exact pixel size specified. You can more than likely dynamically re-size the image with JavaScript or css.
This may be what you are looking for: How can I resize an image dynamically with CSS as the browser width/height changes?
According to this thread:
Android Webview initial zoom out
This is the right answer:
webview.getSettings().setLoadWithOverviewMode(true);
This will cause the webview to be zoomed out initially.
webview.getSettings().setUseWideViewPort(true);
The Webview will have a normal viewport (like desktop browser),
You can create separate stylesheets for each density.
http://developer.android.com/guide/webapps/targeting.html#DensityCSS
just to conclude this, all changes had to be done on portal side in html, js and css in order to display it correctly on various tablets.
Playing with settings of WebView element didn't help in this case.