I am trying to create one large image to display as a background from smaller images. Think of it as a collage. Take pictures set them next to each other and stick'em together with tape.
Problem is i cant figure out how this is done in android or java.
Well I'm actually kinda new to Java and XML, but I know something you could try. In your java file, make a linear layout like this'n right here.
Code:
ViewGroup mLinearLayout = new LinearLayout(this);
Put all your pictures in the drawable resource thingy and add this:
Code:
ImageView i = new ImageView(this);
i.setImageResource(R.drawable.image_name);
i.setAdjustViewBounds(true);
i.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
There's one picture. I'm sure you could figure out a way to add a bunch more using that. I'm not sure, I'm probably not helping lol whatever. Use this to add it to the UI.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.