List of usage examples for android.widget TextView setText
@android.view.RemotableViewMethod public final void setText(@StringRes int resid)
From source file:Main.java
public static void formatHtml(TextView tv) { tv.setText(Html.fromHtml(tv.getText().toString())); }
From source file:Main.java
public static void formatNoDecimal(TextView txt, double number) { txt.setText(dfOne.format(number)); }
From source file:Main.java
public static void formatDecimal(TextView txt, double number) { txt.setText(dfTwo.format(number)); }
From source file:Main.java
/** * Sets the text for a {@link TextView}. * * @param textview text view instance/*from w w w. j a v a 2 s .c o m*/ * @param text new text to be shown */ public static void setText(TextView textview, String text) { textview.setText(text); textview.requestLayout(); }
From source file:Main.java
private static TextView createTextView(Context context, String text) { TextView textView = new TextView(context); textView.setText(text); return textView; }
From source file:Main.java
public static void showDialog(TextView dialogView, String message, int color) { dialogView.setText(message); dialogView.setTextColor(color);/*from www.j a v a 2 s.c o m*/ }
From source file:Main.java
public static void setText(View view, int id, String text) { TextView textView = findViewById(view, id); textView.setText(text); }
From source file:Main.java
public static void showErrorString(TextView showErrorText, String errorString) { showErrorText.setText(errorString); showErrorText.setVisibility(View.VISIBLE); }
From source file:Main.java
public static void displayText(Activity activity, int id, String text) { TextView tv = (TextView) activity.findViewById(id); tv.setText(text); }
From source file:Main.java
public static void setHtmlText(TextView textView, String htmlText) { textView.setText(TextUtils.isEmpty(htmlText) ? null : Html.fromHtml(htmlText)); }