Home / Coracle / Android: Getting Started
The Android Coracle renderer and is a very lightweight way of getting complex animations into your Android app with minimal dependencies.
Note: The Android Studio dialog for adding the .aar is unhelpful and doesn't have a file chooser, if you have problems add the full path to the .aar eg. /Users/orllewin/CoracleLibraryTest/app/libs/coraclelib-release_1_0_0.aar
<orllewin.coraclelib.CoracleView
android:id="@+id/coracle_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
class MainActivity: AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
DemoCoracleDrawing()
.renderer(AndroidRenderer(findViewById(R.id.coracle_view), object: AndroidRenderer.Printer{
override fun print(message: String) {
println(message)
}
}))
.start()
}
}
If you want to use the built-in demo project to distribute your drawings follow the steps below: