View is getting inflated everytime in getView. findViewById(…) is done many times. I have used View Holder

后端 未结 1 855
陌清茗
陌清茗 2021-01-15 17:10
public View getView(final int pos, View arg1, ViewGroup arg2) {

    ViewHolder holder;
    View view = arg1;

    if (arg1 == null) {
        holder = new ViewHolde         


        
相关标签:
1条回答
  • 2021-01-15 17:35

    If you have three items in your list, and there is space on the screen for three rows in your ListView, getView() will be called three times with a null View to create those three rows. You cannot recycle a row that is presently in use.

    0 讨论(0)
提交回复
热议问题