Skip to content

Commit 2fffb1c

Browse files
committed
Made expand and collapse public
1 parent 959d640 commit 2fffb1c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

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-beta02'
8+
PUBLISH_VERSION = '1.2.0-beta03'
99
}
1010

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

2020
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import android.content.Context
55
import android.content.res.TypedArray
66
import android.graphics.Typeface
77
import android.graphics.drawable.Drawable
8-
import android.os.Build
98
import android.text.TextUtils
109
import android.util.AttributeSet
1110
import android.view.LayoutInflater
@@ -178,7 +177,7 @@ class ExpandableCardView @JvmOverloads constructor(context: Context, attrs: Attr
178177

179178
}
180179

181-
private fun expand() {
180+
fun expand() {
182181
val initialHeight = card_layout.height
183182
if (!isMoving) {
184183
previousHeight = initialHeight
@@ -228,7 +227,7 @@ class ExpandableCardView @JvmOverloads constructor(context: Context, attrs: Attr
228227
return totalHeight
229228
}
230229

231-
private fun collapse() {
230+
fun collapse() {
232231
val initialHeight = card_layout.measuredHeight
233232
if (initialHeight - previousHeight != 0) {
234233
animateViews(initialHeight,

0 commit comments

Comments
 (0)