Demo entry 6359421

ViewHolder

   

Submitted by anonymous on Apr 28, 2017 at 09:25
Language: Java. Code size: 412 Bytes.

@Override  
       public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {  
           View view;  
           if (viewType == 0) {  
               view = inflater.inflate(R.layout.item_main_list, parent, false);  
           } else {  
               view = inflater.inflate(R.layout.item_main_type, parent, false);  
           }  
           return new ViewHolder(view);  
       }  

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).