diff options
author | Zeapo <mohamed@zenadi.com> | 2014-07-27 22:39:16 +0100 |
---|---|---|
committer | Zeapo <mohamed@zenadi.com> | 2014-07-27 22:39:16 +0100 |
commit | 3f5e93e5c30c937fe1efd10f947f538fcf7cb1a4 (patch) | |
tree | c3c59206e96a8d8dcc4df1ea51c17e69c79ef1a4 /app | |
parent | ff845c02184fad3fa0f3c6ba1e0ea7c685067be7 (diff) |
Inform the main activity that an item has been clicked, will handle it later
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java | 2 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/PasswordStore.java | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java index 2f9f655b..de5b0a58 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java @@ -88,7 +88,7 @@ public class PasswordFragment extends Fragment implements AbsListView.OnItemClic if (null != mListener) { // Notify the active callbacks interface (the activity, if the // fragment is attached to one) that an item has been selected. -// mListener.onFragmentInteraction(DummyContent.ITEMS.get(position).id); + mListener.onFragmentInteraction((String) mAdapter.getItem(position)); } } diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java index a31fa50e..9e45b38a 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java @@ -50,6 +50,7 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI checkLocalRepository(); Repository repository = PasswordRepository.getRepository(new File(getFilesDir() + "/store/.git")); PasswordRepository.getFilesList(); + PasswordRepository.getPasswords(); } @Override @@ -82,11 +83,6 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI } - @Override - public void onFragmentInteraction(String id) { - - } - private void checkLocalRepository() { int status = 0; final File localDir = new File(getFilesDir() + "/store/.git"); @@ -116,4 +112,10 @@ public class PasswordStore extends Activity implements ToCloneOrNot.OnFragmentI } } + /* If an item is clicked in the list of passwords, this will be triggered */ + @Override + public void onFragmentInteraction(String id) { + System.out.println(id + " Clicked"); + } + } |