Android : Is it better to choose ViewwGroup then ListView for below case in android? -


i application need list of items , each item contains

  1. textview
  2. progressbar
  3. download button
  4. 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

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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -