From bd90f2140dd8368ff7541b91e9c57451c50000e1 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 16 Feb 2018 14:57:49 +0100 Subject: [PATCH] fixed search in abstractsearchablelistitem --- .../conversations/ui/AbstractSearchableListItemActivity.java | 3 +-- .../eu/siacs/conversations/ui/StartConversationActivity.java | 2 +- src/main/res/menu/choose_contact.xml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/AbstractSearchableListItemActivity.java b/src/main/java/eu/siacs/conversations/ui/AbstractSearchableListItemActivity.java index 8d6f093d7..153da435e 100644 --- a/src/main/java/eu/siacs/conversations/ui/AbstractSearchableListItemActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/AbstractSearchableListItemActivity.java @@ -104,8 +104,7 @@ public abstract class AbstractSearchableListItemActivity extends XmppActivity { getMenuInflater().inflate(R.menu.choose_contact, menu); final MenuItem menuSearchView = menu.findItem(R.id.action_search); final View mSearchView = menuSearchView.getActionView(); - mSearchEditText = (EditText) mSearchView - .findViewById(R.id.search_field); + mSearchEditText = (EditText) mSearchView.findViewById(R.id.search_field); mSearchEditText.addTextChangedListener(mSearchTextWatcher); menuSearchView.setOnActionExpandListener(mOnActionExpandListener); return true; diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index 98b227afc..967019aae 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -596,7 +596,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU menuHideOffline.setChecked(this.mHideOfflineContacts); mMenuSearchView = menu.findItem(R.id.action_search); mMenuSearchView.setOnActionExpandListener(mOnActionExpandListener); - View mSearchView = MenuItemCompat.getActionView(mMenuSearchView); + View mSearchView = mMenuSearchView.getActionView(); mSearchEditText = (EditText) mSearchView.findViewById(R.id.search_field); mSearchEditText.addTextChangedListener(mSearchTextWatcher); mSearchEditText.setOnEditorActionListener(mSearchDone); diff --git a/src/main/res/menu/choose_contact.xml b/src/main/res/menu/choose_contact.xml index 8921e7c2a..a1ae1c9b9 100644 --- a/src/main/res/menu/choose_contact.xml +++ b/src/main/res/menu/choose_contact.xml @@ -4,7 +4,7 @@