Asked Oct 22nd, 2019 9:34 a.m. 99 0 1
  • 99 0 1
0

Circle Image View cho widget android

Share
  • 99 0 1

Cho em hỏi làm sao để tạo CircleImageView trong widget android mọi người ơi. Em dùng third- party android hông cho phép. de.hdodenhof.circleimageview.circleimageview not working wiget. Ví dụ như ứng dụng BeenLove họ dùng CircleImageView vẫn okie nhỉ? https://i.imgur.com/Sa55mt8.png

Avatar Son Dao Thai @dao.thai.son
Oct 22nd, 2019 9:35 a.m.

third bạn nhé

0
| Reply
Share
Avatar Kun Speed @kunreading
Oct 22nd, 2019 9:36 a.m.

@dao.thai.son dạ, @@

0
| Reply
Share

1 ANSWERS


Answered Oct 22nd, 2019 9:41 a.m.
+1
<shape
    android:innerRadius="0dp"
    android:shape="ring"
    android:thicknessRatio="1"
    android:useLevel="false" >

    <solid android:color="@android:color/transparent" />

    <stroke
        android:width="100dp"
        android:color="#FFFFFFFF" />
</shape>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/your_image" />
    <item android:drawable="@drawable/circle" />
</layer-list>

Share
Avatar Kun Speed @kunreading
Oct 22nd, 2019 9:47 a.m.

Cảm ơn anh về đoạn code. Nhưng nó vẫn không hoạt động trên widget android. Em đã thử nhiều cách nhưng vẫn thắc mắc tại sao BeenLove có thể dùng CircleImageView rất okie. @@

0
| Reply
Share
Viblo
Let's register a Viblo Account to get more interesting posts.