Collage

Additional

Language
Java
Version
N/A
Created
Aug 29, 2014
Updated
Aug 28, 2015 (Retired)
Owner
Juan Carlos Moreno (jcmore2)
Contributor
Juan Carlos Moreno (jcmore2)
1
Activity
Badge
Generate
Download
Source code

Collage

This library allows you to create a random collage of cards.

The library allows to create fixed Collage (cards can not be moved, scaled or rotated) or dynamic Collage (cards can move, scale and rotate).

Collage is based on library created by thuytrinh

Check CollageSample in

Usage

Add library to your build.gradle:

     compile 'com.jcmore2.collage:collage:1.0.0'

Add CollageView in your xml

        <com.jcmore2.collage.CollageView
            android:id="@+id/collage"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="10dip" >
        </com.jcmore2.collage.CollageView>

Get CollageView in your activity, create a list of images (Bitmaps, Drawables, Resources) and call 'createCollage'

  CollageView collage = (CollageView) findViewById(R.id.collage);

  List<Integer> listRes = new ArrayList<Integer>();
  listRes.add(R.drawable.img1);
  listRes.add(R.drawable.img2);
  listRes.add(R.drawable.img3);
  listRes.add(R.drawable.img4);
  
  collage.createCollageResources(listRes);
  
  • You can set Collage fixed
  collage.setFixedCollage(true);
 
  • or dynamic (default)
  collage.setFixedCollage(false);

 

Credits & Contact

Collage was created by jcmore2@gmail.com

License

Collage is available under the Apache License, Version 2.0.