Multiple clickable items in ListView inside android widget -


i'm trying make listview in widget there multiple clickable items in each row. example, if each row has data containing link, 1 button in row open link , share link.

sample code:

widget layout

<linearlayout...>  <textview../> <listview id="list_view" />  </linearlayout> 

each list row in listview has:

<linearlayout id="listrowparent">  <textview../> <button id="openbtn"/> <button id="sharebtn"/>  </linearlayout> 

i'm able set onclick of each row using

remoteviews.setpendingintenttemplate(r.id.list_view,                     *<pendingintent>*); //in onupdate 

and remoteview.setonclickfillinintent(r.id.openbtn, *fillintent*); // in adapter

which works fine, can't have setpendingintenttemplate list row button doing remoteviews.setpendingintenttemplate(r.id.sharebtn, ); since nothing happens on clicking button if this.

question: i'm attempting possible? if yes, appreciated :)

my bad. should using

remoteviews.setpendingintenttemplate(r.id.list_view,                     *<pendingintent>*); 

for both buttons, trying use button's id directly in second. got fixed.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -