Android Studio 3.5+ 使用androidx的recyclerView


File->project structure->Dependencies:

點擊All Dependencies處的加號,選擇Library Dependency:

在step1處輸入recyclerView,點擊search,搜索到以后,選中,點擊ok即可

二 在layout中加入

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/RecyclerViewId" android:layout_width="match_parent" android:layout_height="match_parent"/> </LinearLayout>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM