只需在下拉动作结束之后手动展开appbar即可
package xxx.xxx
import android.content.Context
import android.util.AttributeSet
import com.akscorp.overscrollablescrollview.OverscrollableNestedScrollView
import kotlinx.android.synthetic.main.app_bar_main.*
import xxx.xxx.MainActivity.Companion.mainWeakReference
open class OverScrollView :OverscrollableNestedScrollView{
constructor(context: Context) : super(context)
constructor(context: Context, attrs: AttributeSet) : super(context, attrs)
constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle)
override fun isAchieveTop(): Boolean {
val re = super.isAchieveTop()
if(re) mainWeakReference?.get()?.appbar?.setExpanded(true)
return re
}
}