Added Gradle support; fixed view measuring/sizing bugs