0
我試圖從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;
}
}