Я использую Android Studio 3.5.
Я построил навигацию снизу с фрагментом, а затем пытаюсь отобразить информацию о пользователе, такую как (имя - электронная почта - изображение и т. Д.), Которая получена из магазина Firebase .. когда доберетесь до:
documentReference.addSnapshotListener (this, new EventListener<DocumentSnapshot>() {
@Override
public void onEvent(@Nullable DocumentSnapshot documentSnapshot,
@Nullable FirebaseFirestoreException e) {
t_name.setText(documentSnapshot.getString("name"));
t_email.setText(documentSnapshot.getString("email"));
}
});
Он дал мне красную линию под кодом ... При нажатии Alt + введите , это дает мне решить пут-бросок (Исполнитель) до (этого) после того, как приведение не работает, приложение ...

Я не знаю, как это решить ..
Примечание: Это фрагмент, который не активен
И если я хочу отобразить изображение, полученное из Firebase ... Как я могу это сделать?
Спасибо
Фрагмент аккаунта
public class accountFragment extends Fragment {
FirebaseAuth fAuth;
FirebaseFirestore fStore;
String userID;
TextView logout_account , t_name , t_email , t_country ;
public accountFragment(){
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View v = inflater.inflate(R.layout.fragment_account, container, false);
fAuth = FirebaseAuth.getInstance();
fStore = FirebaseFirestore.getInstance();
userID = fAuth.getCurrentUser().getUid();
t_country = v.findViewById(R.id.t_country);
t_email = v.findViewById(R.id.t_email);
t_name = v.findViewById(R.id.t_name);
DocumentReference documentReference = fStore.collection("eng.users").document(userID);
documentReference.addSnapshotListener (this, new EventListener<DocumentSnapshot>() {
@Override
public void onEvent(@Nullable DocumentSnapshot documentSnapshot,
@Nullable FirebaseFirestoreException e) {
t_name.setText(documentSnapshot.getString("name"));
t_email.setText(documentSnapshot.getString("email"));
t_country.setText(documentSnapshot.getString("country"));
}
});
}
Activity_account. xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".categories.accountFragment">
<LinearLayout
android:id="@+id/banner_pro"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@drawable/banner2"
android:orientation="horizontal"
android:paddingLeft="50dp"
android:paddingTop="10dp">
<de.hdodenhof.circleimageview.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/profile_image"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/mypic"
app:civ_border_color="@color/colorDarkBlue"
app:civ_border_width="2dp" />
<LinearLayout
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="20dp"
>
<TextView
android:textColor="@color/colorDarkBlue"
android:id="@+id/t_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Name"
android:textSize="20dp"
android:textStyle="bold"/>
<TextView
android:id="@+id/t_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:text="Email"
android:textSize="15dp" />
<TextView
android:id="@+id/t_country"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="country"
android:textSize="15dp" />
</LinearLayout>
</LinearLayout>
<TextView
android:paddingLeft="20dp"
android:id="@+id/logout_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/banner_pro"
android:layout_marginTop="20dp"
android:text="LogOut"
android:textSize="30dp" />
</RelativeLayout>