cocos2d-x screen flicker on Android - android

I got screen flicker when developing with cocos2d-x 3.0alpha1.
I designed the resources on 480x800 resolution.
Then I try on both my android phone ( HTC One V ) and tablet. It works fine on my phone which is 480x800 without scaling. But it flickers on my Android tablet which has 600x1024 reesolution ( HTC Flyer ).
This is the video of how the flicker going on
http://youtu.be/f_-TilhW3ns
I've tried
Director::getInstance()->setDepthTest(false);
Director::getInstance()->setProjection(Director::Projection::_2D);
with no success.
Has anybody encounter this before and maybe fixed it?
Thanks

You can try adding the following code in your AppDelegate.cpp in your AppDelegate::applicationDidFinishLaunching() methode :
glview->setDesignResolutionSize(720,1280,ResolutionPolicy::SHOW_ALL);
Worked for me. I hope it helps.

I had same issue I problem was that I was using too big sprite sheets, and also use CCParticleBatchNodes you you are using particles.

Related

How to avoid extra spaces using web view in android

I my application I have a web view and scroll view. In my Galaxy S2 , it's works fine ,But in Xperia Z and some other device there are extra white space in right side. I don't know why it is showing like that . can anybody help me from in this issue.
Thanks in advance!
Do you set your application for multi-screens support. I thinks it's your screen density error, mobiles has it's own dimension and desity for each pixel, so we have to do coding for them.

Resizing the tabgroup header height in Titanium Android

I am new to mobile development with Titanium Studio. I am developing an app for android. When I tried running it in WXGA720 screen emulator, which was looking good. But when I tried the same with WXGA800-7in screen emulator, it looks terrible. Below is the screenshot for your reference.
Screenshot from WXGA720:
Screenshot from WXGA800-7in:
Please suggest. Thanks in advance.
In Titanium when developing for Android, it uses same image for TabGroups. Bigger the image specified, bigger it will show up in the app. My solution was using different images for different devices.
Android let you do that automatically by different device profiles.
If you look at Resources/android/images, there are several directories like:
res-long-land-hdpi
res-long-land-ldpi
res-long-port-hdpi
res-long-port-ldpi
res-notlong-land-hdpi
...
Please check here for a complete description.
I found a way to rectify this issue, as i would like to have my application only for Galaxy S3 and Nexus 7.
I wrote code to detect the screen size of Nexus 7 (height=1216 && width=800)
and dynamically set the tab icon, i used smaller size tab icons for Nexus.

Camera preview is letterboxed when on portrait

I'm using the cameraPreview sample coming with the Android API demos. The problem is, the camera preview is showing properly on landscape, but when I rotate the phone to portrait, I get a letterboxed and rotated image.
I'm using Android 2.3.3 and a Samsung Galaxy Ace, but also tried 2.1 on a Xperia Mini 10 Pro.
A couple of pics (sorry for poor the quality):
portrait http://i42.tinypic.com/a9qzuu.jpg
Is this normal behavior of the demo program? What's a proper way to fix it?
This helped for me :
mCamera.setDisplayOrientation(90);
I was able to fix the problem I was having that was very similar to this. It had to do with with an old supports-screens ... / entry I had in my manifest file. I removed this from my manifest and everything worked like a charm. Hopefully this might help solve your problem. Cheers.
Solved it, turns out it was a problem with my manifest, I had to include a line defining a fixed screen orientation for the camera activity. :P

Window shrinked to quarter of screen size when running app from Android Phone on Appaccelerator Titanium

I have build an iPhone app and using same code to compile Android app. When I run the app in the phone (HTC Desire) instead in emulator, the main window shrinked to the quarter of the screen size, everything else is working fine except this. Can someone please let me know if there is any configuration to look for in Titanium ?
Ubuntu
Appaccelerator Tatanium Studio
HTC Desire
This could possibly help you?
Looking at screenshots on Appaccelerator website I see that Android phone is presented by HTC Hero, which is kind of old for 2011. This makes me think that Appaccelerator is not aware of newest high-density devices like Desire. If Appaccelerator uses physical coordinates for pixels then on high-density phones you'll get exactly the behavior you describe.
Anyways, phrase patent-pending development technology stated on the Appaccelerator website is already an alarming sign against using it.

What might be the reason for the Image not occupying the full screen in the 10.1 galaxy tablet while running my android application?

I have created an android application and its running fine on my emulator.But the problem really is whenever I want to run it on a Samsung Galaxy 10.1 tab,the application screen appears to be tiny.Could somebody help me out in this regard and tell me how to make my application acquire the whole of the screen in the tab? Thanks in advance.
Yes I think, that you need to read this You need to make your application, to be "big" on the tablets too. I think that it will be "very important" until 3.2 .
Be happy with Galaxy Tab 10.1 :)

Categories

Resources