View owner class in Android

This is the main question. I watched the official Google video for Android. In it, they used the Viewholder class as

static class Viewholder {Image ImageView; Text of the text; }

It would be right to declare this class as static or a view holder that is used as a static inner class.

I think, suppose its top-level class, and then the compiler will throw an error when using a static keyword with a top-level class.

+1
source share
1 answer

Use static only if your ViewHolder is an inner class.

+6
source

All Articles