Пример #1
0
  /**
   * Recycle cell. This method should be called from getView in Adapter when use SWIPE_ACTION_CHOICE
   *
   * @param convertView parent view
   * @param position position in list
   */
  public void recycle(View convertView, int position) {
    touchListener.reloadChoiceStateInView(convertView.findViewById(swipeFrontView), position);
    touchListener.reloadSwipeStateInView(convertView.findViewById(swipeFrontView), position);

    // Clean pressed state (if dismiss is fire from a cell, to this cell, with a press drawable, in
    // a swipelistview
    // when this cell will be recycle it will still have his pressed state. This ensure the pressed
    // state is
    // cleaned.
    for (int j = 0; j < ((ViewGroup) convertView).getChildCount(); ++j) {
      View nextChild = ((ViewGroup) convertView).getChildAt(j);
      nextChild.setPressed(false);
    }
  }
Пример #2
0
 /**
  * Recycle cell. This method should be called from getView in Adapter when use SWIPE_ACTION_CHOICE
  *
  * @param convertView parent view
  * @param position position in list
  */
 public void recycle(View convertView, int position) {
   touchListener.reloadChoiceStateInView(convertView.findViewById(swipeFrontView), position);
 }