Android examples for User Interface:TextView
get All TextView
import java.util.ArrayList; import java.util.List; import android.view.View; import android.widget.CheckBox; import android.widget.TextView; public class Main { public static List<TextView> getAllTextView(List<View> views) { List<TextView> allTextViewList = new ArrayList<TextView>(); for (View view : views) { if (view instanceof CheckBox) { } else if (view instanceof TextView) { allTextViewList.add((TextView) view); }// w ww . j ava 2s. c o m } return allTextViewList; } }