Example usage for android.widget TextView setVisibility

List of usage examples for android.widget TextView setVisibility

Introduction

In this page you can find the example usage for android.widget TextView setVisibility.

Prototype

@RemotableViewMethod
public void setVisibility(@Visibility int visibility) 

Source Link

Document

Set the visibility state of this view.

Usage

From source file:Main.java

public static void showTapText(TextView view) {
    view.setVisibility(View.VISIBLE);
    view.setAlpha(ANIMATION_IN);//from   w  ww .j a va2 s  . c o  m
    ViewCompat.animate(view).alphaBy(ANIMATION_OUT).setDuration(ANIMATION_TAP_DURATION);
}

From source file:Main.java

public static void hideStatusMessage(TextView statusText, ProgressBar progressBar) {
    statusText.setVisibility(View.INVISIBLE);
    progressBar.setVisibility(View.INVISIBLE);
}

From source file:Main.java

public static void setStatusMessage(TextView statusText, ProgressBar progressBar, String message) {
    statusText.setVisibility(View.VISIBLE);
    progressBar.setVisibility(View.VISIBLE);
    statusText.setText(message);/*from  ww  w. jav a 2s. co m*/
}

From source file:Main.java

public static void setFinishedStatusMessage(TextView statusText, ProgressBar progressBar, String message) {
    statusText.setVisibility(View.VISIBLE);
    progressBar.setVisibility(View.INVISIBLE);
    statusText.setText(message);//from   w w w .j  av a  2 s  .c  o  m
}

From source file:Main.java

public static void showMessage(ViewGroup emptyView, String msg) {
    if (emptyView == null) {
        return;//  w w  w .  j  av  a2 s .  c om
    }
    ProgressBar pbLoading = (ProgressBar) emptyView.getChildAt(0);
    pbLoading.setVisibility(View.GONE);
    TextView tvEmptyMsg = (TextView) emptyView.getChildAt(1);
    tvEmptyMsg.setVisibility(View.VISIBLE);
    tvEmptyMsg.setText(msg);
}

From source file:Main.java

private static TextView upgrade(View view, int stringId, String upgradeValue) {

    final TextView upgrade = (TextView) view.findViewById(stringId);
    upgrade.setVisibility(View.VISIBLE);

    if (upgradeValue != null)
        upgrade.setText(upgradeValue);//from  w w w.j a  v  a 2s . c o  m

    return upgrade;
}

From source file:Main.java

public static void setupTextView(TextView tv, CharSequence chars) {
    if (TextUtils.isEmpty(chars)) {
        tv.setVisibility(View.GONE);
    } else {/*  w ww. jav  a 2s. co m*/
        tv.setVisibility(View.VISIBLE);
        tv.setText(chars);
    }
}

From source file:Main.java

public static void showErrorString(TextView showErrorText, String errorString) {
    showErrorText.setText(errorString);/*from www.java 2 s.c  om*/
    showErrorText.setVisibility(View.VISIBLE);

}

From source file:Main.java

public static void updateTitle(TextView view, String title) {
    if (view != null && !TextUtils.isEmpty(title)) {
        view.setVisibility(View.VISIBLE);
        view.setSelected(true);/*  www . ja va2s. c  o m*/
        view.setText(title);
    }
}

From source file:Main.java

public static void setText(TextView textView, String text) {
    if (textView != null && !TextUtils.isEmpty(text)) {
        textView.setVisibility(View.VISIBLE);
        textView.setText(text);//from   w ww . ja v a 2s  . co m
    }
}