Inform the main activity that an item has been clicked, will handle it later

This commit is contained in:
Zeapo 2014-07-27 22:39:16 +01:00
parent ff845c0218
commit 3f5e93e5c3
2 changed files with 8 additions and 6 deletions

View file

@ -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));
}
}

View file

@ -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");
}
}