Skip to content

Commit 9cba283

Browse files
committed
Improved hiding switch
1 parent 500ace8 commit 9cba283

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ dependencies {
2525
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
2626
implementation 'androidx.appcompat:appcompat:1.1.0'
2727
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
28-
implementation "com.google.android.material:material:1.0.0"
28+
implementation "com.google.android.material:material:1.1.0"
2929
testImplementation 'junit:junit:4.13'
3030
androidTestImplementation 'androidx.test:runner:1.2.0'
3131
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
3232
implementation project(':expandablecardview')
3333

3434
// https://mvnrepository.com/artifact/com.google.android.material/material
35-
implementation 'com.google.android.material:material:1.1.0-rc02'
35+
implementation 'com.google.android.material:material:1.1.0'
3636
}

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
android:layout_marginBottom="10dp"
110110
app:animationDuration="900"
111111
app:expandOnClick="true"
112+
app:showSwitch="true"
112113
app:icon="@drawable/ic_dates"
113114
app:inner_view="@layout/test"
114115
app:title="Lorem" />

expandablecardview/build.gradle

Lines changed: 3 additions & 3 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-beta06'
8+
PUBLISH_VERSION = '1.2.0'
99
}
1010

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

2020
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -44,7 +44,7 @@ dependencies {
4444
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
4545

4646
// https://mvnrepository.com/artifact/com.google.android.material/material
47-
implementation 'com.google.android.material:material:1.1.0-rc02'
47+
implementation 'com.google.android.material:material:1.1.0'
4848
}
4949
repositories {
5050
mavenCentral()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ class ExpandableCardView @JvmOverloads constructor(context: Context, attrs: Attr
291291
else
292292
AlphaAnimation(0f, 1f)
293293
switchAnimation.duration = animDuration
294-
switchAnimation.fillAfter = true
294+
switchAnimation.fillAfter = false
295295
card_switch.startAnimation(switchAnimation)
296296

297297
// Disable/Set clickable to prevent the toggle from working when the card is expanded

0 commit comments

Comments
 (0)