Yêu cầu Oct 22nd, 2019 9:34 a.m. 113 0 1
  • 113 0 1
0

Circle Image View cho widget android

Chia sẻ
  • 113 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é

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

@dao.thai.son dạ, @@

1 CÂU TRẢ LỜI


Đã trả lời 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>

Chia sẻ
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. @@

Viblo
Hãy đăng ký một tài khoản Viblo để nhận được nhiều bài viết thú vị hơn.
Đăng kí