diff --git a/.github/workflows/Android-CI-release.yml b/.github/workflows/Android-CI-release.yml
index 2eac40077..0c0b5c712 100644
--- a/.github/workflows/Android-CI-release.yml
+++ b/.github/workflows/Android-CI-release.yml
@@ -27,7 +27,7 @@ jobs:
abbrev: false
commit-ish: HEAD
- name: Install Android SDK
- uses: hannesa2/action-android/install-sdk@0.1.16.7
+ uses: hannesa2/action-android/install-sdk@0.17.0
- name: Build project
run: ./gradlew assembleRelease
env:
diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml
index 350a77f3c..0b3456ceb 100644
--- a/.github/workflows/pullrequest.yml
+++ b/.github/workflows/pullrequest.yml
@@ -44,11 +44,11 @@ jobs:
with:
distribution: "adopt"
java-version: ${{ matrix.java_version }}
- - uses: gradle/actions/wrapper-validation@v5
+ - uses: gradle/actions/wrapper-validation@v6
- name: Install Android SDK
- uses: hannesa2/action-android/install-sdk@0.1.16.7
+ uses: hannesa2/action-android/install-sdk@0.17.0
- name: Run instrumentation tests
- uses: hannesa2/action-android/emulator-run-cmd@0.1.16.7
+ uses: hannesa2/action-android/emulator-run-cmd@0.17.0
with:
cmd: ./gradlew cAT --continue
api: ${{ matrix.api }}
@@ -112,7 +112,7 @@ jobs:
distribution: "adopt"
java-version: ${{ matrix.java_version }}
- name: Install Android SDK
- uses: hannesa2/action-android/install-sdk@0.1.16.7
+ uses: hannesa2/action-android/install-sdk@0.17.0
- name: Run tests
run: ./gradlew test
- name: Test jitpack publish command
diff --git a/README.md b/README.md
index f0ce0f1b6..55b2fa066 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ It comes with library view based `chartLib` and composeable `chartLibCompose`
### Packagename changed ! 🛑
During the full Kotlin conversion,
-* 🛑 package name changed to `info.appdev.charting`, but there are still the old main chart classes included, but they will be removed in the future
+* 🛑 package name changed to `info.appdev.charting`
* 🛑 `MPPointF` in renamed to `PointF`
* 🛑 `MPPointD` in renamed to `PointD`
* 🛑 methods like `setSomethingEnabled(true)` are now properties like `isSomething = true`
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index c78733f72..c5864c808 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("com.android.application")
- id("org.jetbrains.kotlin.plugin.compose") version "2.3.10"
+ id("org.jetbrains.kotlin.plugin.compose") version "2.3.20"
}
android {
@@ -46,6 +46,13 @@ android {
testOptions {
animationsDisabled = true
}
+ packaging {
+ jniLibs {
+ // androidx.graphics:graphics-path ships a .so that llvm-strip cannot process;
+ // keep it as-is to silence "Unable to strip" warnings.
+ keepDebugSymbols += "**/libandroidx.graphics.path.so"
+ }
+ }
}
dependencies {
@@ -57,7 +64,7 @@ dependencies {
implementation("androidx.viewpager2:viewpager2:1.1.0")
// Compose BOM
- val composeBom = platform("androidx.compose:compose-bom:2026.03.00")
+ val composeBom = platform("androidx.compose:compose-bom:2026.03.01")
implementation(composeBom)
androidTestImplementation(composeBom)
diff --git a/app/src/androidTest/kotlin/info/appdev/chartexample/StartTest.kt b/app/src/androidTest/kotlin/info/appdev/chartexample/StartTest.kt
index 5bbdbaf80..2c127e96d 100644
--- a/app/src/androidTest/kotlin/info/appdev/chartexample/StartTest.kt
+++ b/app/src/androidTest/kotlin/info/appdev/chartexample/StartTest.kt
@@ -75,7 +75,10 @@ class StartTest {
@After
fun cleanUp() {
- Intents.release()
+ // release() may have already been called by the last loop iteration
+ try {
+ Intents.release()
+ } catch (_: IllegalStateException) { /* not initialised, nothing to do */ }
// Clean up test timber tree
Timber.uprootAll()
}
@@ -249,12 +252,17 @@ class StartTest {
if (!compose)
doClickTest(index, contentClass, contentItem)
- //Thread.sleep(100)
Espresso.pressBack()
// Wait for MainActivity to be visible again
composeTestRule.waitForIdle()
Thread.sleep(200) // Small delay for back navigation
+
+ // Reset intent recording for next iteration; otherwise intents accumulate
+ // across the loop and Intents.intended() can no longer find a fresh
+ // unverified match for the current activity.
+ Intents.release()
+ Intents.init()
} catch (e: Exception) {
Timber.e("#$index/'${contentClass.simpleName}'->'$optionMenu' ${e.message}", e)
onView(ViewMatchers.isRoot())
@@ -264,6 +272,16 @@ class StartTest {
.replace(" ", "")
)
})
+ // Navigate back so subsequent iterations start from MainActivity
+ try {
+ Espresso.pressBack()
+ composeTestRule.waitForIdle()
+ } catch (_: Exception) { /* already on MainActivity */ }
+ // Reset intents so the next iteration starts clean
+ try {
+ Intents.release()
+ Intents.init()
+ } catch (_: Exception) { /* ignore if already released */ }
}
}
}
@@ -278,6 +296,7 @@ class StartTest {
contentItem.clazz == HorizontalBarFullComposeActivity::class.java ||
contentItem.clazz == MultiLineComposeActivity::class.java ||
contentItem.clazz == GradientActivity::class.java ||
+// contentItem.clazz == TimeIntervalChartActivity::class.java ||
contentItem.clazz == TimeLineActivity::class.java
) {
// These charts have less clickable area, so skip further clicks
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 648410d1e..a8f2a241b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -46,7 +46,7 @@
-
+
@@ -60,6 +60,7 @@
+
diff --git a/app/src/main/kotlin/info/appdev/chartexample/AnotherBarActivity.kt b/app/src/main/kotlin/info/appdev/chartexample/AnotherBarActivity.kt
index f0cb98037..5db7c77a8 100644
--- a/app/src/main/kotlin/info/appdev/chartexample/AnotherBarActivity.kt
+++ b/app/src/main/kotlin/info/appdev/chartexample/AnotherBarActivity.kt
@@ -16,7 +16,7 @@ import info.appdev.chartexample.notimportant.DemoBase
import info.appdev.charting.components.XAxis.XAxisPosition
import info.appdev.charting.data.BarData
import info.appdev.charting.data.BarDataSet
-import info.appdev.charting.data.BarEntry
+import info.appdev.charting.data.BarEntryFloat
import info.appdev.charting.interfaces.datasets.IBarDataSet
import info.appdev.charting.utils.ColorTemplate
@@ -62,13 +62,13 @@ class AnotherBarActivity : DemoBase(), OnSeekBarChangeListener {
binding.tvXMax.text = binding.seekBarX.progress.toString()
binding.tvYMax.text = binding.seekBarY.progress.toString()
- val values = ArrayList()
+ val values = ArrayList()
val sampleValues = getValues(100)
for (i in 0..()
+ val values = ArrayList()
val sampleValues = getValues(100)
var i = start.toInt()
@@ -130,9 +130,9 @@ class BarChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelect
val `val` = (sampleValues[i]!!.toFloat() * (range + 1))
if (`val` * 100 < 25) {
- values.add(BarEntry(i.toFloat(), `val`, ResourcesCompat.getDrawable(resources, R.drawable.star, null)))
+ values.add(BarEntryFloat(i.toFloat(), `val`, ResourcesCompat.getDrawable(resources, R.drawable.star, null)))
} else {
- values.add(BarEntry(i.toFloat(), `val`))
+ values.add(BarEntryFloat(i.toFloat(), `val`))
}
i++
}
@@ -281,10 +281,10 @@ class BarChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelect
private val onValueSelectedRectF = RectF()
- override fun onValueSelected(entry: Entry, highlight: Highlight) {
+ override fun onValueSelected(entryFloat: EntryFloat, highlight: Highlight) {
val bounds = onValueSelectedRectF
- binding.chart1.getBarBounds(entry as BarEntry, bounds)
- val position = binding.chart1.getPosition(entry, AxisDependency.LEFT)
+ binding.chart1.getBarBounds(entryFloat as BarEntryFloat, bounds)
+ val position = binding.chart1.getPosition(entryFloat, AxisDependency.LEFT)
Timber.i("bounds $bounds")
Timber.i("position = $position")
diff --git a/app/src/main/kotlin/info/appdev/chartexample/BarChartActivityMultiDataset.kt b/app/src/main/kotlin/info/appdev/chartexample/BarChartActivityMultiDataset.kt
index 522a876de..eba9e3c41 100644
--- a/app/src/main/kotlin/info/appdev/chartexample/BarChartActivityMultiDataset.kt
+++ b/app/src/main/kotlin/info/appdev/chartexample/BarChartActivityMultiDataset.kt
@@ -19,8 +19,8 @@ import info.appdev.charting.components.AxisBase
import info.appdev.charting.components.Legend
import info.appdev.charting.data.BarData
import info.appdev.charting.data.BarDataSet
-import info.appdev.charting.data.BarEntry
-import info.appdev.charting.data.Entry
+import info.appdev.charting.data.BarEntryFloat
+import info.appdev.charting.data.EntryFloat
import info.appdev.charting.formatter.IAxisValueFormatter
import info.appdev.charting.formatter.LargeValueFormatter
import info.appdev.charting.highlight.Highlight
@@ -110,19 +110,19 @@ class BarChartActivityMultiDataset : DemoBase(), OnSeekBarChangeListener, OnChar
binding.tvXMax.text = String.format(Locale.ENGLISH, "%d-%d", startYear, endYear)
binding.tvYMax.text = binding.seekBarY.progress.toString()
- val values1 = ArrayList()
- val values2 = ArrayList()
- val values3 = ArrayList()
- val values4 = ArrayList()
+ val values1 = ArrayList()
+ val values2 = ArrayList()
+ val values3 = ArrayList()
+ val values4 = ArrayList()
val randomMultiplier = binding.seekBarY.progress * 100000f
val sampleValues = getValues(100 + 2)
for (i in startYear..
+ private lateinit var dataSinus: MutableList
private lateinit var binding: ActivityBarchartSinusBinding
@@ -87,7 +87,7 @@ class BarChartActivitySinus : DemoBase(), OnSeekBarChangeListener {
}
private fun setData(count: Int) {
- val entries = ArrayList()
+ val entries = ArrayList()
for (i in 0..) {
- val values = ArrayList()
+ val values = ArrayList()
val colors: MutableList = ArrayList()
val green = Color.rgb(110, 190, 102)
@@ -95,7 +95,7 @@ class BarChartPositiveNegative : DemoBase() {
for (i in dataList.indices) {
val d = dataList[i]
- val entry = BarEntry(d.xValue, d.yValue)
+ val entry = BarEntryFloat(d.xValue, d.yValue)
values.add(entry)
// specific colors
@@ -136,7 +136,7 @@ class BarChartPositiveNegative : DemoBase() {
private class ValueFormatter : IValueFormatter {
private val mFormat: DecimalFormat = DecimalFormat("######.0")
- override fun getFormattedValue(value: Float, entry: Entry?, dataSetIndex: Int, viewPortHandler: ViewPortHandler?): String {
+ override fun getFormattedValue(value: Float, entryFloat: EntryFloat?, dataSetIndex: Int, viewPortHandler: ViewPortHandler?): String {
return mFormat.format(value.toDouble())
}
}
diff --git a/app/src/main/kotlin/info/appdev/chartexample/BubbleChartActivity.kt b/app/src/main/kotlin/info/appdev/chartexample/BubbleChartActivity.kt
index a478a0f64..7207e7744 100644
--- a/app/src/main/kotlin/info/appdev/chartexample/BubbleChartActivity.kt
+++ b/app/src/main/kotlin/info/appdev/chartexample/BubbleChartActivity.kt
@@ -19,8 +19,8 @@ import info.appdev.charting.components.Legend
import info.appdev.charting.components.XAxis
import info.appdev.charting.data.BubbleData
import info.appdev.charting.data.BubbleDataSet
-import info.appdev.charting.data.BubbleEntry
-import info.appdev.charting.data.Entry
+import info.appdev.charting.data.BubbleEntryFloat
+import info.appdev.charting.data.EntryFloat
import info.appdev.charting.highlight.Highlight
import info.appdev.charting.interfaces.datasets.IBubbleDataSet
import info.appdev.charting.listener.OnChartValueSelectedListener
@@ -82,14 +82,14 @@ class BubbleChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSel
binding.tvXMax.text = count.toString()
binding.tvYMax.text = range.toString()
- val values1 = ArrayList()
- val values2 = ArrayList()
- val values3 = ArrayList()
+ val values1 = ArrayList()
+ val values2 = ArrayList()
+ val values3 = ArrayList()
val sampleValues = getValues(100)
for (i in 0..()
+ val values = ArrayList()
val sampleValues = getValues(100)
for (i in 0..