Java tutorial
//package com.java2s; import android.app.Activity; import android.widget.TextView; public class Main { public static void populateTextView(int textViewId, String value, Activity activity) { TextView textView = (TextView) activity.findViewById(textViewId); textView.setText(value); } }