Skip to content

Commit 500ace8

Browse files
committed
Improved hiding switch
1 parent 5ff3ea0 commit 500ace8

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ implementation 'com.github.Stjinchan:ExpandableCardView:1.1.2'
2828

2929
### Beta
3030
```gradle
31-
implementation 'com.github.Stjinchan:ExpandableCardView:1.2.0-beta05'
31+
implementation 'com.github.Stjinchan:ExpandableCardView:1.2.0-beta06'
3232
```
3333

3434
```

expandablecardview/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'kotlin-android-extensions'
55
ext {
66
PUBLISH_GROUP_ID = 'host.stjin'
77
PUBLISH_ARTIFACT_ID = 'expandable-cardview'
8-
PUBLISH_VERSION = '1.2.0-beta05'
8+
PUBLISH_VERSION = '1.2.0-beta06'
99
}
1010

1111
android {
@@ -14,7 +14,7 @@ android {
1414
defaultConfig {
1515
minSdkVersion 18
1616
targetSdkVersion 29
17-
versionCode 10
17+
versionCode 11
1818
versionName PUBLISH_VERSION
1919

2020
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

expandablecardview/src/main/java/host/stjin/expandablecardview/ExpandableCardView.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -301,16 +301,11 @@ class ExpandableCardView @JvmOverloads constructor(context: Context, attrs: Attr
301301
}
302302

303303
override fun onAnimationEnd(p0: Animation?) {
304-
card_switch.isClickable = animationType != EXPANDING
305-
card_switch.isEnabled = animationType != EXPANDING
304+
card_switch.visibility = if (animationType != EXPANDING) View.VISIBLE else View.GONE
306305
}
307306

308307
override fun onAnimationStart(p0: Animation?) {
309-
if (animationType != EXPANDING) {
310-
card_switch.isEnabled = animationType != EXPANDING
311-
}
312-
card_switch.isClickable = animationType != EXPANDING
313-
308+
card_switch.visibility = if (animationType != EXPANDING) View.INVISIBLE else View.VISIBLE
314309
}
315310
})
316311
}

0 commit comments

Comments
 (0)