mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-24 05:46:14 +03:00
Collapse search when needed
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
4362b59d16
commit
44bcef5d78
3 changed files with 6 additions and 1 deletions
|
@ -119,6 +119,8 @@ public class NoteEditFragment extends BaseNoteFragment {
|
|||
}
|
||||
searchView.setQuery(searchQuery, true);
|
||||
searchView.clearFocus();
|
||||
} else {
|
||||
searchMenuItem.collapseActionView();
|
||||
}
|
||||
|
||||
final LinearLayout searchEditFrame = searchView.findViewById(android.support.v7.appcompat.R.id
|
||||
|
|
|
@ -65,6 +65,8 @@ public class NotePreviewFragment extends BaseNoteFragment {
|
|||
}
|
||||
searchView.setQuery(searchQuery, true);
|
||||
searchView.clearFocus();
|
||||
} else {
|
||||
searchMenuItem.collapseActionView();
|
||||
}
|
||||
|
||||
final LinearLayout searchEditFrame = searchView.findViewById(android.support.v7.appcompat.R.id
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
android:id="@+id/search"
|
||||
android:title="@string/action_search"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
android:orderInCategory="70"
|
||||
app:actionViewClass="android.support.v7.widget.SearchView"
|
||||
app:showAsAction="collapseActionView|always" />
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_favorite"
|
||||
|
|
Loading…
Reference in a new issue