Android : Is it better to choose ViewwGroup then ListView for below case in android? -
i application need list of items , each item contains
- textview
- progressbar
- download button
- cancel button
when ever click on download button progressbar starts , running fine. . have binded each row view data object . in download task i.e; asynctask using view update. when scrolling list , progress visible @ differnt row actual row.i dont know reason ?
so, decided avoid listview , go creating viewgroup , adding views linearly these views. (but donno how handle onclicklistens download , button , cancel button ) way or other possible way ? performance role ? can 1 me out these please ?
thanking ,
srinivas
how long list?
if < 10 items (round about, need check). switch listview
- scrollview
- linearlayout
- item 1
- item 2
- item 3
- linearlayout
where each of items contain items etc. , it's still scrollable.
then, attach tag each item , use tag in onclick
handler:
public void handleclick(view v) { // use v.gettag(); }
tag can define in xml via android:tag="1234"
or in code.
if know viewparent (which class), can cast appropriate class , "tag" there.
Comments
Post a Comment