Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Replaced old TargetApi with RequiresApi annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
DreierF committed Jan 22, 2018
1 parent 09e02dd commit c1d9458
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

package de.dreier.mytargets.features.statistics

import android.annotation.TargetApi
import android.content.Intent
import android.databinding.DataBindingUtil
import android.os.Build
import android.os.Bundle
import android.support.annotation.RequiresApi
import android.support.design.widget.Snackbar
import android.support.v4.print.PrintHelper
import android.view.Menu
Expand Down Expand Up @@ -78,7 +78,7 @@ class DispersionPatternActivity : ChildActivityBase() {
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.action_share -> shareImage()
R.id.action_print -> print()
R.id.action_print -> if(Utils.isKitKat) print()
R.id.action_settings -> navigationController.navigateToSettings(ESettingsScreens.STATISTICS)
else -> return super.onOptionsItemSelected(item)
}
Expand Down Expand Up @@ -110,7 +110,7 @@ class DispersionPatternActivity : ChildActivityBase() {
}.start()
}

@TargetApi(Build.VERSION_CODES.KITKAT)
@RequiresApi(Build.VERSION_CODES.KITKAT)
private fun print() {
val printHelper = PrintHelper(this)
printHelper.scaleMode = PrintHelper.SCALE_MODE_FIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package de.dreier.mytargets.utils.transitions

import android.animation.Animator
import android.animation.TimeInterpolator
import android.annotation.TargetApi
import android.os.Build
import android.support.annotation.RequiresApi
import android.support.v4.util.ArrayMap
import java.util.*

Expand All @@ -29,7 +29,7 @@ import java.util.*
* Interrupting Activity transitions can yield an OperationNotSupportedException when the
* transition tries to pause the animator. Yikes! We can fix this by wrapping the Animator:
*/
@TargetApi(Build.VERSION_CODES.KITKAT)
@RequiresApi(Build.VERSION_CODES.KITKAT)
class NoPauseAnimator(private val mAnimator: Animator) : Animator() {
private val mListeners = ArrayMap<Animator.AnimatorListener, Animator.AnimatorListener>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ abstract class TargetViewBase : View, View.OnTouchListener {
protected lateinit var shots: List<Shot>
protected var round: RoundTemplate? = null
protected var setListener: OnEndFinishedListener? = null
open protected var inputMethod = EInputMethod.KEYBOARD
protected open var inputMethod = EInputMethod.KEYBOARD
protected var density: Float = 0.toFloat()
protected lateinit var selectableZones: List<SelectableZone>
protected lateinit var target: Target
Expand Down

0 comments on commit c1d9458

Please sign in to comment.