android - why use simple_list_item_1 when calling ArrayAdapter -
i understand simple_list_item_1 pre written xml layout file use when creating listview.
pass in 1 of parameters constructor of arrayadapter<>. why need middleman?
android manual on constructor says parameter needs "the resource id layout file containing layout use when instantiating views." want understand why in examples i've seen, use simple_list_item_1, instead of passing in own layout file contains listview want populate.
thanks
most because easy use canned code readily available. if there's no need write own layout, why bother? if there need customization, make own layout , pass through instead. here's link tutorial sms app uses custom layout rows in listview:
http://adilsoomro.blogspot.com/2012/12/android-listview-with-speech-bubble.html
hope helps!
Comments
Post a Comment