title: Migrate my normal RecyclerView to RecyclerView Databinding
body: <p>I have issue when I change some value, example delete comment in my recyclerview it's doesn't update automatically, Google says use LiveData DataBinding RecyclerView, is anyone ever to make RecyclerView LiveData databinding please help me out</p>
  
  <p>This is my MainActivity.java</p>
  
  <pre><code>public class TabDetailHotActivity extends AppCompatActivity {
  
  //GLOBAL
  public static MainActivity mainActivity_;
  
  TextView TVGameDate;
  TextView TVGameTitle;
  ImageView IMGGameImage;
  
  TextView TVSeenCounter;
  TextView TVCommentCounter;
  TextView TVLikeCounter;
  
  ImageView IMGSeenView;
  ImageView IMGCommentView;
  ImageView IMGLikeView;
  
  ImageView ICONHotTrendingNewsSaving;
  
  
  //EVENT BUS
  @Subscribe(threadMode = ThreadMode.MAIN)
  public void onMessageEvent(MainActivity.EventStoredMessageTrending event) {
      getMessageTrendingMainActivity(event.SendMessageUrutan, event.SendTotalThread, event.SendMessageIDComment, event.SendMessageComment, event.SendMessageEntryTime, event.SendMessageisEdited, event.SendMessageEditTime);
  
  }
  @Subscribe(threadMode = ThreadMode.MAIN)
  public void onMessageEvent(MainActivity.EventStoredMessageTrendingLogin event) {
      getMessageTrendingLoginMainActivity(event.SendMessageUrutan, event.SendTotalThread, event.SendMessageIDComment, event.SendMessageComment, event.SendMessageEntryTime, event.SendMessageisEdited, event.SendMessageEditTime, event.SendMessageEditable);
  
  }
  public void getMessageTrendingMainActivity(int ReceivedMessageUrutan, int ReceivedTotalThread, String ReceivedMessageIDComment, String ReceivedMessageComment, String ReceivedMessageEntryTime, int ReceivedMessageEdited, String ReceivedMessageEditTime){
      Toast.makeText(this, "Load Comment Not Login :( &gt;&gt; ReceivedMessageComment:"+ReceivedMessageComment+", Toast.LENGTH_LONG).show();
  }
  public void getMessageTrendingLoginMainActivity(int ReceivedMessageUrutan, int ReceivedTotalThread, String ReceivedMessageIDComment, String ReceivedMessageComment, String ReceivedMessageEntryTime, int ReceivedMessageEdited, String ReceivedMessageEditTime, int ReceivedMessageEditable){
      Toast.makeText(this, "Load Comment Login :) &gt;&gt; ReceivedMessageComment:" + ReceivedMessageComment, Toast.LENGTH_LONG).show();
      createDummyDataComment(ReceivedMessageUrutan, ReceivedTotalThread, ReceivedMessageIDComment, ReceivedMessageComment, ReceivedMessageEntryTime, ReceivedMessageEdited, ReceivedMessageEditTime, ReceivedMessageEditable);
  
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activitydetail_tabhot);
  
  
  
      ToolbarX = findViewById(R.id.toolbar);
      setSupportActionBar(ToolbarX);
      getSupportActionBar().setTitle("");
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  
      final CollapsingToolbarLayout collapsingToolbarLayout = findViewById(R.id.collapsing_toolbar);
      collapsingToolbarLayout.setTitle("");
  
      Intent intent = getIntent();
      mDummyIDContent = intent.getStringExtra("DummyIDContentPKG");
      mDummyTitle = intent.getStringExtra("DummyTitlePKG");
      mDummyPublishTime = intent.getStringExtra("DummyPublishTimePKG");
      mDummyImageOriPKG = intent.getStringExtra("DummyImageOriPKG");
      mDummyShortDescription = intent.getStringExtra("DummyShortDescriptionPKG");
      mDummySeen = intent.getIntExtra("DummySeenPKG", 0);
      mDummyComment = intent.getIntExtra("DummyCommentPKG", 0);
      mDummyLike = intent.getIntExtra("DummyLikePKG", 0);
      mDummyisComment = intent.getIntExtra("DummyisCommentPKG", 0);
      mDummyisLike = intent.getIntExtra("DummyisLikePKG", 0);
      mDummyisBookmark = intent.getIntExtra("DummyisBookmarkPKG", 0);
  
  
  
  
  
      date_Behaviour = findViewById(R.id.date_behavior);
  
      IMGGameImage = findViewById(R.id.backdrop);
  
      TVGameDate = findViewById(R.id.date);
      TVGameTitle = findViewById(R.id.title);
  
      TVSeenCounter = findViewById(R.id.TV_SeenCounter);
      TVCommentCounter = findViewById(R.id.TV_CommentCounter);
      TVLikeCounter = findViewById(R.id.TV_LikeCounter);
  
  
      RequestOptions requestOptions = new RequestOptions();
      requestOptions.error(UtilsNews.getRandomDrawbleColor());
  
  
  
      TVGameDate.setText(mDummyPublishTime);
      TVGameTitle.setText(mDummyTitle);
  
      TVSeenCounter.setText(String.valueOf(mDummySeen));
      TVCommentCounter.setText(String.valueOf(mDummyComment));
      TVLikeCounter.setText(String.valueOf(mDummyLike));
  
  
      Glide.with(this)
              .load(mDummyImageOriPKG)
              .apply(requestOptions)
              .transition(DrawableTransitionOptions.withCrossFade())
              .into(IMGGameImage);
      /*     initWebView(mUrl);*/
  
  
      ImageButton BTNSendMessageDetailHotTrendingNews = findViewById(R.id.BTN_SendMessageDetailHotTrendingNews);
  
      final TextView ETSendMessageDetailHotTrendingNews = findViewById(R.id.ET_SendMessageDetailHotTrendingNews);
      BTNSendMessageDetailHotTrendingNews.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              String TheMessage = ETSendMessageDetailHotTrendingNews.getText().toString();
              if(!TheMessage.equals("")){
                  if(mainActivity_!=null) {
                      mainActivity_.rncryptorLoadSendEditDelete("SendComment", mDummyIDContent, TheMessage);
                  }
              }else{
                  Toast.makeText(TabDetailHotActivity.this, "You don't send anything", Toast.LENGTH_SHORT).show();
              }
              ETSendMessageDetailHotTrendingNews.setText("");
          }
      });
  
      //
      if(mainActivity_!=null) {
          mainActivity_.rncryptorLoadSendEditDelete("LoadComment", mDummyIDContent, "");
      }
  
  }
  
  private void initWebView(String url) {
      WebView webView = findViewById(R.id.webView);
      webView.getSettings().setLoadsImagesAutomatically(true);
      webView.getSettings().setJavaScriptEnabled(true);
      webView.getSettings().setDomStorageEnabled(true);
      webView.getSettings().setSupportZoom(true);
      webView.getSettings().setBuiltInZoomControls(true);
      webView.getSettings().setDisplayZoomControls(true);
      webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
      webView.setWebViewClient(new WebViewClient());
      webView.loadUrl(url);
  }
  
  ArrayList&lt;ModelDetailHotTrendingNewsComment&gt; modelDetailHotTrendingNewsComments = new ArrayList&lt;ModelDetailHotTrendingNewsComment&gt;();
  AdapterDetailHotTrendingNewsComment.RecyclerViewClickListener listenerDetailHotTrendingNewsComment;
  public void createDummyDataComment(int ReceivedMessageUrutan, int ReceivedTotalThread, final String ReceivedMessageIDComment, String ReceivedMessageComment, String ReceivedMessageEntryTime, int ReceivedMessageEdited, String ReceivedMessageEditTime, int ReceivedMessageEditable) {
      modelDetailHotTrendingNewsComments.add(new ModelDetailHotTrendingNewsComment(ReceivedMessageIDComment,ReceivedMessageComment,ReceivedMessageEntryTime,ReceivedMessageEditable,ReceivedMessageEditTime));
  
      if(ReceivedMessageUrutan ==  ReceivedTotalThread-1){
          listenerDetailHotTrendingNewsComment = new AdapterDetailHotTrendingNewsComment.RecyclerViewClickListener(){
              @Override
              public void onRowDetailHotTrendingNewsContainerClick(View view, int position) {
  
              }
  
              @Override
              public void onRowMessageEditClick(View view, int position) {
  
              }
  
              @Override
              public void onRowMessageDeleteClick(View view, final int position) {
                  String[] YOURCHOICE = {"Yes", "No"};
                          AlertDialog.Builder builder = new AlertDialog.Builder(TabDetailHotActivity.this);
                          builder.setTitle("Do you want to delete this comment?");
                          builder.setItems(YOURCHOICE, new DialogInterface.OnClickListener() {
                              @Override
                              public void onClick(DialogInterface dialog, int which) {
                                  if(which == 0){
                                      Toast.makeText(TabDetailHotActivity.this, "Deleted Successfully!", Toast.LENGTH_SHORT).show();
                                      if(mainActivity_!=null) {
                                          mainActivity_.rncryptorLoadSendEditDelete("DeleteComment", modelDetailHotTrendingNewsComments.get(position).getIdcontent(), "");
                                      }
                                  }else if(which == 1){
                                      Toast.makeText(TabDetailHotActivity.this, "You don't delete the Comment", Toast.LENGTH_SHORT).show();
                                  }
                              }
                          });
                          builder.show();
              }
  
  
          };
  
          RecyclerView RVDetailHotTrendingNewsComment = findViewById(R.id.RVDetail_HotTrendingNewsComment);
          RVDetailHotTrendingNewsComment.setHasFixedSize(true);
          AdapterDetailHotTrendingNewsComment adapterDetailHotTrendingNewsComment = new AdapterDetailHotTrendingNewsComment(this, modelDetailHotTrendingNewsComments, listenerDetailHotTrendingNewsComment);
          RVDetailHotTrendingNewsComment.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
          RVDetailHotTrendingNewsComment.setAdapter(adapterDetailHotTrendingNewsComment);
          //Optimized
          RVDetailHotTrendingNewsComment.setHasFixedSize(true);
          RVDetailHotTrendingNewsComment.setItemViewCacheSize(20);
      }
  
  }
  
  @Override
  public boolean onSupportNavigateUp() {
      onBackPressed();
      return true;
  }
  
  @Override
  public void onBackPressed() {
      super.onBackPressed();
      supportFinishAfterTransition();
  }
  
  
  //EVENTBUS
  @Override
  public void onStart() {
      super.onStart();
      EventBus.getDefault().register(this);
  }
  
  @Override
  public void onStop() {
      EventBus.getDefault().unregister(this);
      super.onStop();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is my activity_main.xml</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.coordinatorlayout.widget.CoordinatorLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:fitsSystemWindows="true"
      android:background="@color/darkgrey"
      tools:context=".TabDetailHotActivity"&gt;
   
      &lt;androidx.core.widget.NestedScrollView
          app:layout_behavior="@string/appbar_scrolling_view_behavior"
          android:fitsSystemWindows="true"
          android:layout_width="match_parent"
          android:background="@color/darkgrey"
          android:layout_height="match_parent"&gt;
          &lt;LinearLayout
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"&gt;
  
  
                  &lt;RelativeLayout
                      android:layout_marginBottom="20dp"
                      android:layout_marginTop="20dp"
                      android:paddingLeft="16dp"
                      android:paddingRight="16dp"
                      android:background="@color/darkgrey"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"&gt;
                      &lt;TextView
                          android:id="@+id/title"
                          android:textColor="@color/colorWhite"
                          android:textStyle="bold"
                          android:fontFamily="sans-serif-light"
                          android:textSize="19sp"
                          android:text="Title of News"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          /&gt;
  
                      &lt;TextView
                          android:id="@+id/time"
                          android:layout_width="wrap_content"
                          android:layout_height="20dp"
                          android:layout_below="@id/title"
                          android:textColor="@color/colorWhite"
                          android:layout_marginTop="10dp"
                          android:maxLines="1"
                          android:drawablePadding="10dp"
                          android:singleLine="true"
                          android:ellipsize="end"
                          android:text="a time ago" /&gt;
  
  
                          &lt;ImageView
                              android:id="@+id/IMG_SeenView"
                              android:src="@drawable/watch"
                              android:layout_marginLeft="8dp"
                              android:layout_width="22dp"
                              android:layout_height="22dp"
                              android:layout_alignParentBottom="true"
                              android:layout_toLeftOf="@id/TV_SeenCounter"
                              android:paddingTop="2dp"
                              android:layout_marginTop="1dp"
                              android:scaleType="centerInside"
                              android:adjustViewBounds="true"/&gt;
  
                          &lt;TextView
                              android:id="@+id/TV_SeenCounter"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_alignParentBottom="true"
                              android:layout_toLeftOf="@id/IMG_CommentView"
                              android:text="999"
                              android:layout_marginTop="2dp"
                              android:textSize="14dp"
                              android:textColor="@color/white"
                              android:paddingLeft="@dimen/small_intrinsic_padding"
                              android:textAppearance="@style/TextAppearance.Second.Light" /&gt;
  
                          &lt;ImageView
                              android:id="@+id/IMG_CommentView"
                              android:src="@drawable/comment_off"
                              android:layout_toLeftOf="@id/TV_CommentCounter"
                              android:layout_alignParentBottom="true"
                              android:layout_width="18dp"
                              android:layout_height="18dp"
                              android:layout_marginTop="4dp"
                              android:layout_marginLeft="5dp"
                              android:layout_marginBottom="2dp"
                              android:scaleType="centerInside"
                              android:adjustViewBounds="true"/&gt;
  
                          &lt;TextView
                              android:id="@+id/TV_CommentCounter"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_alignParentBottom="true"
                              android:layout_toLeftOf="@id/IMG_LikeView"
                              android:layout_marginTop="2dp"
                              android:text="999"
                              android:textSize="14dp"
                              android:textColor="@color/white"
                              android:paddingLeft="@dimen/small_intrinsic_padding"
                              android:textAppearance="@style/TextAppearance.Second.Light" /&gt;
  
                          &lt;ImageView
                              android:id="@+id/IMG_LikeView"
                              android:src="@drawable/heart_off"
                              android:layout_alignParentBottom="true"
                              android:layout_toLeftOf="@id/TV_LikeCounter"
                              android:layout_width="18dp"
                              android:layout_height="18dp"
                              android:layout_marginTop="4dp"
                              android:layout_marginLeft="5dp"
                              android:layout_marginBottom="2dp"
                              android:scaleType="centerInside"
                              android:adjustViewBounds="true"/&gt;
  
  
                          &lt;TextView
                              android:id="@+id/TV_LikeCounter"
                              android:layout_width="wrap_content"
                              android:layout_height="wrap_content"
                              android:layout_marginTop="2dp"
                              android:layout_alignParentEnd="true"
                              android:text="999"
                              android:textSize="14dp"
                              android:layout_alignParentBottom="true"
                              android:textColor="@color/white"
                              android:paddingLeft="@dimen/small_intrinsic_padding"
                              android:textAppearance="@style/TextAppearance.Second.Light" /&gt;
  
  
  
  
                  &lt;/RelativeLayout&gt;
  
  
  
                  &lt;RelativeLayout
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@color/darkgrey"&gt;
  
                      &lt;ProgressBar
                          app:layout_behavior="@string/appbar_scrolling_view_behavior"
                          android:id="@+id/progress_bar"
                          android:layout_marginTop="50dp"
                          android:layout_marginBottom="70dp"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content" /&gt;
  
                      &lt;WebView
                          app:layout_behavior="@string/appbar_scrolling_view_behavior"
                          android:id="@+id/webView"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"/&gt;
  
  
  
  
  
                  &lt;/RelativeLayout&gt;
  
  
  
              &lt;RelativeLayout
                  android:id="@+id/RL_Bottom"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:padding="5dp"
                  android:background="#FFFFFF"
                  android:layout_alignParentBottom="true"&gt;
                  &lt;EditText
                      android:id="@+id/ET_SendMessageDetailHotTrendingNews"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:background="@android:color/transparent"
                      android:hint="Type a comment..."
                      android:layout_toLeftOf="@id/BTN_SendMessageDetailHotTrendingNews"
                      android:layout_centerVertical="true"/&gt;
  
                  &lt;ImageButton
                      android:id="@+id/BTN_SendMessageDetailHotTrendingNews"
                      android:layout_width="40dp"
                      android:layout_height="40dp"
                      android:src="@drawable/ic_send_black_24dp"
                      android:layout_alignParentEnd="true"
                      android:layout_alignParentRight="true"/&gt;
  
              &lt;/RelativeLayout&gt;
              &lt;RelativeLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:background="@color/darkgrey"&gt;
  
                  &lt;androidx.recyclerview.widget.RecyclerView
                      android:id="@+id/RVDetail_HotTrendingNewsComment"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"&gt;
  
                  &lt;/androidx.recyclerview.widget.RecyclerView&gt;
  
              &lt;/RelativeLayout&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/androidx.core.widget.NestedScrollView&gt;
  
      &lt;FrameLayout
          android:id="@+id/date_behavior"
          app:layout_anchor="@+id/appbar"
          app:behavior_autoHide="true"
          android:adjustViewBounds="true"
          app:layout_anchorGravity="right|end|bottom"
          android:clickable="false"
          android:background="@drawable/round_white"
          android:layout_width="wrap_content"
          android:padding="5dp"
          android:layout_alignParentBottom="true"
          android:layout_alignParentRight="true"
          android:layout_marginRight="20dp"
          android:layout_marginBottom="410dp"
          android:layout_height="wrap_content"
          tools:ignore="UnusedAttribute"&gt;
          &lt;ImageView
              android:src="@drawable/ic_date"
              android:layout_width="18dp"
              android:layout_height="18dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"/&gt;
          &lt;TextView
              android:textColor="#606060"
              android:id="@+id/date"
              android:layout_marginLeft="27dp"
              android:layout_marginRight="10dp"
              android:text="01 January 1990"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
      &lt;/FrameLayout&gt;
  
  
  
  
  
  &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is AdapterComment.java</p>
  
  <pre><code>public class AdapterDetailHotTrendingNewsComment extends RecyclerView.Adapter {
  
  private Context mContext;
  private ArrayList&lt;ModelDetailHotTrendingNewsComment&gt; modelDetailHotTrendingNewsComments;
  
  private AdapterDetailHotTrendingNewsComment.RecyclerViewClickListener mListener;
  
  public AdapterDetailHotTrendingNewsComment(Context mContext, ArrayList&lt;ModelDetailHotTrendingNewsComment&gt; modelDetailHotTrendingNewsComments, AdapterDetailHotTrendingNewsComment.RecyclerViewClickListener mListener) {
      this.mContext = mContext;
      this.modelDetailHotTrendingNewsComments = modelDetailHotTrendingNewsComments;
      this.mListener = mListener;
  }
  
  @NonNull
  @Override
  public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
      View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.itemdetail_hottrendingnewscomment, null);
      return new DetailHotTrendingNewsViewHolder(v, mListener);
  }
  
  @Override
  public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
      final DetailHotTrendingNewsViewHolder detailHotTrendingNewsViewHolder = (DetailHotTrendingNewsViewHolder) holder;
      final ModelDetailHotTrendingNewsComment modelDetailHotTrendingNewsCommentX = modelDetailHotTrendingNewsComments.get(position);
  
      Glide.with(mContext).load(modelDetailHotTrendingNewsCommentX.getMessageimage()).into(detailHotTrendingNewsViewHolder.IMGMessageImage);
      detailHotTrendingNewsViewHolder.TVMessageUsername.setText(modelDetailHotTrendingNewsCommentX.getMessageusername());
      detailHotTrendingNewsViewHolder.TVMessageDescription.setText(modelDetailHotTrendingNewsCommentX.getMessagedescription());
      detailHotTrendingNewsViewHolder.TVMessageDate.setText(modelDetailHotTrendingNewsCommentX.getMessagedate());
  
  
  }
  
  @Override
  public int getItemCount() {
      int itemCount = modelDetailHotTrendingNewsComments.size();
      return itemCount;
  }
  
  public class DetailHotTrendingNewsViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{
  
  
      ImageView IMGMessageImage;
      TextView TVMessageUsername;
      TextView TVMessageDescription;
      TextView TVMessageDate;
  
      private RelativeLayout ROWDetailHotTrendingNewsContainer;
      TextView TVMessageEdit;
      ImageView IMGMessageDelete;
  
  
      private AdapterDetailHotTrendingNewsComment.RecyclerViewClickListener mListener;
  
      public DetailHotTrendingNewsViewHolder(View itemView, AdapterDetailHotTrendingNewsComment.RecyclerViewClickListener listener) {
          super(itemView);
  
          IMGMessageImage = itemView.findViewById(R.id.IMG_MessageImage);
          TVMessageUsername = itemView.findViewById(R.id.TV_MessageUsername);
          TVMessageDescription = itemView.findViewById(R.id.TV_MessageDescription);
          TVMessageDate = itemView.findViewById(R.id.TV_MessageDate);
  
          ROWDetailHotTrendingNewsContainer = itemView.findViewById(R.id.ROW_DetailHotTrendingNewsContainer);
          TVMessageEdit = itemView.findViewById(R.id.TV_MessageEdit);
          IMGMessageDelete = itemView.findViewById(R.id.IMG_MessageDelete);
  
          mListener = listener;
          ROWDetailHotTrendingNewsContainer.setOnClickListener(this);
          TVMessageEdit.setOnClickListener(this);
          IMGMessageDelete.setOnClickListener(this);
  
      }
  
      @Override
      public void onClick(View v) {
          switch (v.getId()) {
              case R.id.ROW_DetailHotTrendingNewsContainer:
                  mListener.onRowDetailHotTrendingNewsContainerClick(ROWDetailHotTrendingNewsContainer, getAdapterPosition());
                  break;
              case R.id.TV_MessageEdit:
                  mListener.onRowMessageEditClick(TVMessageEdit, getAdapterPosition());
                  break;
              case R.id.IMG_MessageDelete:
                  mListener.onRowMessageDeleteClick(IMGMessageDelete, getAdapterPosition());
                  break;
              default:
                  break;
          }
      }
  
  }
  
  public interface RecyclerViewClickListener {
      void onRowDetailHotTrendingNewsContainerClick(View view, int position);
      void onRowMessageEditClick(View view, int position);
      void onRowMessageDeleteClick(View view, int position);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is ModelComment.java</p>
  
  <pre><code>public class ModelDetailHotTrendingNewsComment {
  private String idcontent;
  private String messageimage;
  private String messageusername;
  private String messagedescription;
  private String messagedate;
  private int messageisedit;
  private String messageedittime;
  
  private String messageedit;
  private String messagedelete;
  
  
  public ModelDetailHotTrendingNewsComment(String idcontent, String messagedescription, String messagedate, int messageisedit, String messageedittime) {
      this.idcontent = idcontent;
      this.messagedescription = messagedescription;
      this.messagedate = messagedate;
      this.messageisedit = messageisedit;
      this.messageedittime = messageedittime;
  }
  
  public String getIdcontent() {
      return idcontent;
  }
  
  public void setIdcontent(String idcontent) {
      this.idcontent = idcontent;
  }
  
  public String getMessageimage() {
      return messageimage;
  }
  
  public void setMessageimage(String messageimage) {
      this.messageimage = messageimage;
  }
  
  public String getMessageusername() {
      return messageusername;
  }
  
  public void setMessageusername(String messageusername) {
      this.messageusername = messageusername;
  }
  
  public String getMessagedescription() {
      return messagedescription;
  }
  
  public void setMessagedescription(String messagedescription) {
      this.messagedescription = messagedescription;
  }
  
  public String getMessagedate() {
      return messagedate;
  }
  
  public void setMessagedate(String messagedate) {
      this.messagedate = messagedate;
  }
  
  
  
  public String getMessageedittime() {
      return messageedittime;
  }
  
  public void setMessageedittime(String messageedittime) {
      this.messageedittime = messageedittime;
  }
  
  public String getMessageedit() {
      return messageedit;
  }
  
  public void setMessageedit(String messageedit) {
      this.messageedit = messageedit;
  }
  
  public String getMessagedelete() {
      return messagedelete;
  }
  
  public void setMessagedelete(String messagedelete) {
      this.messagedelete = messagedelete;
  }
  </code></pre>
  
  <p>}</p>
  
  <p><a href="https://i.stack.imgur.com/RW4xt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RW4xt.jpg" alt="The data doesn&#39;t update automatically when I set another value"></a></p>