Closed engr-kishon closed 3 years ago
Should work, as Kotlin is interoperable with Java. Take a look at docs. You will need to set up your Android project with Kotlin, though.
It worked with java too.
Glad you worked it out. Closing the issue.
@kish0n-eng Any samples of code how you get it done? I'm trying to implement donut with my java app but without success.
@kish0n-eng Any samples of code how you get it done? I'm trying to implement donut with my java app but without success.
@sysoppl I don't have any sample code. But I ve implemented on my project. I can help you. Please tell me what problem are you facing?
I defined donut view
DonutProgressView aqiCircle;
...
aqiCircle = findViewById(R.id.aqi_donut);
My XML file contains donut view
<app.futured.donut.DonutProgressView
android:id="@+id/aqi_donut"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginTop="25dp"
app:donut_bgLineColor="@color/red_btn_bg_color"
app:donut_gapAngle="270"
app:donut_gapWidth="20"
app:donut_strokeWidth="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
and I'm adding values to it
aqiCircle.setCap(5f);
aqiCircle.addAmount("1", 1f, null);
I tried addAmout, setAmout, setMasterProgress but every time my view is the same (default)
PS. that's a beautiful app!
@sysoppl Please check out this https://gist.github.com/kish0n-eng/6faa288385d8ec17683e95cd7345283f
Oh God, I tried List but I had do something wrong, it was so simple 😅 Thank you so much!
@sysoppl My pleasure. 😊
Can I implement this in my JAVA based app?