I am developing a simple widget and I would like to change the background at runtime from a png file (or similar). Is this possible to do and if so, how? Can someone provide some simple example?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use something like:
File
YOUR_BACKGROUNDis a png.The
viewsObject is an instance ofRemoteViews.You can get the instance by using:
And don’t forget to update the Widget after these changes.