android - My list is null after the first getView() -
i using 2 different lists because need information both. getitem(position) gets item mchampionlist can retrieve id , champion mchampionliststatic list. first time calls getview(), mchampionliststatic populated , can information needed. after that, mchampionliststatic null.
@override public view getview(int position, view convertview, viewgroup parent) { /// //holder stuff happens here, removed save space// /// champion champion = getitem(position); champion_static championstatic = mchampionliststatic.getchampionbyid(champion.getid()); holder.icon.setimageresource(mcontext.getresources().getidentifier(championstatic.getname().tolowercase(), "drawable", mcontext.getpackagename())); holder.name.settext(championstatic.getname()); return convertview; }
Comments
Post a Comment