[Android]如何使用RecycleView in Kotlin project

feiyukill 2017-09-29

1. In xml

<android.support.v7.widget.RecyclerView
        android:id="@+id/forecast_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

2.In Gradle:

compile "com.android.support:recyclerview-v7:26.1.0"

注意:版本和appcompat-v7:26.1.0一致

implementation 'com.android.support:appcompat-v7:26.1.0'

相关推荐