Friday, 15 May 2015

android - For 4.1+, is getView() in fact the best way to get the "whole" cell view? -



android - For 4.1+, is getView() in fact the best way to get the "whole" cell view? -

say have listview complex cells many (say) buttons, going dynamically manipulating cell in realtime

the user clicks on button, "dive!"

so via onclick, let's in mainactivity, routine

public void clickeddivedivedive(view v) { int position = feed.getpositionforview(v); parseobject yourdata = (parseobject) list.getitematposition(position);

so have position no problem. , it's easy "data".

of course, view "v" is button, it's not whole cell.

i the following whole cell,

view thatwholecell = (view) adptr.getview(position, null, null);

you can holder needed, , manipulate cell/list.

com.you.viewholder holder = (com.you.viewholder) (thatwholecell.gettag()); state.do3ddrawingincell = true; state.workingcell = position; state.depth = 3.141592; etc feedadapter.notifydatasetchanged();

this fine i'm newb, this

view thatwholecell = (view) adptr.getview(position, null, null);

the best way "whole cell" @ step?

the problem android seems have varied on lastly few generations it's hard find "up date' info on this. thanks

android listview android-adapter

No comments:

Post a Comment