android RecyclerView获得单个Item的Vie

2018-05-07  本文已影响1177人  S_ZY
         if (position - firstItemPosition >= 0) {  
             //得到要更新的item的view  
             View view = mRecyclerView.getChildAt(position - firstItemPosition+1);  
             if (null != mRecyclerView.getChildViewHolder(view)){  
                 ProductsViewHolder viewHolder = (ProductsViewHolder)mRecyclerView.getChildViewHolder(view);  
   
 //do something  
            }  ```
上一篇下一篇

猜你喜欢

热点阅读