首先在build.gradle添加RecyclerView依赖
implementation 'com.android.support:recyclerview-v7:28.0.0'
设置数据
public class Notification extends BmobObject{
private String notification;
private String updateAt_data;
//省略get,set
}
新建一个notifications.xml 显示通知
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="100dp">
<TextView
android:id="@+id/tv_notification"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="15sp"
android:layout_marginTop="3dp"
/>
<TextView
android:id="@+id/news_