[英]Scrollable background and buttons on android main activity
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.
我还需要滚动才能在x和y维度上滚动。
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 添加一个
ScrollView
,然后在其中放置任何布局(请注意,它只能有一个孩子) 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 编辑:没关系,我不知道你需要的2D滚动但幸好有这
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.