Spinning progress bar in every listview item

后端 未结 6 535
日久生厌
日久生厌 2021-02-01 08:30

I\'ve been scratching my head over this for a long time now and searched for an answer without any luck! It seems to be trivial, but as far as I know, it isn\'t.

I use a

6条回答
  •  失恋的感觉
    2021-02-01 09:10

    1> Create Layout for list row

    
    
        
    
        
    
        
    
    

    2> Then in getView method

    if(word.getIsWordSynchedLocally() == 1){
                    convertView.findViewById(R.id.row_progress).setVisibility(View.GONE);
                    convertView.findViewById(R.id.speaker).setVisibility(View.VISIBLE);
                }else{
                    convertView.findViewById(R.id.row_progress).setVisibility(View.VISIBLE);
                    convertView.findViewById(R.id.speaker).setVisibility(View.GONE);
                }
    

提交回复
热议问题