Hello,
I have a listview in which i am loading data of size 400. for the
edittext i am giving
search_feild.addTextChangedListener(new TextWatcher() {
List<Show> _sortShow = new ArrayList<Show>();
public void afterTextChanged(Editable s) {
}
public void beforeTextChanged(CharSequence s, int start, int
count,
int after) {
}
public void onTextChanged(CharSequence s, int start, int before,
int count) {
searchStr = search_feild.getText().toString().trim()
.toLowerCase();
_sortShow.clear();
for (int i = 0; i < m_ChannelList.getData().size(); i++) {
if (textlength <= m_ChannelList.getData().get(i)
.getListing_name().length() || textlength <=
m_ChannelList.getData().get(i) .getCh_name().length()) {
Show show = m_ChannelList.getData().get(i);
if ((((String)
show.getListing_name().toLowerCase()) .contains(searchStr))
|| (((String) show.getCh_name().toLowerCase())
.contains(searchStr))
)
{
_sortShow.add(show);
}
sorted_ChannelList.setData(_sortShow);
adapter = new
LazyAdapterChannelList(ChannelGuideActivity.this,
sorted_ChannelList); setListAdapter(adapter);
}
});
it is blocking the UI,How to resolve it
--
Regards,
Vani Reddy
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en