I bought the shittiest book "EVER" to learn android programming. It's the : Android App Development For Dummies, 3rd Edition
I assure you, it's not for "dummies"!
My question is: (This is a part of a widget code) remoteViews.setOnClickPendingIntent(R.id.widget, pendingIntent);
As I type the code, android studio marks with red the word "widget". I checked in the R file but I couldn't find it. I checked in every file. Nowhere to find. The answer I get from Wiley customer support was:
Please reference http://developer.android.com/reference/android/widget/RemoteViews.html setOnClickPendingIntent(int viewId, PendingIntent pendingIntent) Equivalent to calling setOnClickListener(android.view.View.OnClickListener) to launch the provided PendingIntent. When setting the on-click action of items within collections (eg. ListView, StackView etc.), this method will not work. Instead, use {@link RemoteViews#setPendingIntentTemplate(int, PendingIntent) in conjunction with RemoteViews#setOnClickFillInIntent(int, Intent). Parameters viewId The id of the view that will trigger the PendingIntent when clicked pendingIntent The PendingIntent to send when user clicks .
A "dummy" doesn't understand all that things.
Is it a typo or did I did something wrong?
(I didn't write the whole code. If you want, I will happily do it)
Thank you in advance