修复帖子详情骨架图变形的问题

This commit is contained in:
juntao
2020-09-01 15:04:40 +08:00
parent 6b361ed077
commit bbac0c8d93
3 changed files with 30 additions and 6 deletions

View 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
}
}