Tag Info

New answers tagged


You have to check if the player is too close to a side and move the view accordingly. If he is too much on one side then you don't center the view on him anymore. Here is an example of how I would do it. (I haven't tested it) //View is your current view. //Position is the position you want to center the view on. //Size is the size of your "area". void ...


Moving the View is probably not going to work out well -- the Surface part of the SurfaceView is managed by the Window Manager, not the View hierarchy, so updates tend to lag behind (which is why putting a SurfaceView in a ListView works badly). You don't want to be hitting callbacks in your animation loop. Leave the View and Surface in place and just ...

Top 50 recent answers are included