开发者

View holder Class in Android

开发者 https://www.devze.com 2023-01-08 16:57 出处:网络
This is a basic question. I was going through an official video by google regarding android. In it they used Viewholder class as

This is a basic question. I was going through an official video by google regarding android. In it they used Viewholder class as

static class Viewholder{ ImageView image; Textview text; }

Would it be right to declare this class as static or view holder is used as static inner class.

I think suppose if its top level class th开发者_运维百科en compiler will throw error while using static keyword with top level class.


Use static only if your ViewHolder is an inner class.

0

精彩评论

暂无评论...
验证码 换一张
取 消