• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to make a vertically movable splash screen for game?

pappous12

Lurker
I want to make a splash screen for my game. I need the image to fit the screen's width but I want the height to be larger than the screen's. Than, I will have an animation moving the image vertically, hiding the top part and showing the bottom one.

I have searched a lot and I am more puzzled now on how I should do this.

Firstly the only solution I found for the fitting part was a combination of java and xml. But the problem here is that the java class doesn't produce a bigger than the screen image, but a cropped image. So, I can't make the animation later on.

Can anyone tell me a way to do this? Should I do it only in java and don't use xml at all? Or is it possible to do this through xml only (which would be better I think)?

Thank you
 
My app (Story of Red) uses vertical scrolling.
Here is how I did it...
1 - create xml with placeholders for image. Name it.
2 - in Eclipse, set up Animation for said image:
Animation topToBottom = new TranslateAnimation(0, -height, 0, height); //first two params are initial position, last two are ending position.
3. run animation.

For more specifics, look at: android.view.animation | Android Developers
especially translate animations, which would be more useful to you: TranslateAnimation | Android Developers

Hope this helps.
 
Back
Top Bottom