use of com.stylingandroid.designlibrary.rss.model.Item in project DesignLibrary by StylingAndroid.
the class ItemFragment method onCreateView.
@Override
@SuppressLint("SetJavaScriptEnabled")
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Item item = (Item) getArguments().getSerializable(KEY_ITEM);
View view = inflater.inflate(R.layout.fragment_item, container, false);
if (item != null) {
WebView webView = (WebView) view.findViewById(R.id.web_view);
String html = item.getContent();
html = html.replaceAll(NEWLINE, BR);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadData(html, HTML_MIME_TYPE, null);
}
return view;
}
Aggregations