简体   繁体   English

如何根据从上方水平滚动条中选择了哪个按钮来设置垂直滚动条的内容?

[英]How to set the contents of a vertical scrollview depending on what button is chosen from a horizontal scroll above?

I was just wondering if any of you guys could give me a heads up as to what this involves? 我只是想知道你们中的任何一个是否可以让我知道其中涉及什么?

I have used ScrollViews, I know they need a LinearLayout to scroll through and that isn't the problem. 我使用了ScrollViews,我知道它们需要LinearLayout才能滚动浏览,这不是问题。

It is that there is a dynamic horizontal ScrollView containing several buttons with buttons can be added/removed. 它是一个包含多个按钮的动态水平ScrollView,可以添加/删除按钮。

I also have a vertical scrollview. 我也有一个垂直的scrollview。

The GOAL is to set the contents of the vertical ScrollView depending on which button is pressed in the above horizontal ScrolLView. 目标是根据上方水平ScrolLView中按下的按钮来设置垂直ScrollView的内容。

Any direction/insight would be appreciated. 任何方向/见解将不胜感激。

Cheers 干杯

In ur Horizontal scroll view U have to set tag for individual views. 在ur水平滚动视图中,U必须为各个视图设置标签。 Then in on click event of a view u can populate the vertical scroll by required data. 然后,在视图的单击事件中,您可以通过所需数据填充垂直滚动。 I thinks for ur vertical scroll u can use the listview. 我认为对于您的垂直滚动,您可以使用listview。 It will be easy to handle. 这将很容易处理。 Also if ur horizontal things are in more numbers then its better to use the ListView for that even.. 另外,如果您的水平事物更多,那么最好甚至使用ListView。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM