ViewHolder 模式提高了 ListView 滚动帧率,如下例所示: https ://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html
是否可以在对不同行使用不同类型的视图时保持这种模式?
换句话说,是否可以执行以下操作:
public View getView(int position, View view, ViewGroup parent) {
// calculate viewID here
if (view == null || *view is not null but was created from different XML than viewID* ) {
view = mInflater.inflate(viewId, null);