Reputation: 305
I wanna start a new project. A little "Jump n Run", but I have questions: The levels will be bigger than the screen. How can I make a big Layout and edit it? And how do the view "follows" the player, if he moves. I dont want code samples. I only want basic ideas how to do it.
Upvotes: 1
Views: 89
Reputation: 9599
I suggest you have a look at the SurfaceView. It allows you to render bitmaps to the screen. In your case you could create a bitmap that is larger than the screen and have the user navigate it with the use of their finger (so you'll also have to also use your touchscreen). Basically what you will be changing when the user wants to go to a new location would be the src rect parameter
in the drawBitmap method.
I hope this gets you started.
Upvotes: 1
Reputation: 39470
You could specify the layout to whatever pixel size you want (even if it's larger than any screen size would be), and then use scroll views to allow the user to scroll to other areas of the screen. Check out the Android developer docs on horizontal scroll view.
Upvotes: 0