Skip to content

Commit 3eebe8b

Browse files
committed
first commit
1 parent a5df013 commit 3eebe8b

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

swipebottomview/src/main/java/id/co/edtslib/swipebottomview/SwipeBottomView.kt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ class SwipeBottomView: FrameLayout {
8484
mainView = inflate(context, content, frameLayout)
8585
}
8686

87-
8887
val slide = a.getResourceId(R.styleable.SwipeBottomView_slide, 0)
8988
if (slide != 0) {
9089
val frameLayout = findViewById<FrameLayout>(R.id.frameLayoutContent)
@@ -126,5 +125,26 @@ class SwipeBottomView: FrameLayout {
126125
slidingUpPanel?.isChildScrollable = scrollable
127126
}
128127

128+
fun setTittle(resId: Int) {
129+
val tvTitle = findViewById<TextView>(R.id.tvTitle)
130+
tvTitle.setText(resId)
131+
132+
}
133+
134+
fun setSlideView(layoutId: Int): View? {
135+
val frameLayout = findViewById<FrameLayout>(R.id.frameLayoutContent)
136+
frameLayout.removeAllViews()
137+
slideView = inflate(context, layoutId, frameLayout)
138+
139+
return slideView
140+
}
141+
142+
fun setBottomView(layoutId: Int): View? {
143+
val frameLayout = findViewById<FrameLayout>(R.id.frameLayoutBottom)
144+
frameLayout.removeAllViews()
145+
bottomView = inflate(context, layoutId, frameLayout)
146+
147+
return bottomView
148+
}
129149

130150
}

0 commit comments

Comments
 (0)