Added gradle support to android project
Replaced switch/case statements on resource ids by if/else-if statements so the project can be built as a library