File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
java/com/omega_r/libs/views Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ dependencies {
3131 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
3232 implementation" org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
3333 implementation ' com.github.Omega-R.OmegaTypes:omegatypes:2.0.1'
34+ implementation ' de.hdodenhof:circleimageview:3.0.0'
3435
3536 implementation ' androidx.appcompat:appcompat:1.1.0'
3637
Original file line number Diff line number Diff line change 1+ package com.omega_r.libs.views
2+
3+ import android.content.Context
4+ import android.graphics.drawable.Drawable
5+ import android.os.Build.VERSION.SDK_INT
6+ import android.os.Build.VERSION_CODES.LOLLIPOP
7+ import android.util.AttributeSet
8+ import de.hdodenhof.circleimageview.CircleImageView
9+
10+ open class OmegaCircleImageView @JvmOverloads constructor(
11+ context : Context , attrs : AttributeSet ? = null , defStyleAttr : Int = R .attr.omegaCircleImageViewStyle
12+ ) : CircleImageView(context, attrs, defStyleAttr) {
13+
14+ override fun setImageDrawable (drawable : Drawable ? ) {
15+ super .setImageDrawable(drawable)
16+ if (SDK_INT >= LOLLIPOP ) invalidateOutline()
17+ }
18+
19+ }
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<resources >
33
4+ <declare-styleable name =" styles" >
5+ <attr name =" omegaCircleImageViewStyle" format =" reference" />
6+ </declare-styleable >
7+
48 <declare-styleable name =" OmegaTextView" >
59 <attr name =" startText" format =" string" localization =" suggested" />
610 <attr name =" endText" format =" string" localization =" suggested" />
You can’t perform that action at this time.
0 commit comments