Skip to content

Commit 53243d1

Browse files
committed
targetSDK 27
1 parent 7aafa61 commit 53243d1

File tree

5 files changed

+23
-25
lines changed

5 files changed

+23
-25
lines changed

app/build.gradle

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ apply plugin: 'kotlin-android'
55
apply plugin: 'kotlin-android-extensions'
66

77
android {
8-
compileSdkVersion 28
8+
compileSdkVersion 27
99
defaultConfig {
1010
applicationId "com.mindorks.editdrawabletextsample"
1111
minSdkVersion 21
12-
targetSdkVersion 28
12+
targetSdkVersion 27
1313
versionCode 1
1414
versionName "1.0"
1515
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -20,15 +20,22 @@ android {
2020
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2121
}
2222
}
23+
buildToolsVersion '27.0.3'
24+
compileOptions {
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
27+
}
28+
productFlavors {
29+
}
2330
}
2431

2532
dependencies {
2633
implementation fileTree(include: ['*.jar'], dir: 'libs')
2734
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
28-
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
35+
implementation 'com.android.support:appcompat-v7:27.1.1'
2936
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
3037
testImplementation 'junit:junit:4.12'
3138
androidTestImplementation 'com.android.support.test:runner:1.0.2'
32-
implementation 'com.github.MindorksOpenSource:EditDrawableText:0.1.0'
3339
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
40+
implementation project(':editdrawabletext')
3441
}
51.8 KB
Loading

editdrawabletext/build.gradle

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,34 @@ apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33

44
android {
5-
compileSdkVersion 28
6-
7-
8-
5+
compileSdkVersion 27
96
defaultConfig {
107
minSdkVersion 21
11-
targetSdkVersion 28
8+
targetSdkVersion 27
129
versionCode 1
1310
versionName "1.0"
1411

1512
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1613

1714
}
18-
1915
buildTypes {
2016
release {
2117
minifyEnabled false
2218
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2319
}
2420
}
25-
21+
buildToolsVersion '27.0.3'
22+
compileOptions {
23+
sourceCompatibility JavaVersion.VERSION_1_8
24+
targetCompatibility JavaVersion.VERSION_1_8
25+
}
26+
productFlavors {
27+
}
2628
}
2729

2830
dependencies {
29-
implementation fileTree(dir: 'libs', include: ['*.jar'])
30-
31-
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
31+
implementation fileTree(include: ['*.jar'], dir: 'libs')
32+
implementation 'com.android.support:appcompat-v7:27.1.1'
3233
testImplementation 'junit:junit:4.12'
3334
androidTestImplementation 'com.android.support.test:runner:1.0.2'
3435
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.mindorks.editdrawabletext
22

33
enum class DrawablePosition {
4-
TOP,
5-
BOTTOM,
64
LEFT,
75
RIGHT
86
}

editdrawabletext/src/main/java/com/mindorks/editdrawabletext/EditDrawableText.kt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,7 @@ class EditDrawableText : EditText {
3838
if (event.action == MotionEvent.ACTION_DOWN) {
3939
positionX = event.x.toInt()
4040
positionY = event.y.toInt()
41-
if (drawableBottom != null && drawableBottom!!.bounds.contains(positionX, positionY)) {
42-
onDrawableClickListener!!.onClick(DrawablePosition.BOTTOM)
43-
return super.onTouchEvent(event)
44-
}
45-
46-
if (drawableTop != null && drawableTop!!.bounds.contains(positionX, positionY)) {
47-
onDrawableClickListener!!.onClick(DrawablePosition.TOP)
48-
return super.onTouchEvent(event)
49-
}
41+
5042

5143
// this works for left since container shares 0,0 origin with bounds
5244
if (drawableLeft != null) {

0 commit comments

Comments
 (0)