tags:

views:

34

answers:

1

Hi

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 then compiler will throw error while using static keyword with top level class.

+1  A: 

Use static only if your ViewHolder is an inner class.

Romain Guy