Disable search view from SelectPublicKeyFragment.
Needs to be fixed. When searching, previously selected keys are no longer selected.
This commit is contained in:
@@ -54,7 +54,7 @@ public class SelectPublicKeyFragment extends RecyclerFragment<SelectEncryptKeyAd
|
|||||||
implements TextWatcher, LoaderManager.LoaderCallbacks<Cursor> {
|
implements TextWatcher, LoaderManager.LoaderCallbacks<Cursor> {
|
||||||
public static final String ARG_PRESELECTED_KEY_IDS = "preselected_key_ids";
|
public static final String ARG_PRESELECTED_KEY_IDS = "preselected_key_ids";
|
||||||
|
|
||||||
private EditText mSearchView;
|
// private EditText mSearchView;
|
||||||
private long mSelectedMasterKeyIds[];
|
private long mSelectedMasterKeyIds[];
|
||||||
private String mQuery;
|
private String mQuery;
|
||||||
|
|
||||||
@@ -110,17 +110,18 @@ public class SelectPublicKeyFragment extends RecyclerFragment<SelectEncryptKeyAd
|
|||||||
LinearLayout innerListContainer = new LinearLayout(context);
|
LinearLayout innerListContainer = new LinearLayout(context);
|
||||||
innerListContainer.setOrientation(LinearLayout.VERTICAL);
|
innerListContainer.setOrientation(LinearLayout.VERTICAL);
|
||||||
|
|
||||||
mSearchView = new EditText(context);
|
// TODO: search is broken: When searching, previously selected keys are no longer selected
|
||||||
mSearchView.setId(android.R.id.input);
|
// mSearchView = new EditText(context);
|
||||||
mSearchView.setHint(R.string.menu_search);
|
// mSearchView.setId(android.R.id.input);
|
||||||
mSearchView.setCompoundDrawablesWithIntrinsicBounds(
|
// mSearchView.setHint(R.string.menu_search);
|
||||||
ContextCompat.getDrawable(
|
// mSearchView.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
context,
|
// ContextCompat.getDrawable(
|
||||||
R.drawable.ic_search_grey_24dp
|
// context,
|
||||||
), null, null, null);
|
// R.drawable.ic_search_grey_24dp
|
||||||
|
// ), null, null, null);
|
||||||
innerListContainer.addView(mSearchView, new LinearLayout.LayoutParams(
|
//
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
// innerListContainer.addView(mSearchView, new LinearLayout.LayoutParams(
|
||||||
|
// ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
|
||||||
RecyclerView listView = new RecyclerView(context);
|
RecyclerView listView = new RecyclerView(context);
|
||||||
listView.setId(INTERNAL_LIST_VIEW_ID);
|
listView.setId(INTERNAL_LIST_VIEW_ID);
|
||||||
@@ -155,7 +156,7 @@ public class SelectPublicKeyFragment extends RecyclerFragment<SelectEncryptKeyAd
|
|||||||
// Give some text to display if there is no data. In a real
|
// Give some text to display if there is no data. In a real
|
||||||
// application this would come from a resource.
|
// application this would come from a resource.
|
||||||
setEmptyText(getString(R.string.list_empty));
|
setEmptyText(getString(R.string.list_empty));
|
||||||
mSearchView.addTextChangedListener(this);
|
// mSearchView.addTextChangedListener(this);
|
||||||
|
|
||||||
setAdapter(new SelectEncryptKeyAdapter(getContext(), null));
|
setAdapter(new SelectEncryptKeyAdapter(getContext(), null));
|
||||||
setLayoutManager(new LinearLayoutManager(getContext()));
|
setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
|||||||
Reference in New Issue
Block a user