From df1109cde56acb8538256bdeccbc47664aea4f4a Mon Sep 17 00:00:00 2001 From: Johannes Baiter Date: Wed, 29 Oct 2014 02:05:20 +0100 Subject: Add filtering to password list --- .../java/com/zeapo/pwdstore/PasswordFragment.java | 14 +++++++ .../java/com/zeapo/pwdstore/PasswordStore.java | 41 ++++++++++++++++++++- .../main/res/drawable-hdpi/ic_action_search.png | Bin 0 -> 702 bytes .../main/res/drawable-mdpi/ic_action_search.png | Bin 0 -> 479 bytes .../main/res/drawable-xhdpi/ic_action_search.png | Bin 0 -> 900 bytes .../main/res/drawable-xxhdpi/ic_action_search.png | Bin 0 -> 1153 bytes app/src/main/res/menu/pwdstore.xml | 11 +++++- app/src/main/res/values/strings.xml | 1 + 8 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_action_search.png create mode 100644 app/src/main/res/drawable-mdpi/ic_action_search.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_action_search.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_search.png (limited to 'app') diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java index 4e8ef5ef..4d433013 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java @@ -126,6 +126,20 @@ public class PasswordFragment extends Fragment{ ((ActionBarActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(false); } + public void filterAdapter(String filter) { + if (filter.isEmpty()) { + updateAdapter(); + return; + } + for (int i=0; i + + @@ -17,7 +24,7 @@ Category + Search -- cgit v1.2.3