Back to project page loopback-android-getting-started.
The source code is released under:
MIT License
If you think the Android project loopback-android-getting-started listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.strongloop.android.loopback.guide.util; /*from w ww. j av a 2 s .co m*/ import android.support.v4.app.Fragment; import android.text.Html; import android.view.ViewGroup; import android.widget.TextView; public class HtmlFragment extends Fragment { private ViewGroup rootView; protected ViewGroup getRootView() { return rootView; } protected void setRootView(ViewGroup value) { rootView = value; } public HtmlFragment() { super(); } protected void setHtmlText(int textViewId, int stringResourceId) { TextView text = (TextView)getRootView().findViewById(textViewId); String htmlContent = getString(stringResourceId); text.setText(Html.fromHtml(htmlContent)); } }