I’m trying to apply a gradient bg color to a WebView…
I’m use many sample code but not display gradient color…
if anyone know the ans post me..
I’m trying to apply a gradient bg color to a WebView … I’m use
Share
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.
A WebView has a default background color of white, drawn in front of any drawables. You’ll need to use the following code to make it transparent:
Then apply a gradient background as follows:
Create a file called gradient-bg.xml in your /res/drawable-mdpi folder.
Add:
Then in your layout files you can add the drawable to any view or layout via the background property: