修复帖子详情骨架图变形的问题
This commit is contained in:
24
app/src/main/java/com/gh/common/view/FixedScrollView.kt
Normal file
24
app/src/main/java/com/gh/common/view/FixedScrollView.kt
Normal file
@ -0,0 +1,24 @@
|
||||
package com.gh.common.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.widget.ScrollView
|
||||
|
||||
/**
|
||||
* 不能滑动的 ScrollView
|
||||
*/
|
||||
class FixedScrollView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ScrollView(context, attrs) {
|
||||
|
||||
override fun onTouchEvent(ev: MotionEvent?): Boolean {
|
||||
return when (ev?.action) {
|
||||
MotionEvent.ACTION_DOWN -> false
|
||||
else -> super.onTouchEvent(ev)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user