RecyclerView
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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">
<Button
android:id="@+id/removeButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="9dp"
android:layout_weight="1"
android:text="删除"
app:layout_constraintBottom_toTopOf="@+id/recycleview"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/addButton"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/addButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="9dp"
android:layout_marginEnd="17dp"
android:layout_marginStart="9dp"
android:layout_weight="1"
android:text="添加"
app:layout_constraintBottom_toTopOf="@+id/recycleview"
app:layout_constraintEnd_toStartOf="@+id/removeButton"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycleview"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/removeButton" />
</android.support.constraint.ConstraintLayout>
相关文章
- 时光轴二之RecyclerView版时光轴效果
- Android RecyclerView(五)封装Holder与Adapter(Android 5.0 新特性)
- RecyclerView(六)设置下拉刷新
- Android实现RecyclerView分组显示功能完整示例(自定义组头和Item布局)
- Recyclerview实现按页滑动,超过一半width,默认滑到下一页,否则就停留在当前页
- Android RecyclerView使用简述
- RecyclerView Part 1:为ListView专家写的基础
- Android Material风格的应用(二)--RecyclerView
- 一个漂亮而强大的RecyclerView
- RecyclerView与ListView 对比浅析:缓存机制
- RecyclerView