0
Firebaseからプロフィール画像を取得しようとしていますが、断片を使用しています。Firebaseのフラグメントを使用してプロファイル写真を取得するにはどうすればよいですか?
私は断片に新しいです。ここに私のFirebaseデータベース構造は次のとおりです。
ストレージ:ここ
は私の断片である:
public class Profile extends Fragment {
private CircleImageView mprofilePic;
private TextView mUsername, mDescription, mEditProfile;
private ImageButton mSettings;
public Profile() {
// Required empty public constructor
}
public static Profile newInstance(int instance) {
Bundle args = new Bundle();
args.putInt("argsInstance", instance);
Profile profile = new Profile();
profile.setArguments(args);
return profile;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View profile = inflater.inflate(R.layout.fragment_profile, container, false);
mprofilePic = (CircleImageView) profile.findViewById(R.id.circleImageView_profileimage_profile);
mUsername = (TextView) profile.findViewById(R.id.textView_username_profile);
mDescription = (TextView)profile.findViewById(R.id.textView_info_profile);
mEditProfile = (TextView)profile.findViewById(R.id.textView_editprofile_profile);
mSettings = (ImageButton)profile.findViewById(R.id.imageButton_settings_profile);
return profile;
}
}