find TextView By Id - Android User Interface

Android examples for User Interface:TextView

Description

find TextView By Id

Demo Code


//package com.java2s;
import android.app.Activity;
import android.view.View;
import android.widget.TextView;

public class Main {
    public static TextView findTextViewById(int resid, Activity activity) {
        return (TextView) activity.findViewById(resid);
    }// ww w.j a va  2 s.  c  o m

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

Related Tutorials