Reputation: 1
I want to create some kind of a tower defense map using a background image which is fourth as large as the screen of the device (twice horizontal, twice vertical).
my question is, how can I do this best. I'm new to Android, just got some Java basics , and want ti try out some stuff.
I want the user to scroll over the entire map using their finger and want him to zoom in via 2 finger pinch, and of course the objects (towers, sprites) should stay were they are.
I've been searching for hours for now and only found answers like " use Scrollview". I just want a food for thought to get in the right way, maybe with some examples.
Upvotes: 0
Views: 179
Reputation: 5671
You can use ImageView
and set appropriate onTouchListener
where you will detect pinch-to-zoom gesture using GestureDetector
and change view coordinates when user drags the finger.
Upvotes: 1