Search in sources :

Example 1 with OtherShareArticleAdapter

use of com.knight.wanandroid.module_mine.adapter.OtherShareArticleAdapter in project wanandroid by KnightAndroid.

the class OtherShareArticleActivity method initView.

@Override
public void initView(Bundle savedInstanceState) {
    mDatabind.setClick(new ProxyClick());
    mDatabind.inculeOthermessageToolbar.baseIvBack.setOnClickListener(v -> finish());
    mDatabind.includeOtherSharearticle.baseFreshlayout.setOnRefreshListener(this);
    mDatabind.includeOtherSharearticle.baseFreshlayout.setOnLoadMoreListener(this);
    uid = getIntent().getIntExtra("uid", 0);
    mOtherShareArticleAdapter = new OtherShareArticleAdapter(new ArrayList<>());
    SetInitCustomView.initSwipeRecycleview(mDatabind.includeOtherSharearticle.baseBodyRv, new LinearLayoutManager(this), mOtherShareArticleAdapter, true);
    mDatabind.mineSlidupPanellayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() {

        @Override
        public void onPanelSlide(View panel, float slideOffset) {
        }

        @Override
        public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
        }
    });
    mDatabind.mineSlidupPanellayout.setFadeOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            mDatabind.mineSlidupPanellayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
        }
    });
    showLoading(mDatabind.mineSlidupPanellayout);
    mDatabind.inculeOthermessageToolbar.baseTvTitle.setText(getString(R.string.mine_other_shareArticles));
    initListener();
    LoadSir loadSir = LoadSir.getDefault();
    mViewLoadService = loadSir.register(mDatabind.includeOtherSharearticle.baseFreshlayout, new Callback.OnReloadListener() {

        @Override
        public void onReload(View v) {
            mPresenter.requestOtherShareArticle(uid, page);
            mViewLoadService.showCallback(LoadCallBack.class);
        }
    });
    mViewLoadService.showCallback(LoadCallBack.class);
}
Also used : SlidingUpPanelLayout(com.knight.wanandroid.library_widget.slidinglayout.SlidingUpPanelLayout) OtherShareArticleAdapter(com.knight.wanandroid.module_mine.adapter.OtherShareArticleAdapter) ArrayList(java.util.ArrayList) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) SetInitCustomView(com.knight.wanandroid.library_widget.SetInitCustomView) View(android.view.View) LoadSir(com.kingja.loadsir.core.LoadSir)

Aggregations

View (android.view.View)1 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)1 LoadSir (com.kingja.loadsir.core.LoadSir)1 SetInitCustomView (com.knight.wanandroid.library_widget.SetInitCustomView)1 SlidingUpPanelLayout (com.knight.wanandroid.library_widget.slidinglayout.SlidingUpPanelLayout)1 OtherShareArticleAdapter (com.knight.wanandroid.module_mine.adapter.OtherShareArticleAdapter)1 ArrayList (java.util.ArrayList)1