标签:style blog color ar div sp c log new
/* * 万能的ViewHolder */ public static class ViewHolder { public static <T extends View> T get(View view, int id) { SparseArray<View> viewHolder = (SparseArray<View>) view.getTag(); if (viewHolder == null) { viewHolder = new SparseArray<View>(); view.setTag(viewHolder); } View chidlView = viewHolder.get(id); if (chidlView == null) { chidlView = view.findViewById(id); viewHolder.put(id, chidlView); } return (T)chidlView; } }
标签:style blog color ar div sp c log new
原文地址:http://www.cnblogs.com/shenyiya/p/3991697.html