I am trying to build an app where the main activity involves a scrollable subway map. It will have buttons integrated on every subway station. I am stuck because I have no idea how to make a background scrollable, furthermore, allowing my buttons to scroll with the background. I also need the scrolling to scroll in x and y dimensions.

有帮助吗?

解决方案

Add a ScrollView and then throw whatever your layout is inside of it (note that it can only have one child) http://developer.android.com/reference/android/widget/ScrollView.html

EDIT: Never mind, I didn't realize you needed 2D scrolling but thankfully there's this

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top