Skip to content

Commit

Permalink
updated sdks...
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroidDeveloperLB committed Feb 9, 2019
1 parent 1ec6930 commit 2f68247
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file modified .idea/caches/gradle_models.ser
Binary file not shown.
2 changes: 1 addition & 1 deletion AutoFitTextViewLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {

dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
compile "androidx.core:core-ktx:1.0.1"
implementation "androidx.core:core-ktx:1.0.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ class AutoResizeTextView @JvmOverloads constructor(context: Context, attrs: Attr
textRect.bottom = textPaint!!.fontSpacing
textRect.right = textPaint!!.measureText(text)
} else {
val layout = StaticLayout(text, textPaint, widthLimit, Alignment.ALIGN_NORMAL, spacingMult, spacingAdd, true)
val layout: StaticLayout = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
StaticLayout.Builder.obtain(text, 0, text.length, textPaint!!, widthLimit).setLineSpacing(spacingAdd, spacingMult).setAlignment(Alignment.ALIGN_NORMAL).setIncludePad(true).build()
} else StaticLayout(text, textPaint, widthLimit, Alignment.ALIGN_NORMAL, spacingMult, spacingAdd, true)
// return early if we have more lines
if (maxLines != NO_LINE_LIMIT && layout.lineCount > maxLines)
return 1
Expand Down
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.20'
ext.kotlin_version = '1.3.21'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit 2f68247

Please sign in to comment.