Rightpoint / Raizlabs-Android-Style

The Raizlabs Android Style Guide
38 stars 3 forks source link

ViewHolders & Fragmetns #12

Open RZpowelldev opened 9 years ago

RZpowelldev commented 9 years ago

Using ViewHolders in Fragments doesn't seen to make sense. The ViewHolder pattern simplifies view reference lookups when constructing multiple similar views such as in a ListView. For one-off creation of views there is no performance gain. Is there some benefit I'm missing?

kenkyee commented 9 years ago

Seems odd to me as well...it's usually used for listviews or gridviews where you have to recycle views. For fragment layout view lookups, I've usually use Butterknife's @InjectView to simplify the boilerplate instead...