Search in sources :

Example 1 with MsgUserAdapter

use of com.rideread.rideread.common.adapter.MsgUserAdapter in project ride-read-android by Ride-Read.

the class MsgActivity method initView.

@Override
public void initView() {
    new TitleBuilder(this).setTitleText("消息").IsBack(true).setLeftOnClickListener(v -> finish()).build();
    //        final AVIMClient client = AVImClientManager.getInstance().getClient();
    mMsgInfoList = new ArrayList<>();
    layoutManager = new LinearLayoutManager(this);
    mRecycleView.setLayoutManager(layoutManager);
    mMsgUserAdapter = new MsgUserAdapter(this, mMsgInfoList);
    mRecycleView.setAdapter(mMsgUserAdapter);
    mSwipeRefreshLayout.setOnRefreshListener(() -> {
        refreshMsgUserList();
    });
    refreshMsgUserList();
}
Also used : MsgInfo(com.rideread.rideread.data.been.MsgInfo) Iterator(java.util.Iterator) TitleBuilder(com.rideread.rideread.common.util.TitleBuilder) Set(java.util.Set) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) R(com.rideread.rideread.R) BaseActivity(com.rideread.rideread.common.base.BaseActivity) MsgUserAdapter(com.rideread.rideread.common.adapter.MsgUserAdapter) ArrayList(java.util.ArrayList) BindView(butterknife.BindView) RecyclerView(android.support.v7.widget.RecyclerView) List(java.util.List) Subscribe(org.greenrobot.eventbus.Subscribe) MAIN(org.greenrobot.eventbus.ThreadMode.MAIN) EventBus(org.greenrobot.eventbus.EventBus) MsgListRefreshEvent(com.rideread.rideread.common.event.MsgListRefreshEvent) MsgUtils(com.rideread.rideread.common.util.MsgUtils) JSONObject(com.alibaba.fastjson.JSONObject) SwipeRefreshLayout(android.support.v4.widget.SwipeRefreshLayout) MsgUserAdapter(com.rideread.rideread.common.adapter.MsgUserAdapter) TitleBuilder(com.rideread.rideread.common.util.TitleBuilder) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 BindView (butterknife.BindView)1 JSONObject (com.alibaba.fastjson.JSONObject)1 R (com.rideread.rideread.R)1 MsgUserAdapter (com.rideread.rideread.common.adapter.MsgUserAdapter)1 BaseActivity (com.rideread.rideread.common.base.BaseActivity)1 MsgListRefreshEvent (com.rideread.rideread.common.event.MsgListRefreshEvent)1 MsgUtils (com.rideread.rideread.common.util.MsgUtils)1 TitleBuilder (com.rideread.rideread.common.util.TitleBuilder)1 MsgInfo (com.rideread.rideread.data.been.MsgInfo)1 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Set (java.util.Set)1 EventBus (org.greenrobot.eventbus.EventBus)1 Subscribe (org.greenrobot.eventbus.Subscribe)1 MAIN (org.greenrobot.eventbus.ThreadMode.MAIN)1