I’m working on a metro app.
Say I receive a string (html) and I load that string in a webview.
How can I associate a .css to that html?
Update:
WebViewColumnRight as suggested in an answers is an android method; I’m working on a metro app, c#.
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.
As JanivZ said the one way is that your returned html string should contain the reference to the required CSS so that it can be loaded automatically.
or the other option you have is, you can use WebView.loadDataWithBaseURL
After this WebView will be able to find your CSS file from the base URL directory. And if both HTML and CSS are coming from the same base URL then no need to specify a baseURL in webView.loadDataWithBaseURL