Example usage for android.widget TextView isInEditMode

List of usage examples for android.widget TextView isInEditMode

Introduction

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

Prototype

public boolean isInEditMode() 

Source Link

Document

Indicates whether this View is currently in edit mode.

Usage

From source file:com.ada.utils.Ui.java

public static void setTypeface(TextView view, String path) {
    if (!view.isInEditMode()) {
        view.setTypeface(TypefaceUtils.getTypeface(view.getContext(), path));
    }//from   w w w .jav  a  2 s .  c  om
}

From source file:de.vanita5.twittnuker.util.ThemeUtils.java

public static void initTextView(TextView view) {
    if (view.isInEditMode())
        return;// w ww . ja v  a 2s . c o m
    final Context context = view.getContext();
    //        view.setLinkTextColor(ThemeUtils.getUserLinkTextColor(context));
    //        view.setHighlightColor(ThemeUtils.getUserHighlightColor(context));
    view.setTypeface(ThemeUtils.getUserTypeface(context, view.getTypeface()));
}