summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeapo <mohamed@zenadi.com>2014-08-17 02:33:53 +0200
committerzeapo <mohamed@zenadi.com>2014-08-17 02:33:53 +0200
commit7a208baab08f0437c033d33c070b28cd607442d1 (patch)
tree1576b58c1e691de7272c9252d1506eaf30b98f14
parent1208342a246ad91223c517a76e08b28c3de40663 (diff)
Corrected a bug where visually the item was closed while it was open
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java24
1 files changed, 1 insertions, 23 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
index d9346892..8278931b 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
@@ -73,8 +73,6 @@ public class PasswordFragment extends Fragment implements SwipeListViewListener
// Set the adapter
mListView = (SwipeListView) view.findViewById(R.id.pass_list);
((AdapterView<ListAdapter>) mListView).setAdapter(mAdapter);
- // Set OnItemClickListener so we can be notified on item clicks
-// mListView.setOnItemClickListener(this);
mListView.setSwipeListViewListener(this);
mListView.setSelectionFromTop(getArguments().getInt("Position"), 0);
@@ -102,27 +100,7 @@ public class PasswordFragment extends Fragment implements SwipeListViewListener
public void onPause() {
super.onPause();
mListener.savePosition(mListView.getFirstVisiblePosition());
-
- }
-
-// @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- PasswordItem item = mAdapter.getItem(position);
- if (item.getType() == PasswordItem.TYPE_PASSWORD) {
-// if (item.selected) {
-// item.selected = false;
-// } else {
-// View right = view.findViewById(R.id.row_buttons);
-// ScaleAnimation animation = new ScaleAnimation(view.getX(), 0, view.getY(), 0, Animation.RELATIVE_TO_SELF, (float)0.5, Animation.RELATIVE_TO_SELF, (float)0.5);
-// right.setAnimation(animation);
-// item.selected = true;
-// }
- } else 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(mAdapter.getItem(position));
- }
-
+ mListView.closeOpenedItems();
}
@Override