Skip to content

Commit e044bc6

Browse files
committed
Show a sample tag while in edit mode.
1 parent ac2a4bb commit e044bc6

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

androidtagview/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 23
5-
buildToolsVersion "22.0.1"
4+
compileSdkVersion 25
5+
buildToolsVersion "25.0.0"
66

77
defaultConfig {
88
minSdkVersion 9
9-
targetSdkVersion 23
9+
targetSdkVersion 25
1010
versionCode 105
1111
versionName "1.0.5"
1212
}
@@ -21,6 +21,6 @@ android {
2121
dependencies {
2222
compile fileTree(dir: 'libs', include: ['*.jar'])
2323
testCompile 'junit:junit:4.12'
24-
compile 'com.android.support:appcompat-v7:23.1.1'
24+
compile 'com.android.support:appcompat-v7:25.0.1'
2525
}
2626
apply from: 'https://raw.githubusercontent.com/whilu/AndroidPublishLibrary/master/project/library/bintray_publish.gradle'

androidtagview/src/main/java/co/lujun/androidtagview/TagContainerLayout.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr){
223223
setTagMaxLength(mTagMaxLength);
224224
setTagHorizontalPadding(mTagHorizontalPadding);
225225
setTagVerticalPadding(mTagVerticalPadding);
226+
227+
if (isInEditMode()) {
228+
addTag("sample tag");
229+
}
226230
}
227231

228232
@Override

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.1'
8+
classpath 'com.android.tools.build:gradle:2.2.2'
99
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
1010
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
1111

sample/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 23
5-
buildToolsVersion "22.0.1"
4+
compileSdkVersion 25
5+
buildToolsVersion "25.0.0"
66

77
defaultConfig {
88
applicationId "co.lujun.sample"
99
minSdkVersion 9
10-
targetSdkVersion 23
10+
targetSdkVersion 25
1111
versionCode 1
1212
versionName "1.0"
1313
}
@@ -23,6 +23,6 @@ dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
compile project(':androidtagview')
2525
testCompile 'junit:junit:4.12'
26-
compile 'com.android.support:appcompat-v7:23.1.1'
27-
compile 'com.android.support:design:23.1.1'
26+
compile 'com.android.support:appcompat-v7:25.0.1'
27+
compile 'com.android.support:design:25.0.1'
2828
}

0 commit comments

Comments
 (0)