开发者

View holder Class in Android

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜