Esempio n. 1
0
  private void appendComment(BotAdapter.Type type, String comment) {

    botAdapter.addItem(type, comment);
    botAdapter.setAnimationsLocked(false);
    botAdapter.setDelayEnterAnimation(false);

    if (rvComments.getChildCount() > 0) {
      rvComments.smoothScrollBy(
          0, rvComments.getChildAt(0).getHeight() * botAdapter.getItemCount());
    }
  }
Esempio n. 2
0
 private void animateContent() {
   botAdapter.updateItems();
   llAddComment
       .animate()
       .translationY(0)
       .setInterpolator(new DecelerateInterpolator())
       .setDuration(200)
       .start();
 }