android:layout_width=“match_parent”
android:layout_height=“wrap_content”
android:orientation=“vertical”
app:layout_scrollFlags=“scroll|enterAlways|snap”>
<LinearLayout
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:orientation=“vertical”
app:layout_behavior=“@string/appbar_scrolling_view_behavior”>
<com.jiutong.base.utils.tablayout.TabLayout
android:id=“@+id/mTabLayout”
style=“@style/CustomerTabLayout”
android:layout_width=“match_parent”
android:layout_height=“50dp”
app:tabGravity=“fill”
app:tabMode=“fixed” />
<com.jiutong.base.utils.VerticalScrollView
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:fillViewport=“true”
app:layout_behavior=“@string/appbar_scrolling_view_behavior”>
<android.support.v4.view.ViewPager
android:id=“@+id/mViewPager”
android:layout_width=“match_parent”
android:layout_height=“wrap_content” />
</com.jiutong.base.utils.VerticalScrollView>
</android.support.design.widget.CoordinatorLayout>
</com.jiutong.base.utils.VpSwipeRefreshLayout>
//动态刷新主界面的下来刷新
mRecyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
val topRowVerticalPosition = if (recyclerView == null || recyclerView!!.getChildCount() === 0) 0 else recyclerView!!.getChildAt(0).getTop()
if (typeActivity == BaseFieldsConstant.IN_STORAGE_ACTIVITY) {
PartsInStorageActivity.mInStorageSwipeRefreshLayout?.isEnabled = topRowVerticalPosition >= 0
} else {
PartsOutStorageActivity.mOutStorageStaicSwipeRefreshLayout?.isEnabled = topRowVerticalPosition >= 0
}
}
})
文末
我总结了一些Android核心知识点,以及一些最新的大厂面试题、知识脑图和视频资料解析。
以后的路也希望我们能一起走下去。(谢谢大家一直以来的支持)
部分资料一览:
- 330页PDF Android学习核心笔记(内含8大板块)
-
Android学习的系统对应视频
-
Android进阶的系统对应学习资料
- Android BAT大厂面试题(有解析)
对应学习资料**
[外链图片转存中…(img-jID2MTpu-1719803471723)]
- Android BAT大厂面试题(有解析)
[外链图片转存中…(img-7Pq4ZORG-1719803471723)]