Skip to content
Advertisement

Can I Show View on any Imageview in Android Studio [java]

I have this type of ArrayList

public static ArrayList<View> mViews;

Created New Arraylist like this

mViews = new ArrayList<>();

I add View in the Arraylist like this

 mViews.add(stickerView);

and the View is Stored like this

StickerView{ad64560 V.ED..... ......I. 0,0-1080,2022}

StickerView{79c1ed5 V.ED..... ......I. 0,0-1080,2022}

can I show the mViews list on any imageView

Advertisement

Answer

I don’t really understood your question but I hope it would help:

ArrayList<ImageView> list = new ArrayList<>();
        for (int i = 0; i < mViews.size; i++) {
            if (mViews.get(i) instanceof ImageView)
                list.add(mViews.get(i));
        }
7 People found this is helpful
Advertisement