public class FragModifyOwnerProfile extends Fragment {
private DatabaseReference databaseReference;
private FirebaseAuth mAuth;
private View view;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
view= inflater.inflate(R.layout.fragment_frag_modify_owner_profile,
container, false);
mAuth =FirebaseAuth.getInstance().getCurrentUser().getProviderId();
return view;
}
}
当我在Firebase
中使用Fragment
时,我发现语句错误。
答案 0 :(得分:0)
尝试以下代码,它们可能会为您提供帮助
public class FragModifyOwnerProfile extends Fragment {
private DatabaseReference databaseReference;
private FirebaseAuth mAuth;
private View view;
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_frag_modify_owner_profile,
container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
this.view=view;
mAuth = FirebaseAuth.getInstance().getCurrentUser().getProviderId();
}
}