Tạo bố cục ứng dụng Ứng dụng chỉ có duy nhất một RecyclerView, vậy thêm vào RecyclerView xml layout chính. Tệp activity_main.xml <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” tools:context=”.MainActivity”> <androidx.recyclerview.widget.RecyclerView android:id=”@+id/rycViewSubject” android:layout_width=”match_parent” android:layout_height=”match_parent” /> </LinearLayout> Tạo bố cục cho mỗi hàng Trong ví dụ này, đơn giản Mỗi hàng trong RecyclerViewsẽ chỉ […]
Đọc thêm →