BaseSplashActivity without RatioResolutionPolicy

  ... the case you feel the need for a new feature or want to submit one.

BaseSplashActivity without RatioResolutionPolicy

Postby darklord » Mon Sep 06, 2010 1:57 pm

Hi

Currently Im implementing a splash screen. For this I want to use BaseSplashActivity. However, BaseSplashActivity extends BaseActivity, and BaseGameActivity uses RatioResolutionPolicy. Is there some way, besides creating my own BaseGameActivity class, to switch this into FillResolutinPolicy? I really dislike those black sidebars :lol:
darklord
 
Posts: 121
Joined: Thu Aug 12, 2010 2:48 pm

Re: BaseSplashActivity without RatioResolutionPolicy

Postby darklord » Sat Sep 11, 2010 12:00 am

Anyone, please? :?:
darklord
 
Posts: 121
Joined: Thu Aug 12, 2010 2:48 pm

Re: BaseSplashActivity without RatioResolutionPolicy

Postby mr_deimos » Sat Sep 11, 2010 5:00 am

You probably could just get information about display resolution from android and use that as camera size. This way you'll never have any black bars. It's a bit late here, so i won't search for the correct method, but i bet you'll be able to find something here:
http://developer.android.com/reference/packages.html
Just make sure you position all the content so that it can fit all standard screen sizes ;)
mr_deimos
 
Posts: 42
Joined: Wed Sep 08, 2010 11:03 pm

Re: BaseSplashActivity without RatioResolutionPolicy

Postby Nicolas Gramlich » Sun Sep 12, 2010 11:12 am

Hi,

BaseGameActivity does not uses "RatioResolutionPolicy". (Think you mixed up BaseGameActivity and BaseSplashActivity here ;))

I altered BaseSplashActivity, so that you can @Override the methods where the Camera and the IResolutionPolicy are created.
Changeset: http://code.google.com/p/andengine/sour ... fbfef0f4d1

(You'd need to compile the library yourself or wait until I push the next update to the AndEngineExamples)

Best Regards,
Nicolas
Nicolas Gramlich
Site Admin
 
Posts: 1734
Joined: Mon Jun 07, 2010 6:20 pm
Location: Schriesheim, Germany

Re: BaseSplashActivity without RatioResolutionPolicy

Postby darklord » Tue Oct 05, 2010 1:56 pm

Thank you!
darklord
 
Posts: 121
Joined: Thu Aug 12, 2010 2:48 pm


Return to Features

Who is online

Users browsing this forum: No registered users and 4 guests