get all ImageView - Android User Interface

Android examples for User Interface:ImageView

Description

get all ImageView

Demo Code


import java.util.ArrayList;
import java.util.List;

import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;

public class Main {
  public static List<ImageView> getallImageView(List<View> views) {
    List<ImageView> allTextViewList = new ArrayList<ImageView>();
    for (View view : views) {
      if (view instanceof CheckBox) {
      } else if (view instanceof ImageView) {
        allTextViewList.add((ImageView) view);
      }//  w  w w  .j av  a2  s . co  m
    }
    return allTextViewList;
  }
}

Related Tutorials