我试图从我使用FirebaseRecylerAdapter的方法中检索数据database,如下所示fragment onViewCreated@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); FirebaseRecyclerAdapter<AllUsers, AllUsersViewHolder> firebaseRecyclerAdapter; } public static class AllUsersViewHolder extends RecyclerView.ViewHolder { View view; public AllUsersViewHolder(View itemView) { super(itemView); view = itemView; } }当我使用firebaseRecyclerAdapter = new FirebaseRecyclerAdapter它不会给我populateViewHolder方法只是给下面的方法FirebaseRecyclerAdapter<AllUsers, AllUsersViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<AllUsers, AllUsersViewHolder>() { @Override protected void onBindViewHolder(AllUsersViewHolder holder, int position, AllUsers model) { } @Override public AllUsersViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return null; } };有人可以告诉我为什么会这样吗
添加回答
举报
0/150
提交
取消