Yêu cầu thg 10 22, 2019 9:34 SA 92 0 1
  • 92 0 1
0

Circle Image View cho widget android

Chia sẻ
  • 92 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 Dao Thai Son @dao.thai.son
thg 10 22, 2019 9:35 SA

third bạn nhé

Avatar Kun Speed @kunreading
thg 10 22, 2019 9:36 SA

@dao.thai.son dạ, @@

1 CÂU TRẢ LỜI


Đã trả lời thg 10 22, 2019 9:41 SA
+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
thg 10 22, 2019 9:47 SA

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í