1
<android.support.v4.view.ViewPager
android:id="@id/id_stickynavlayout_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</android.support.v4.view.ViewPager>
转化为
<androidx.viewpager.widget.ViewPager
android:id="@id/id_stickynavlayout_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</androidx.viewpager.widget.ViewPager>
2
<android.support.v7.widget.RecyclerView android:id="@id/id_stickynavlayout_innerscrollview"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#44ff0000"
android:scrollbars="none">
</android.support.v7.widget.RecyclerView>
转化为
<androidx.recyclerview.widget.RecyclerView android:id="@id/id_stickynavlayout_innerscrollview"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#44ff0000"
android:scrollbars="none">
</androidx.recyclerview.widget.RecyclerView>
本文介绍如何将Android项目的support库更新为AndroidX。包括ViewPager和RecyclerView组件的具体迁移步骤,帮助开发者顺利过渡到AndroidX。
1631

被折叠的 条评论
为什么被折叠?



