Skip to content

Commit

Permalink
raise targetSdk to 34
Browse files Browse the repository at this point in the history
  • Loading branch information
Razeeman committed Feb 10, 2024
1 parent d86ed5a commit c2f9701
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ object Base {
const val versionCode = 37
const val versionName = "1.36"
const val minSDK = 21
const val currentSDK = 33
const val currentSDK = 34
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ class SwipeDetector(
private val detector = GestureDetectorCompat(
context,
object : GestureDetector.SimpleOnGestureListener() {
override fun onScroll(e1: MotionEvent, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
override fun onScroll(e1: MotionEvent?, e2: MotionEvent, distanceX: Float, distanceY: Float): Boolean {
if (e1 == null) return false
val angle = Math.toDegrees(atan2(e1.y - e2.y, e2.x - e1.x).toDouble())

// Right
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ class ColorSelectionView @JvmOverloads constructor(
initGradientPaint(w.toFloat(), h.toFloat())
}

override fun onDraw(canvas: Canvas?) {
if (canvas == null) return

override fun onDraw(canvas: Canvas) {
// Draw base color.
mainPaint.color = floatArrayOf(colorHue, 1f, 1f)
.let(Color::HSVToColor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ class DurationView @JvmOverloads constructor(
setMeasuredDimension(w, h)
}

override fun onDraw(canvas: Canvas?) {
if (canvas == null) return

override fun onDraw(canvas: Canvas) {
val w = width.toFloat()
val h = height.toFloat()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ class RecordsCalendarView @JvmOverloads constructor(
setMeasuredDimension(w, h)
}

override fun onDraw(canvas: Canvas?) {
if (canvas == null) return
override fun onDraw(canvas: Canvas) {
if (data.isEmpty()) return

val w = width.toFloat()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class BarChartView @JvmOverloads constructor(
setMeasuredDimension(w, h)
}

override fun onDraw(canvas: Canvas?) {
if (canvas == null || bars.isEmpty()) return
override fun onDraw(canvas: Canvas) {
if (bars.isEmpty()) return

val w = width.toFloat()
val h = height.toFloat()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ class SeriesCalendarView @JvmOverloads constructor(
setMeasuredDimension(w, h)
}

override fun onDraw(canvas: Canvas?) {
if (canvas == null) return

override fun onDraw(canvas: Canvas) {
val w = width.toFloat()
val h = height.toFloat()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class SeriesView @JvmOverloads constructor(
}

@Suppress("UNUSED_VARIABLE")
override fun onDraw(canvas: Canvas?) {
if (canvas == null || data.isEmpty()) return
override fun onDraw(canvas: Canvas) {
if (data.isEmpty()) return

val w = width.toFloat()
val h = height.toFloat()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class PieChartView @JvmOverloads constructor(
setMeasuredDimension(w, h)
}

override fun onDraw(canvas: Canvas?) {
if (canvas == null || segments.isEmpty()) return
override fun onDraw(canvas: Canvas) {
if (segments.isEmpty()) return

val w = width.toFloat()
val h = height.toFloat()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class IconStackView @JvmOverloads constructor(
setMeasuredDimension(w, h)
}

override fun onDraw(canvas: Canvas?) {
if (canvas == null || data.isEmpty()) return
override fun onDraw(canvas: Canvas) {
if (data.isEmpty()) return

val w = width.toFloat()
val h = height.toFloat()
Expand Down

0 comments on commit c2f9701

Please sign in to comment.