public AdapterClass(Context a, int resourceID, List <Info> entries) {
super(a, resourceID, entries);
this.layoutResource = resourceID;
}
@
Override
public View getView(int position, View convertView, ViewGroup parent) {
final Object custom = getItem(position);
LinearLayout rowView = null;
if (convertView == null) {
rowView = new LinearLayout(getContext());
LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
vi.inflate(layoutResource, rowView);
} else
rowView = (LinearLayout) convertView;
if (custom != null) {
}
return rowView;
}
Я передаю две различные схемы во время выполнения, как я могу определить, какую раскладку я передаю в методе getView()
. Я использую ArrayAdapter
.определившего макет во время выполнения в ListView
где находится полный код? –
@PankajKumar: какой код вам потребуется, сделайте u хотите, как я передаю его адаптеру. – Kevin
@kevin проверить мой ответ –