Remove key list filter for now

This commit is contained in:
Dominik Schürmann 2014-10-13 15:53:39 +02:00
parent bfafc44a33
commit e9abe57aa7
2 changed files with 28 additions and 28 deletions

View File

@ -102,12 +102,12 @@ public class KeyListFragment extends LoaderFragment
private KeyListAdapter mAdapter;
private StickyListHeadersListView mStickyList;
private ListAwareSwipeRefreshLayout mSwipeRefreshLayout;
private Spinner mFilterSpinner;
// private Spinner mFilterSpinner;
// saves the mode object for multiselect, needed for reset at some point
private ActionMode mActionMode = null;
private boolean mShowAllKeys = false;
private boolean mShowAllKeys = true;
private String mQuery;
private SearchView mSearchView;
@ -237,7 +237,7 @@ public class KeyListFragment extends LoaderFragment
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mFilterSpinner = (Spinner) getActivity().findViewById(R.id.key_list_filter_spinner);
// mFilterSpinner = (Spinner) getActivity().findViewById(R.id.key_list_filter_spinner);
List<String> list = new ArrayList<String>();
list.add(getString(R.string.key_list_filter_show_certified));
list.add(getString(R.string.key_list_filter_show_all));
@ -248,30 +248,30 @@ public class KeyListFragment extends LoaderFragment
dataAdapter.setDropDownViewResource
(android.R.layout.simple_spinner_dropdown_item);
mFilterSpinner.setAdapter(dataAdapter);
// mFilterSpinner.setAdapter(dataAdapter);
mFilterSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position) {
case 0: {
mShowAllKeys = false;
getLoaderManager().restartLoader(0, null, KeyListFragment.this);
break;
}
case 1: {
mShowAllKeys = true;
getLoaderManager().restartLoader(0, null, KeyListFragment.this);
break;
}
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
// mFilterSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
// @Override
// public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
// switch (position) {
// case 0: {
// mShowAllKeys = false;
// getLoaderManager().restartLoader(0, null, KeyListFragment.this);
// break;
// }
// case 1: {
// mShowAllKeys = true;
// getLoaderManager().restartLoader(0, null, KeyListFragment.this);
// break;
// }
// }
// }
//
// @Override
// public void onNothingSelected(AdapterView<?> parent) {
//
// }
// });
mStickyList.setOnItemClickListener(this);
mStickyList.setAreHeadersSticky(true);

View File

@ -13,7 +13,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<!--<LinearLayout
android:orientation="vertical"
android:background="@color/holo_gray_bright"
android:layout_width="match_parent"
@ -33,7 +33,7 @@
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
</LinearLayout>
</LinearLayout>-->
<fragment
android:id="@+id/key_list_fragment"