Android appwidget, can i put buttons on it? -


i add twoo buttons on appwidget, set onclicklistener methods of this.

is there way it? how?

remoteviews views = new remoteviews(context.getapplicationcontext(), r.layout.main_view);  intent intent = new intent(context, inputbroadcastreceiver.class); // receiver class intent.putextra(extra_id, id); // extras  pendingintent pendingintent = pendingintent.getbroadcast(context, 0, intent,pendingintent.flag_update_current);             views.setonclickpendingintent(r.id.my_button, pendingintent); 

then override onreceive method in inputbroadcastreceiver , enjoy inputs ;)

broadcastreceivers explaining here.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -