源自:1-1 网格布局UI实现
最新版Android Studio引入RecyclerView的方法,以此记录
我注意到build.gradle文件内容如下:dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.blankj:utilcode:1.28.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
据说AndroidX发布后有些支持发生了一些变化(我也不是很懂)。将第一行复制后appcompat改成recyclerview即可。
提问者:大迷糊and小迷糊
2020-08-02 03:05