Create a drawable with a triangle arrow on Android.
val drawable = BubbleDrawable().also {
it.setTriangleWidth(resources.getDimension(R.dimen.bbd_triangle_width))
it.setTriangleHeight(resources.getDimension(R.dimen.bbd_triangle_height))
it.setCorners(floatArrayOf(resources.getDimension(R.dimen.bbd_dp_10), resources.getDimension(R.dimen.bbd_dp_10),
resources.getDimension(R.dimen.bbd_dp_10), resources.getDimension(R.dimen.bbd_dp_10)))
it.setStrokeColor(Color.BLUE)
it.setStrokeWidth(resources.getDimension(R.dimen.bbd_dp_4))
it.setSolidColor(Color.GREEN)
it.setTriangleBias(0.618f)
it.setTriangleLocation(BubbleDrawable.TriangleLocation.locTop)
}
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.FitzLu:bubble-drawable:1.0.1'
}
This project is licensed under the MIT License - see the LICENSE.md file for details