Don't show the FloatingActionMenu when scrolling in search
This commit is contained in:
parent
2fb740809b
commit
dc0f942c9a
1 changed files with 4 additions and 2 deletions
|
@ -62,6 +62,7 @@ public class MainActivity extends BaseActivity
|
||||||
|
|
||||||
private EntriesCardAdapter adapter;
|
private EntriesCardAdapter adapter;
|
||||||
private FloatingActionMenu floatingActionMenu;
|
private FloatingActionMenu floatingActionMenu;
|
||||||
|
private SearchView searchView;
|
||||||
private SimpleItemTouchHelperCallback touchHelperCallback;
|
private SimpleItemTouchHelperCallback touchHelperCallback;
|
||||||
|
|
||||||
private SharedPreferences sharedPref;
|
private SharedPreferences sharedPref;
|
||||||
|
@ -204,7 +205,8 @@ public class MainActivity extends BaseActivity
|
||||||
if (dy > 0) {
|
if (dy > 0) {
|
||||||
floatingActionMenu.hide();
|
floatingActionMenu.hide();
|
||||||
} else {
|
} else {
|
||||||
floatingActionMenu.show();
|
if (searchView == null || searchView.isIconified())
|
||||||
|
floatingActionMenu.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -318,7 +320,7 @@ public class MainActivity extends BaseActivity
|
||||||
getMenuInflater().inflate(R.menu.menu_main, menu);
|
getMenuInflater().inflate(R.menu.menu_main, menu);
|
||||||
|
|
||||||
MenuItem searchItem = menu.findItem(R.id.menu_search);
|
MenuItem searchItem = menu.findItem(R.id.menu_search);
|
||||||
SearchView searchView = (SearchView) searchItem.getActionView();
|
searchView = (SearchView) searchItem.getActionView();
|
||||||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextSubmit(String query) {
|
public boolean onQueryTextSubmit(String query) {
|
||||||
|
|
Loading…
Reference in a new issue