desc:crash问题

main
xiaowusky 2 years ago
parent 67fcf9885e
commit 3135311b8c

@ -114,8 +114,9 @@ class ChartActivity : NoOptionsActivity() {
granularity = 1f; // 设置X轴坐标之间的最小间隔
valueFormatter = object : IndexAxisValueFormatter() {
override fun getFormattedValue(value: Float): String {
if (value < (mGases?.size ?: 0)) {
val baseTime = mGases?.get(value.toInt())?.time
val index = value.toInt();
if (index >= 0 && index < (mGases?.size ?: 0)) {
val baseTime = mGases?.get(index)?.time
return dataFormat.format(baseTime)
}
return ""

@ -45,8 +45,8 @@ object TxtOverlay {
// 记录更新时间和上一次的文字
lastTipUpdateTime = currentTimeMillis
mLastShowTip = mToDoShowTip
// 回收内存
bmp?.recycle()
// // 回收内存
// bmp?.recycle()
// 文字转bitmap
bmp = YUVUtils.generateBitmap(
dateFormat.format(lastTipUpdateTime) + "@" + mToDoShowTip, 40, Color.WHITE

Loading…
Cancel
Save