Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CircledImageView always have rectangle image in front of the circle

I can get the CircledImageView to work, except that the image is always rectangle, and in front of the white circle (and cover the circle partially). Is this correct? My assumption is that I should see the image INSIDE the circle.

    <android.support.wearable.view.CircledImageView
    android:id="@+id/image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/kids"
    app:circle_radius="60dp"
    app:circle_color="@color/white" />

xmlns:app="http://schemas.android.com/apk/res-auto"

Thanks for any suggestions.

I have read this and it does not help: Android Wear CircledImageView (and DelayedConfirmationView) Always Square

like image 242
Lim Thye Chean Avatar asked Nov 26 '22 15:11

Lim Thye Chean


1 Answers

I found that if you are using fixed width/height and app:circle_radius, it is showing correct.

  <android.support.wearable.view.CircledImageView
        android:id="@+id/confirm"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_gravity="bottom|end"
        app:circle_color="@color/green"
        app:circle_radius="25dp" />

How it looks

like image 179
Azazellj Nevmerzhytskyi Avatar answered Nov 29 '22 04:11

Azazellj Nevmerzhytskyi