Added stylesheet for itemdescription webview

This commit is contained in:
daniel oeh 2012-07-11 22:11:34 +02:00
parent bc977e1e20
commit 9539ead467
1 changed files with 6 additions and 3 deletions

View File

@ -27,6 +27,8 @@ public class ItemDescriptionFragment extends SherlockFragment {
private static final String ARG_FEED_ID = "arg.feedId";
private static final String ARG_FEEDITEM_ID = "arg.feedItemId";
private static final String WEBVIEW_STYLE = "<head><style type=\"text/css\"> * { font-family: Helvetica; line-height: 1.5em; font-size: 12pt; } a { font-style: normal; text-decoration: none; font-weight: normal; color: #00A8DF; }</style></head>";
private WebView webvDescription;
private FeedItem item;
@ -109,9 +111,8 @@ public class ItemDescriptionFragment extends SherlockFragment {
protected void onPostExecute(Void result) {
super.onPostExecute(result);
// /webvDescription.loadData(url, "text/html", "utf-8");
webvDescription.loadDataWithBaseURL(null,
item.getContentEncoded(), "text/html", "utf-8",
"about:blank");
webvDescription.loadDataWithBaseURL(null, data, "text/html",
"utf-8", "about:blank");
getSherlockActivity()
.setSupportProgressBarIndeterminateVisibility(false);
Log.d(TAG, "Webview loaded");
@ -137,6 +138,8 @@ public class ItemDescriptionFragment extends SherlockFragment {
.getContentEncoded());
}
data = WEBVIEW_STYLE + data;
return null;
}