Skip to content Skip to sidebar Skip to footer

How To Add Textwatcher To Activity In Android

I am very much new to android and trying to learn various techniques including Search bar using Edit Text options. I am currently parsing Twitter using JSON and storing it in a lis

Solution 1:

Where you are setting the adapter try changing this to TwitterFeedActivity.this as follows...

listView.setAdapter(newTwitterFeedAdapter(TwitterFeedActivity.this, R.layout.list_item, array_sort));

EDIT: Also your code is missing a comma between R.layout.list_item and array_sort. I've added it to my example above.

Solution 2:

Came across a similar issue trying to implement a TextWatcher

Simply needed to add

@OverridepublicvoidbeforeTextChanged(CharSequence s, int start, int count, int after) {
}

@OverridepublicvoidonTextChanged(CharSequence s, int start, int before, int count) {
}

Left them blank and it fixed my problem.

Post a Comment for "How To Add Textwatcher To Activity In Android"