I have a question. I did everything to design and code the widget before. I now have a button and a text image in my widgets. I want, when I click on my button, my text entered in the textview is added as optional for the intention, and then start this intention. I can do this with the following code in:
@Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { super.onUpdate(context, appWidgetManager, appWidgetIds); for (int i=0;i<appWidgetIds.length;i++){ int awID=appWidgetIds[i]; RemoteViews v=new RemoteViews(context.getPackageName(),R.layout.widgetshow); . . . Intent in = new Intent("my.app.NOTEEDITOR"); Bundle basket = new Bundle(); */100*/ basket.putString("textViewText", "test"); in.putExtras(basket); PendingIntent pi = PendingIntent.getActivity(context, 0, in, 0); v.setOnClickPendingIntent(R.id.button, pi); appWidgetManager.updateAppWidget(awID, v); . . . } }
but in the line labeled / 100 /, I want to add the text of my text as optional. I want when I click on my button in widgets that trigger an action with the additional content of the text textview placed on the widgets that I clicked on the button.
Sorry guys for my scary english speech
source share