Не удается отобразить изображение во фрагменте - PullRequest
0 голосов
/ 10 апреля 2020

Я не могу отобразить изображение внутри изображения в фрагменте. У меня есть все разрешения на хранение. Код выполняется без ошибок, но не отображает изображение. Я делаю что-то не так, пожалуйста, помогите. здесь у меня отображается весь код

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="@style/Theme.MaterialComponents"
tools:context=".PrescriptionUploadFragment">

<ImageView
    android:id="@+id/imgPrescriptionUploads"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:layout_marginStart="24dp"
    android:layout_marginTop="24dp"
    android:layout_marginEnd="24dp"
    android:layout_marginBottom="24dp"
    android:scaleType="centerCrop"
    app:layout_constraintBottom_toTopOf="@+id/DescriptionUpload"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/DescriptionUpload"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="24dp"
    android:layout_marginEnd="24dp"
    android:layout_marginBottom="16dp"
    android:gravity="center"
    app:layout_constraintBottom_toTopOf="@+id/pbPrescriptionUpload"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent">

    <EditText
        android:id="@+id/etDescriptionUplaod"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/et_description" />

</com.google.android.material.textfield.TextInputLayout>

<ProgressBar
    android:id="@+id/pbPrescriptionUpload"
    style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="24dp"
    android:layout_marginEnd="24dp"
    android:layout_marginBottom="16dp"
    android:indeterminate="true"
    app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent" />

<LinearLayout
    android:id="@+id/linearLayout3"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="24dp"
    android:layout_marginEnd="24dp"
    android:layout_marginBottom="16dp"
    android:gravity="center"
    android:orientation="horizontal"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent">

    <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
        android:id="@+id/fabChooseFile"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="start"
        android:layout_marginEnd="20dp"
        android:background="@color/colorPrimaryDark"
        android:backgroundTint="@color/colorPrimaryDark"
        android:shadowColor="@color/colorPrimary"
        android:text="@string/fabChooseFile"
        android:textAlignment="center"
        android:textColor="@color/colorText"
        android:textColorLink="@color/colorPrimaryDark"
        app:rippleColor="@color/colorText"
        app:tint="@color/colorPrimaryDark" />

    <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
        android:id="@+id/fabUploadPrescription"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="20dp"
        android:background="@color/colorPrimaryDark"
        android:backgroundTint="@color/colorPrimaryDark"
        android:shadowColor="@color/colorPrimary"
        android:text="@string/fabUpload"
        android:textAlignment="center"
        android:textColor="@color/colorText"
        android:textColorLink="@color/colorPrimaryDark"
        app:rippleColor="@color/colorText"
        app:tint="@color/colorPrimaryDark" />

</LinearLayout>

enter code here
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...