Example usage for android.view View findViewById

List of usage examples for android.view View findViewById

Introduction

In this page you can find the example usage for android.view View findViewById.

Prototype

@Nullable
public final <T extends View> T findViewById(@IdRes int id) 

Source Link

Document

Finds the first descendant view with the given ID, the view itself if the ID matches #getId() , or null if the ID is invalid (< 0) or there is no matching view in the hierarchy.

Usage

From source file:Main.java

public static void enableView(boolean enable, View view, int id) {
    view.findViewById(id).setEnabled(enable);
}

From source file:Main.java

public static View getCampo(View view, int resId) {
    return view.findViewById(resId);
}

From source file:Main.java

public static View getView(View view, int rid) {
    return view.findViewById(rid);
}

From source file:Main.java

public static <T extends View> T find(View view, int id) {
    return (T) view.findViewById(id);
}

From source file:Main.java

public static void setVisibility(View view, int i, boolean z) {
    view.findViewById(i).setVisibility(z ? 0 : 8);
}

From source file:Main.java

public static TextView findTextViewById(int resid, View view) {
    return (TextView) view.findViewById(resid);
}

From source file:Main.java

@SuppressWarnings("unchecked")
public static <V> V findViewById(View parent, int id) {
    return (V) parent.findViewById(id);
}

From source file:Main.java

public static <T> T findViewById(View v, int id) {
    return (T) v.findViewById(id);
}

From source file:Main.java

static public void enable(View v, int id) {
    enable(v.findViewById(id));
}

From source file:Main.java

public static void enableView(View view, int id, boolean enable) {
    view.findViewById(id).setEnabled(enable);
}