ListView is core component of android. Its feature of binding data dynamically and efficient loading is awesome. It give us lots of command and make our task easy.
There are three component in Listview Android
Biggest advantage of using BaseAdapter and ListView, is its efficient loading capacity. BaseAdapter bind view to ListView when every row created first time then it keeps all already created row in memory and load them from memory. This make ListView damn fast
In my code i have Holder class that make sure that we will inflate a row layout only when row is created first time
There are three component in Listview Android
- ListView Control Widget
- Base Adapter
- Activity
Base Adapter is used to bind data dynamically inside Listrow. So these are the few basic steps to create a Listview in Android
Step 1). Create Two Layout, one for Listview and activity background Second for ListView Row
Step 2) Create one Activity as controller to control and work like a bridge between BaseAdapter and Layout
Step 3) Adapter( or so called BaseAdapter)
You can download source code and play with it. This code output will be like that
ListView With Image |
In my code i have Holder class that make sure that we will inflate a row layout only when row is created first time
No comments:
Post a Comment