Android views one by one -
I want to add an image view in the layout with an arrelist, but when there are so many ideas, this is a little delay because it First loads each image and then it applies to the scene. I have to know that there is a way to add them one by one to avoid the delay.
I am using this code.
ArrayList & lt; String & gt; Pictures; Image view iv; Linear layout container; (Int i = 0; i & lt; pictures.size (); i ++) {layout} Parameters = New liner layout. Layout Paste (Linear Layout. LayoutPam. WRAP_CONTENT, Linear Lite LayoutsPartsWRAP_CONTENT); Iv = new image view (getActivity ()); Iv.setLayoutParams (parameter); Iv.setImageBitmap (pictures.get (i)); Container.addView (iv); }
I recommend you to use drawables such as:
Comments
Post a Comment