Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AndroidStaggeredGrid Gradle library for Eclipse

In my RSS reader project I need nice Grid for different sized items(that contain image and text).

I searched for solutions to make a Staggered Grid in Android and came across with AndroidStaggeredGrid library by Etsy. I am using Eclipse but library was done for Gradle.

I want to use this library in my Android project. I already tried to follow this answer but couldn't succeed. How can I import this library to my Android project.

like image 776
Rafael Avatar asked Jan 20 '14 07:01

Rafael


1 Answers

  • Create an Android Application Project, use any name for the package name.
  • Flag "Mark this project as library".
  • Unflag "Create custom launcher icon" and "Create activity"
  • Import the java folder of the Etsy library and then "Build Path" > "Use as Source Folder"
  • Import the res folder of the Etsy library overwriting your old res folder.
  • Use this in the AndroidManifest.xml

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.etsy.android.grid" >
    </manifest>
    
  • Import Support Library: "Android Tools" > "Add Support Library"
  • Remove any other packages in gen but "com.etsy.android.grid"
  • On your project "Android Tools" > "Fix Project Properties".

It has to work now, you can use the library in your project.

like image 66
JoaoBiriba Avatar answered Nov 04 '22 09:11

JoaoBiriba