Making A ListView Holder For MainActivity
I have my listview working to display it on the MainActivity and the layout is set to have 3 TextView properties of a new Person object. My previous code was working but the scroll
Solution 1:
because there really is null
pay attention to check view == null
, and then view
never initialized
try this
view = layoutInflator.inflate(R.layout.list_layout, null);
Solution 2:
Just add reference to your view:
view = layoutInflator.inflate(R.layout.list_layout, null);
Solution 3:
view
is null, you're even checking for it:
if (view == null) { ...
}
What you're missing is assigning the inflated layout to view
view = layoutInflator.inflate(R.layout.list_layout, null);
Post a Comment for "Making A ListView Holder For MainActivity"