java - Custom ListView without extending ListActivity -


this question has answer here:

i trying create simple android project has organisation (of activity xml)

|image | button | button |

|listview row(image + text + image) |

| button |

the samples have seen extend listactivity , override getview method. problem see activity have list , not other things have shown in organisation.

it extending listview... not able find solution.

can guys please help..

thanks ton.

just follow these steps

  1. get listview xml using findviewbyid
  2. now set adapter in using listview.setadapter(new customadapter());
  3. create adapter extending baseadapter , override know getview method
  4. in getview method inflate xml (the 1 need showas arow)

  5. inflation getsystemservice(context.layout_inflator_service);

use inflate method...this returns xml reference view object use object , use findviewbyid on view set properties of imageview , textview inside row xml file.


Comments