机器人:同时滚动水平的ListView [英] android: simultaneously scrolling horizontal listView

查看:156
本文介绍了机器人:同时滚动水平的ListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑我有两个水平的ListView,如下图所示:

Consider I have two Horizontal ListView as shown below:

我想知道是否有可能使第二个列表(列表2)查看水平滚动同时与第一个列表(list1的)......

I want to know if it is possible to make the second list (list2) view scroll horizontally simultaneously along with the scroll of first list (list1).....

这是当我滚动list1的(水平),甚至列表2必须由滚动相同的偏移...

That is when I scroll list1 (horizontal), even list2 must scroll by the same offset...

这是可能的,如果是的话,请你帮助...

Is this possible, if yes, please do help...

[链接到图片]:的https://picasaweb.google.com/109389839906668906213/January132012#5697019272538269218

推荐答案

由于没有在Android中没有Horizo​​ntalListView,必须有另一个适配器看法,反正实现以下内容:

As There is no HorizontalListView in Android, you must having another adapter view, anyway implement following:

list1.setOnItemSelectedListener(new OnItemSelectedListener()
{
   public void onItemSelected(AdapterView adapterView adapterView, View view, int position, long id){
       list2.setSelection(position);
   }
});

这篇关于机器人:同时滚动水平的ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆