@@ -187,19 +187,9 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
187
187
188
188
private var slideState: PanelState = DEFAULT_SLIDE_STATE
189
189
190
- /* *
191
- * Returns the current state of the panel as an enum.
192
- *
193
- * @return the current panel state
194
- */
195
190
val panelState: PanelState
196
191
get() = slideState
197
192
198
- /* *
199
- * Change panel state to the given state with
200
- *
201
- * @param state - new panel state
202
- */
203
193
fun setPanelState (state : PanelState ) {
204
194
// Abort any running animation, to allow state change
205
195
if (dragHelper?.viewDragState == ViewDragHelper .STATE_SETTLING ) {
@@ -254,15 +244,12 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
254
244
private var maxSlideOffset = DEFAULT_MAX_SLIDING_OFFSET
255
245
256
246
/* *
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.
258
251
*/
259
252
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
- */
266
253
set(value) = if (value > 0 && value <= 1 ) {
267
254
field = value
268
255
firstLayout = true
@@ -277,9 +264,6 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
277
264
*/
278
265
private var isUnableToDrag = false
279
266
280
- /* *
281
- * Flag indicating that sliding feature is enabled\disabled
282
- */
283
267
private var touchEnabled: Boolean = true
284
268
285
269
/* *
@@ -425,9 +409,6 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
425
409
null
426
410
}
427
411
428
- /* *
429
- * Set the Drag View after the view is inflated
430
- */
431
412
override fun onFinishInflate () {
432
413
super .onFinishInflate()
433
414
if (dragViewResId != - 1 ) {
@@ -730,9 +711,11 @@ open class SlidingUpPanelLayout @JvmOverloads constructor(
730
711
MarginLayoutParams .WRAP_CONTENT -> {
731
712
MeasureSpec .makeMeasureSpec(width, MeasureSpec .AT_MOST )
732
713
}
714
+
733
715
MarginLayoutParams .MATCH_PARENT -> {
734
716
MeasureSpec .makeMeasureSpec(width, MeasureSpec .EXACTLY )
735
717
}
718
+
736
719
else -> {
737
720
MeasureSpec .makeMeasureSpec(lp.width, MeasureSpec .EXACTLY )
738
721
}
0 commit comments