Android examples for User Interface:View Tag
get View List By Tag
import java.util.ArrayList; import java.util.List; import android.view.View; public class Main { public static List<View> getViewListByTag(List<View> viewList, String tag) { List<View> tagViewList = new ArrayList<View>(); for (View view : viewList) { if (view.getTag() != null && view.getTag().equals(tag)) { tagViewList.add(view);//from w w w .j a v a2 s. c o m } } return tagViewList; } }