Hy!
Мой ListView
всегда нулевой в моем коде. У меня нет плана почему. Ошибка происходит в методе setAdapter, пожалуйста, помогите
Код:
ListView lv = (ListView)findViewById(R.id.lv_sp);
ArrayList<SPEntry> list = new ArrayList<SPEntry> ();
EntryParse ep = new EntryParse(LVEntries.this, getIntent().getExtras().getString("JSON"));
list = ep.getList();
//list= new ArrayList<SPEntry>();
Log.e("SP",String.valueOf(list.size()));
ca = new CustomAdapter(this, R.layout.customlistitem, list);
lv.setAdapter(ca);
ca.notifyDataSetChanged();
Компоновка:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/lv_sp" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" ></ListView>
</LinearLayout>