4

I want to add a list of circleimageview and text view and use it in the recycler view but it shows me square shape images like this but I want to show a rounded image enter image description here

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="horizontal"
    android:padding="16dp"
    android:background="@drawable/category_bg"
    android:layout_margin="4dp"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <de.hdodenhof.circleimageview.CircleImageView
        android:id="@+id/image_view"
        android:layout_width="70dp"
        android:layout_height="70dp"
        android:src="@color/purple_200" />
        <TextView
        android:id="@+id/title"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_weight="1"
        android:text="Title"
        android:textColor="@color/black"
        android:textStyle="bold"
        android:textSize="18sp"
        android:gravity="center_vertical"
        android:padding="8dp"
        />

</LinearLayout>

also, I have added the dependencies for circle image view

implementation 'de.hdodenhof:circleimageview:3.1.0'

help Me to find an error in this code

Monu Rohilla
  • 1,311
  • 5
  • 20

2 Answers2

2

Please rebuild your project and sure that its implementation in build.gradle successfully added to the project:

enter image description here

Amirhosein
  • 4,266
  • 4
  • 22
  • 35
  • 1
    thanks for answering me but there was another problem with the app deploy after force refresh this shows circular images – Monu Rohilla Dec 06 '20 at 07:22
0

Rebuild your project and make sure before rebuild your build.gradle successfully added to the project. and also clear cache for your project after that it working properly

Monu
  • 39
  • 3