RecyclerView scrollToPosition not trigger scrollListener

前端 未结 8 2147
予麋鹿
予麋鹿 2021-02-01 03:35

I\'m using RecyclerView, with ScrollListener:

mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener()
{
        @Override
        public void onScr         


        
8条回答
  •  别那么骄傲
    2021-02-01 04:02

    Muito legal seu conselho.

     Button maisOpcoes = (Button) findViewById(R.id.maisOpcoes);
            maisOpcoes.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    recyclerView.getLayoutManager().smoothScrollToPosition(recyclerView, null , recyclerViewTmd.getItemCount() - 1);
                    maisOpcoes.setVisibility(View.GONE);
                }
            });
    

提交回复
热议问题