thanks! Now l want a EditText on the widget ,how can I do this? I think how I can input on widget On Aug 24, 11:52 pm, Alex Corbi <[email protected]> wrote: > Thanks, i appreciatte the help. > > On Aug 24, 4:27 pm, String <[email protected]> wrote: > > > On Aug 24, 1:05 pm, Alex Corbi <[email protected]> wrote: > > > > The question is, how can i register a OnClikListener so i know when > > > the user clicks the widget on the desktop > > > You send it through theRemoteViewsobject. Here's my code: > > > RemoteViewsviews = newRemoteViews(context.getPackageName(), > > R.layout.widget); > > views.setOnClickPendingIntent(R.id.click_target, > > PendingIntent.getActivity( > > context, > > 0, > > new Intent(context, MyActivity.class).setFlags > > (Intent.FLAG_ACTIVITY_NEW_TASK), > > PendingIntent.FLAG_UPDATE_CURRENT)); > > > As you can see, mine opens a specific activity, but I believe you > > could fire any valid Intent. > > > String --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

