Probably a stupid question, but where and how do I access my widget controls?
With normal programs I call setContentView(R.layout.blah) and then use findViewById(R.id.blah)
to access the controls, but how do I do the same for widgets? Do I need to call setContentView() somewhere or..? The widget looks just fine without calling it anywhere.
Probably a stupid question, but where and how do I access my widget controls?
Share
As it comes out there’s now way to access them directly. Instead you have to do this:
Then you use methods from
Remoteviewsto set all the fields you want like this:And then finally you call this to execute the changes: