horizontalscrollview onclicklistener不会被调用 [英] horizontalscrollview onclicklistener doesn't get called
问题描述
我有 horizontalscrollview
显示一些项目。该项目动态添加。我想显示一个警告框的 horizontalscrollview
被点击时。有可能会或可能不会在 horizontalscrollview
的任何项目,所以我想horizontalscrollview采取依次点击。但OnClickListener dosint得到所谓
i have horizontalscrollview
displaying some items. The items are added dynamically. i want to show a alert box when the horizontalscrollview
is clicked. there may or may not be any items in the horizontalscrollview
so i want the horizontalscrollview to take the cick. But OnClickListener dosint get called
scrolv.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
slowAlert();
}
});
showAlert()不会被调用
showAlert() never gets called
推荐答案
有一件事你可以做的是对包含水平scrollsview视图点击侦听器。伴随着这一点,你可以有单纯疱疹病毒可点击藏汉每个视图。
One thing you could do is have the click listener on the view that contains the horizontal scrollsview. Along with this you could have each view in the HSV clickable aswell.
这篇关于horizontalscrollview onclicklistener不会被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!