Skip to content

Commit

Permalink
Merge pull request #26 from erkutaras/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
erkutaras authored Dec 15, 2019
2 parents 8e6856b + 152f37a commit f69ba90
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
defaultConfig {
targetSdkVersion 28
minSdkVersion 14
versionCode 19
versionName "1.3.7"
versionCode 20
versionName "1.3.8"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import android.graphics.Shader
import android.os.Build
import androidx.annotation.RequiresApi
import android.util.AttributeSet
import android.util.Log
import android.view.View
import android.widget.Button
import android.widget.ImageView
Expand Down Expand Up @@ -134,6 +135,10 @@ open class ShowcaseView : RelativeLayout {

@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB)
override fun dispatchDraw(canvas: Canvas) {
if (radiusFocusArea <= 0) {
Log.d(TAG, "radius must be > 0. Use ShowcaseManager after view inflation.")
return
}
if (cxFocusArea == 0f || cyFocusArea == 0f) {
cxFocusArea = radiusFocusArea + ShowcaseUtils.convertDpToPx(marginInDp)
cyFocusArea = (descriptionView.y + descriptionView.height.toFloat() + radiusFocusArea
Expand Down Expand Up @@ -174,4 +179,7 @@ open class ShowcaseView : RelativeLayout {
super.dispatchDraw(canvas)
}

companion object {
private const val TAG = "ShowcaseView"
}
}

0 comments on commit f69ba90

Please sign in to comment.