Jorodan Posted April 21, 2010 Share Posted April 21, 2010 Salut les jeunes! Je fais un bôôôô widget que je construit logiquement avec une RemoteViews depuis un XML layout. Dans mon XML, j'ai plusieurs boutons pour le widget... mais je ne vois pas comment retrouver ces boutons pour y lier l'écouter du clic. Quelqu'un a une idée de comment faire ça ? Merci d'avance! Link to comment Share on other sites More sharing options...
Fluckysan Posted April 22, 2010 Share Posted April 22, 2010 C'est la même façon de faire (rien ne change en fait) :) : Tu retrouves ton id via R.id.myButtonId Ensuite tu associs des PendingIntent à tes boutons myRemoteView.setOnClickPendingIntent(R.id.myButtonId, new PendingIntent(...), flag); Link to comment Share on other sites More sharing options...
Jorodan Posted April 22, 2010 Author Share Posted April 22, 2010 PendingIntent ??? Oula faut que je creuse pour ca... Merci Link to comment Share on other sites More sharing options...
Fluckysan Posted April 22, 2010 Share Posted April 22, 2010 C'est pas plus dur qu'un Intent normal t'inquiète Link to comment Share on other sites More sharing options...
Jorodan Posted April 22, 2010 Author Share Posted April 22, 2010 Ok ca marche merci! C'est quand même moins malléable qu'un bon écouteur onClick Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.