コード例 #1
0
 @Override
 public void setUserVisibleHint(boolean isVisibleToUser) {
   super.setUserVisibleHint(isVisibleToUser);
   if (isVisibleToUser && mContext != null && mRecyclerView != null) {
     getActivity()
         .findViewById(R.id.toolbar)
         .setOnClickListener(CustomOnClickListener.doubleClickToListTop(mContext, mRecyclerView));
   }
 }
コード例 #2
0
 @Override
 protected void setupRecyclerView() {
   super.setupRecyclerView();
   if (!isSetToolbar) {
     isSetToolbar = !isSetToolbar;
     getActivity()
         .findViewById(R.id.toolbar)
         .setOnClickListener(CustomOnClickListener.doubleClickToListTop(mContext, mRecyclerView));
   }
 }