Support for gradle based project(Android studio), and also Java 1.6 support.

Hi, I made some changes to your project, mainly to support the project in the Android studio. I also made some minor changes in the code to support java 1.6 and not 1.7. Check the other tweaks that I made with the fragment factory methods.