A
A
Alexander2014-04-07 15:39:24
Java
Alexander, 2014-04-07 15:39:24

How to change button background of Notification RemoteView with Service?

How to change background from service, service starts running when activity is closed (onDestroy)?
The service has a BroadcastReceiver, in which you need to change the background for the button, how to do this?
findViewById in service doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2014-04-07
@UserAlexandr

I figured it out myself, you need to use not the usual Button but ImageButton, then you can change the resource to another

remoteViews.setImageViewResource(R.id.note_btn, R.drawable.res_btn_btn_small);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question