Даже после установки источника на мой CircleView он не показывает никакого изображения, но когда я использую простой ImageView, он работает нормально. У меня есть cardview и constrainLayout, и я пытаюсь поместить в него свой CirculerImageView. Также, когда я устанавливаю фон, он показывает изображение, но в квадратной форме. Почему мой CirculerView не работает? Должен ли я создать новый файл формы необработанного кольца?
Пожалуйста, помогите мне.
my. xml file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="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:id="@+id/constrain_layout"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/driverInfo"
android:layout_width="335dp"
android:layout_height="171dp"
android:layout_marginBottom="8dp"
android:background="@drawable/rectangle"
map:layout_constraintBottom_toBottomOf="@+id/map"
map:layout_constraintEnd_toEndOf="@+id/map"
map:layout_constraintStart_toStartOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/imageView2"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:drawingCacheQuality="high"
map:layout_constraintStart_toStartOf="parent"
map:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@drawable/userimage" />
<RatingBar
android:id="@+id/ratingBar"
style="?android:attr/ratingBarStyleSmall"
android:layout_width="62dp"
android:layout_height="15dp"
android:layout_marginStart="10dp"
android:layout_marginTop="62dp"
android:isIndicator="true"
android:numStars="5"
android:stepSize="0.1"
map:layout_constraintStart_toEndOf="@+id/imageView2"
map:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="38dp"
android:text="Vaibhav"
android:textColor="#323643"
map:layout_constraintStart_toEndOf="@+id/imageView2"
map:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/callDriver"
android:layout_width="111dp"
android:layout_height="38dp"
android:layout_marginStart="62dp"
android:layout_marginTop="37dp"
android:background="@drawable/buttonrect"
android:text="Call Driver"
android:textColor="#FFFFFF"
android:textSize="14sp"
map:layout_constraintStart_toEndOf="@+id/ratingBar"
map:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
map:layout_constraintBottom_toBottomOf="parent"
map:layout_constraintEnd_toEndOf="parent"
map:layout_constraintHorizontal_bias="1.0"
map:layout_constraintStart_toStartOf="parent"
map:layout_constraintTop_toTopOf="parent"
map:layout_constraintVertical_bias="1.0"
tools:context=".HomeActivity" />
<EditText
android:id="@+id/myLocation"
android:layout_width="335dp"
android:layout_height="48dp"
android:layout_marginTop="16dp"
android:background="@drawable/edittextlocation"
android:drawingCacheQuality="high"
android:ems="10"
android:hint="My Location"
android:inputType="textPersonName"
android:paddingStart="40dp"
android:textSize="14sp"
android:viewportWidth="335"
android:viewportHeight="48"
map:layout_constraintEnd_toEndOf="@+id/map"
map:layout_constraintStart_toStartOf="@+id/map"
map:layout_constraintTop_toBottomOf="@+id/appBarLayout" />
<EditText
android:id="@+id/destination"
android:layout_width="335dp"
android:layout_height="48dp"
android:background="@drawable/destination"
android:drawingCacheQuality="high"
android:ems="10"
android:hint="Destination Please! ?"
android:inputType="textPersonName"
android:paddingStart="40dp"
android:textSize="14sp"
map:layout_constraintEnd_toEndOf="@+id/map"
map:layout_constraintStart_toStartOf="@+id/map"
map:layout_constraintTop_toBottomOf="@+id/myLocation" />
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
map:layout_constraintEnd_toEndOf="parent"
map:layout_constraintStart_toStartOf="parent"
map:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="center">
<TextView
android:id="@+id/toolbar_title"
android:layout_width="101dp"
android:layout_height="22dp"
android:layout_gravity="center"
android:textColor="#323643"
android:textSize="18dp" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
</androidx.constraintlayout.widget.ConstraintLayout>