Find the view on the last position of RecyclerView?

后端 未结 3 861
广开言路
广开言路 2021-01-29 15:18

The below code is to find the view on the first position. How do I find the view on the last position?

TextView textView = 
  (TextView)myRecyclerView.findViewHo         


        
3条回答
  •  心在旅途
    2021-01-29 15:59

    TextView textView =(TextView)myRecyclerView.findViewHolderForAdapterPosition(Arraylist.size()-1).itemView.findViewById(R.id.myTV); 
    

提交回复
热议问题