xrdriveroilallocatelist = getSupportFragmentManager().findFragmentById(R.id.fldriveroilallocate).getView().findViewById(R.id.xrdriveroilallocatelist);
id -> 是activity 布局中fragment 的id
id -> 是 fragment 布局中的id
XRecyclerView$DataObserver@27e4cb47 is already registered.
xrdriveroilallocatelist = getSupportFragmentManager().findFragmentById(R.id.fldriveroilallocate).getView().findViewById(R.id.xrdriveroilallocatelist);
xrdriveroilallocatelist.setPullRefreshEnabled(true);
xrdriveroilallocatelist.setLoadingMoreEnabled(true);
CustomDecoration dividerItemDecoration = new CustomDecoration(this, DividerItemDecoration.VERTICAL, R.drawable.message_divider_bg, 0);
xrdriveroilallocatelist.addItemDecoration(dividerItemDecoration);
LinearLayoutManager manager = new LinearLayoutManager(this);
manager.setOrientation(LinearLayoutManager.VERTICAL);
xrdriveroilallocatelist.setLayoutManager(manager);
<