Android: Getview Method Of Custom Adapter Not Called
I've searched through a lot of other answer for the same problem, but didn't found any solution that works for me. The problem, as the title says, is that the getView method from m
Solution 1:
I think in your R.layout.category_list
file you need to give the ListView the following attribute:
android:id="@android:id/list"
ListFragment (and ListActivity) look for this id to find the ListView
when you call methods like setListAdapter()
.
Also, if all you want is a ListView, you don't have to supply a layout file. Simply do not override onCreateView() and the system will provide a ListView
for you automatically. Only if you want a custom layout do you need to inflate one, and if you do, the ListView should have the id stated above.
Post a Comment for "Android: Getview Method Of Custom Adapter Not Called"