mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 10:18:59 +03:00
hide search and option menu when showing contact list
This commit is contained in:
parent
54f8d3091c
commit
33544f65e7
1 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,7 @@ import android.support.v7.app.AlertDialog;
|
|||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
@ -94,6 +95,7 @@ public class ContactListFragment extends FileFragment {
|
|||
public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
|
||||
View view = inflater.inflate(R.layout.contactlist_fragment, null);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
ArrayList<VCard> vCards = new ArrayList<>();
|
||||
checkedVCards = new HashSet<>();
|
||||
|
@ -165,6 +167,14 @@ public class ContactListFragment extends FileFragment {
|
|||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareOptionsMenu(Menu menu) {
|
||||
menu.findItem(R.id.action_search).setVisible(false);
|
||||
menu.findItem(R.id.action_sync_account).setVisible(false);
|
||||
menu.findItem(R.id.action_sort).setVisible(false);
|
||||
menu.findItem(R.id.action_switch_view).setVisible(false);
|
||||
}
|
||||
|
||||
static class ContactItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView badge;
|
||||
private CheckedTextView name;
|
||||
|
|
Loading…
Reference in a new issue