arraylist - How to match two arrary index in android -
i have doubt in app...
i have image arraylist , videos arraylist. i've displayed images in list.
now need - on onitemclick of image list, need play matched video of respective image. how implement this?
also, how match 2 array list? there possibility? appreciate help. thanks!
code..
bundle bundle = getintent().getextras(); array = bundle.getstringarraylist("string-array"); link = bundle.getstringarraylist("link-array"); gridviewconfig.addimageurls(); girgridview=(gridview) findviewbyid(r.id.gridview1_bir); girgridview.setadapter(new imageadapter(this)); girgridview.setonitemclicklistener(new adapterview.onitemclicklistener(){ @override public void onitemclick(adapterview<?> arg0, view view, int position,long arg3) { startactivity(new intent( intent.action_view, uri.parse("http://www.youtube.com/watch?feature=player_embedded&v=passd2ocu0c") )); }
i think use hashmap better,the key image , value video url
Comments
Post a Comment