34 lines
574 B
Java
34 lines
574 B
Java
package dbfields;
|
|
|
|
import android.content.Context;
|
|
import android.text.Html;
|
|
import android.util.AttributeSet;
|
|
import android.widget.TextView;
|
|
|
|
public class TextViewHTML extends TextView
|
|
{
|
|
public TextViewHTML(Context context, AttributeSet attrs, int defStyleAttr)
|
|
{
|
|
super(context, attrs, defStyleAttr);
|
|
init();
|
|
}
|
|
|
|
public TextViewHTML(Context context)
|
|
{
|
|
super(context);
|
|
init();
|
|
}
|
|
|
|
public TextViewHTML(Context context, AttributeSet attrs)
|
|
{
|
|
super(context, attrs);
|
|
init();
|
|
}
|
|
|
|
private void init()
|
|
{
|
|
setText(Html.fromHtml(getText().toString()));
|
|
}
|
|
|
|
}
|