From 7a208baab08f0437c033d33c070b28cd607442d1 Mon Sep 17 00:00:00 2001 From: zeapo Date: Sun, 17 Aug 2014 02:33:53 +0200 Subject: Corrected a bug where visually the item was closed while it was open --- .../java/com/zeapo/pwdstore/PasswordFragment.java | 24 +--------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'app/src') 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) 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 -- cgit v1.2.3