刷新搜索栏+的TextView在ListViewTextView、ListView

2023-09-06 19:00:38 作者:星空【情緣】

我有其中每个TextView的是应该显示搜索栏的值的列表视图。我有它的工作,这样一旦onStopTrackingTouch被称为一个搜索栏我更新相应的TextView。我想为作为用户的移动搜索栏,但我无法做一样的列表视图不会刷新经常发生变化。

I have a list view where each textview is supposed to show the value of the seekbar. I have got it working such that once the onStopTrackingTouch is called for a seekbar I update the corresponding textview. I would like for the change to occur as the user is moving the seekbar but I am having trouble doing the same as the listview doesn't refresh that often.

什么是实现这一目标的理想方法?

What would be an ideal method to achieve this?

推荐答案

因此​​,这里是我做什么,我定义了一个触摸监听getView之外,将其设置为TouchListener在getview搜索栏。该TouchListener返回视图作为参数,我的观点的家长和做了findViewByID搜索该tectview和更新它。

So here is what I did , I defined a touch listener outside of getView , set it as the TouchListener for seekbar in getview. The TouchListener returns the view as an argument , I got the view's parent and the did a findViewByID search for the tectview and updated it.