Android Wear CircledImageView (and DelayedConfirmationView) Always Square

android, android-view, wear-os

Solution

Turns out the issue with the rounding was that I was specifying the `layout_width` and `layout_height` in `dp` instead of using `wrap_content`.

The issue with the "countdown" animation is that there needs to be a border width and color specified.

EDIT: Here's a sample of what I was using (`app` is defined under the `xmlns:android` as `xmlns:app="http://schemas.android.com/apk/res-auto"`) :

<android.support.wearable.view.CircledImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/ic_action_call"
    app:circle_color="@color/green"
    app:circle_radius="30dp"
    app:circle_radius_pressed="40dp"/>

In terms of the attributes, I use Intellij/AS which auto-completes them. If you're not using either of those IDEs, the attributes pretty much correspond to the method names, so you can match them from there.

Problem

Anytime I try to use a `CircledImageView` (I'm developing on an LG G Watch) my image has a squared background. I get the same result with a `DelayedConfirmationView`, plus there is no "countdown animation."

Original source