mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-09-02 07:15:21 +00:00
Inform the main activity that an item has been clicked, will handle it later
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user