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
Post a Comment