How I can inflating another layout in bindView? I can with condition change layout.
For example: if(condition) show blank layout
My Code:
@Override
public void bindView(View view, Context context, Cursor cursor) {
final ViewHolder holder = (ViewHolder)view.getTag();
final int goftarId = cursor.getInt(holder.column_id);
if(deleteListId.contains(goftarId)) {
// not worked !!!!
view = LayoutInflater.from(context).inflate(R.layout.blank_row, null, false);
} else {
// not worked !!!!
view = LayoutInflater.from(context).inflate(R.layout.default_row, null, false);
}
holder.tvText.setText(cursor.getString(holder.column_gtext));
}
It is very important for me to be optimized.
If you know a better solution, please say me.