fixed search in abstractsearchablelistitem
This commit is contained in:
parent
bf85d30421
commit
bd90f2140d
|
@ -104,8 +104,7 @@ public abstract class AbstractSearchableListItemActivity extends XmppActivity {
|
||||||
getMenuInflater().inflate(R.menu.choose_contact, menu);
|
getMenuInflater().inflate(R.menu.choose_contact, menu);
|
||||||
final MenuItem menuSearchView = menu.findItem(R.id.action_search);
|
final MenuItem menuSearchView = menu.findItem(R.id.action_search);
|
||||||
final View mSearchView = menuSearchView.getActionView();
|
final View mSearchView = menuSearchView.getActionView();
|
||||||
mSearchEditText = (EditText) mSearchView
|
mSearchEditText = (EditText) mSearchView.findViewById(R.id.search_field);
|
||||||
.findViewById(R.id.search_field);
|
|
||||||
mSearchEditText.addTextChangedListener(mSearchTextWatcher);
|
mSearchEditText.addTextChangedListener(mSearchTextWatcher);
|
||||||
menuSearchView.setOnActionExpandListener(mOnActionExpandListener);
|
menuSearchView.setOnActionExpandListener(mOnActionExpandListener);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -596,7 +596,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
||||||
menuHideOffline.setChecked(this.mHideOfflineContacts);
|
menuHideOffline.setChecked(this.mHideOfflineContacts);
|
||||||
mMenuSearchView = menu.findItem(R.id.action_search);
|
mMenuSearchView = menu.findItem(R.id.action_search);
|
||||||
mMenuSearchView.setOnActionExpandListener(mOnActionExpandListener);
|
mMenuSearchView.setOnActionExpandListener(mOnActionExpandListener);
|
||||||
View mSearchView = MenuItemCompat.getActionView(mMenuSearchView);
|
View mSearchView = mMenuSearchView.getActionView();
|
||||||
mSearchEditText = (EditText) mSearchView.findViewById(R.id.search_field);
|
mSearchEditText = (EditText) mSearchView.findViewById(R.id.search_field);
|
||||||
mSearchEditText.addTextChangedListener(mSearchTextWatcher);
|
mSearchEditText.addTextChangedListener(mSearchTextWatcher);
|
||||||
mSearchEditText.setOnEditorActionListener(mSearchDone);
|
mSearchEditText.setOnEditorActionListener(mSearchDone);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_search"
|
android:id="@+id/action_search"
|
||||||
android:actionLayout="@layout/actionview_search"
|
app:actionLayout="@layout/actionview_search"
|
||||||
android:icon="?attr/icon_search"
|
android:icon="?attr/icon_search"
|
||||||
app:showAsAction="collapseActionView|always"
|
app:showAsAction="collapseActionView|always"
|
||||||
android:title="@string/search"/>
|
android:title="@string/search"/>
|
||||||
|
|
Loading…
Reference in New Issue