Skip to content

Commit 4dac516

Browse files
committed
Cosmetic
1 parent ba3f89e commit 4dac516

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

library/src/main/kotlin/com/sothree/slidinguppanel/SlidingUpPanelLayout.kt

+6-23
Original file line numberDiff line numberDiff line change
@@ -187,19 +187,9 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
187187

188188
private var slideState: PanelState = DEFAULT_SLIDE_STATE
189189

190-
/**
191-
* Returns the current state of the panel as an enum.
192-
*
193-
* @return the current panel state
194-
*/
195190
val panelState: PanelState
196191
get() = slideState
197192

198-
/**
199-
* Change panel state to the given state with
200-
*
201-
* @param state - new panel state
202-
*/
203193
fun setPanelState(state: PanelState) {
204194
// Abort any running animation, to allow state change
205195
if (dragHelper?.viewDragState == ViewDragHelper.STATE_SETTLING) {
@@ -254,15 +244,12 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
254244
private var maxSlideOffset = DEFAULT_MAX_SLIDING_OFFSET
255245

256246
/**
257-
* An anchor point where the panel can stop during sliding
247+
* Set an anchor point where the panel can stop during sliding
248+
*
249+
* @param value A value between 0 and 1, determining the position of the anchor point
250+
* starting from the top of the layout.
258251
*/
259252
var anchorPoint = 1f
260-
/**
261-
* Set an anchor point where the panel can stop during sliding
262-
*
263-
* @param value A value between 0 and 1, determining the position of the anchor point
264-
* starting from the top of the layout.
265-
*/
266253
set(value) = if (value > 0 && value <= 1) {
267254
field = value
268255
firstLayout = true
@@ -277,9 +264,6 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
277264
*/
278265
private var isUnableToDrag = false
279266

280-
/**
281-
* Flag indicating that sliding feature is enabled\disabled
282-
*/
283267
private var touchEnabled: Boolean = true
284268

285269
/**
@@ -425,9 +409,6 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
425409
null
426410
}
427411

428-
/**
429-
* Set the Drag View after the view is inflated
430-
*/
431412
override fun onFinishInflate() {
432413
super.onFinishInflate()
433414
if (dragViewResId != -1) {
@@ -730,9 +711,11 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
730711
MarginLayoutParams.WRAP_CONTENT -> {
731712
MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST)
732713
}
714+
733715
MarginLayoutParams.MATCH_PARENT -> {
734716
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY)
735717
}
718+
736719
else -> {
737720
MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.EXACTLY)
738721
}

0 commit comments

Comments
 (0)