Is it possible to do this programatically so that the use has the option in include shadow or not in an app widget TextView?
I am only aware of that you can set a int but the setShadowLayer method takes several parameters….
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.
You are correct, setShadowLayer() can’t be called through the RemoveViews class used by a widget. However, in your case one solution would be to define 2 TextViews for each TextView that you want to be able to set a shadow on. One TextView will have the shadow and the other won’t. Then during the initialisation of the widget hide the corresponding TextView according to your user’s preference.