title: Android: SwipeListView click
body: <p>SwipeListView is working good,but sometimes have a problem that the "swipeBackView" item should be clicked if we click at the corresponding position at "swipeFrontView".Help me please and Thanks in advance.
  My xml codes are as follows:</p>
  
  <p>activity_home.xml:</p>
  
  <pre><code> &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="#ffffff" &gt;
  
      &lt;com.fortysevendeg.android.swipelistview.SwipeListView
          xmlns:swipe="http://schemas.android.com/apk/res-auto"
          android:id="@+id/lstRequests"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="#ffffff"
          android:listSelector="#00000000"
          swipe:swipeBackView="@+id/back"
          swipe:swipeCloseAllItemsWhenMoveList="true"
          swipe:swipeDrawableChecked="@drawable/choice_selected"
          swipe:swipeDrawableUnchecked="@drawable/choice_unselected"
          swipe:swipeFrontView="@+id/front"
          swipe:swipeMode="left" &gt;
      &lt;/com.fortysevendeg.android.swipelistview.SwipeListView
  
   &lt;/RelativeLayout&gt; 
  </code></pre>
  
  <p>package_row.xml:</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
           android:layout_width="fill_parent"
           android:layout_height="fill_parent"&gt;
  
  &lt;RelativeLayout
          android:id="@+id/back"             &lt;===
          style="@style/ListBackContent"
          android:layout_width="wrap_content"
          android:layout_height="110dp"   
          android:tag="back" &gt;
  
      &lt;LinearLayout
          android:id="@+id/backshowportion"
          style="@style/ListBackContent"
          android:layout_width="250dp"
          android:layout_height="110dp"
          android:layout_alignParentRight="true"
          android:layout_alignParentTop="true"
          android:background="@drawable/bg"
          android:gravity="right|center" &gt;
  
          &lt;TextView
               ..... /&gt;
  
          &lt;TextView
               ..... /&gt;
  
          &lt;TextView 
               ...../&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;RelativeLayout
          android:id="@+id/front"            &lt;===
          style="@style/ListFrontContent"
          android:layout_width="match_parent"
          android:layout_height="110dp"
          android:orientation="vertical"
          android:tag="front" &gt;
  
          &lt;TextView
               ..... /&gt;
  
          &lt;TextView
               ..... /&gt;
  
          &lt;TextView
               ..... /&gt;
  
          &lt;TextView
               ..... /&gt;
  
  
  &lt;/RelativeLayout&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>and the a portion of Class Code is as follows:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) 
  {
  swipeListView=(SwipeListView)findViewById(R.id.lstRequests);
  if (Build.VERSION.SDK_INT &gt;= 11) 
  {
      swipeListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
  }
  if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB) 
  {
      swipeListView.setMultiChoiceModeListener(new AbsListView.MultiChoiceModeListener() 
      {
          @Override
          public void onItemCheckedStateChanged(ActionMode mode, int position,long id, boolean checked)
          {
              mode.setTitle("Selected (" + swipeListView.getCountSelected() + ")");                  
          }
          @Override
          public void onDestroyActionMode(ActionMode mode) 
          {
              swipeListView.unselectedChoiceStates();
          }
          @Override
          public boolean onActionItemClicked(ActionMode mode,MenuItem item) 
          {
              return false;
          }
          @Override
          public boolean onCreateActionMode(ActionMode mode, Menu menu) 
          {
              return false;
          }
          @Override
          public boolean onPrepareActionMode(ActionMode mode, Menu menu)
          {
              return false;
          }
      });
  }
  }
  public void onStart()
  {
  super.onStart();        
  listner(); 
  }
  private void listner()
  {
   swipeListView.setSwipeListViewListener(new BaseSwipeListViewListener() 
   {          
          @Override
          public void onStartOpen(int position, int action, boolean right)
          {
               Log.d("swipe", String.format("onStartOpen %d - action %d", position, action));
          }
  
          @Override
          public void onStartClose(int position, boolean right)
          {
              Log.d("swipe", String.format("onStartClose %d", position));                 
          }   
  
          @Override
          public void onOpened(int position, boolean toRight)
          {   
  
          }   
  
          @Override
          public void onMove(int position, float x)
          {
  
          }   
  
          @Override
          public void onListChanged()
          {
  
          }
  
          @Override
          public void onLastListItem()
          {   
  
          }   
  
          @Override
          public void onFirstListItem()
          {   
  
          }   
  
          @Override
          public void onDismiss(int[] reverseSortedPositions) 
          {
  
          }
  
          @Override           
          public void onClosed(int position, boolean fromRight) 
          {   
  
          }   
  
          @Override
          public void onClickFrontView(int position)
          {
              Log.d("swipe", String.format("onClickFrontView %d", position));
              swipeListView.openAnimate(position);
          }   
  
          @Override
          public void onClickBackView(int position)
          {
              Log.d("swipe", String.format("onClickBackView %d", position));
              swipeListView.closeAnimate(position);
          }
  
          @Override
          public void onChoiceStarted() 
          {
  
          }
  
          @Override
          public void onChoiceEnded() 
          {   
  
          }   
  
          @Override
          public void onChoiceChanged(int arg0, boolean arg1) 
          {
  
          }   
  
          @Override
          public int onChangeSwipeMode(int arg0)
          {
              return 0;
          }
      });   
  </code></pre>