Search in sources :

Example 1 with SlideRightAlphaAnimator

use of com.mikepenz.itemanimators.SlideRightAlphaAnimator in project Slide by ccrama.

the class CommentAdapter method editComment.

public void editComment(CommentNode n, CommentViewHolder holder) {
    if (n == null) {
        dataSet.loadMoreReply(this);
    } else {
        int position = getRealPosition(holder.getBindingAdapterPosition() - 1);
        final int holderpos = holder.getBindingAdapterPosition();
        currentComments.remove(position - 1);
        currentComments.add(position - 1, new CommentItem(n));
        listView.setItemAnimator(new SlideRightAlphaAnimator());
        ((Activity) mContext).runOnUiThread(new Runnable() {

            @Override
            public void run() {
                notifyItemChanged(holderpos);
            }
        });
    }
}
Also used : SlideRightAlphaAnimator(com.mikepenz.itemanimators.SlideRightAlphaAnimator) BaseActivity(me.ccrama.redditslide.Activities.BaseActivity) Activity(android.app.Activity)

Aggregations

Activity (android.app.Activity)1 SlideRightAlphaAnimator (com.mikepenz.itemanimators.SlideRightAlphaAnimator)1 BaseActivity (me.ccrama.redditslide.Activities.BaseActivity)1