File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
omegatypes/src/main/java/com/omega_r/libs/omegatypes Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,7 @@ import java.io.*
1515
1616open class Image : Serializable {
1717
18- open fun preload (context : Context ) {
19- // nothing
20- }
21-
18+ @JvmOverloads
2219 open fun applyImage (imageView : ImageView , placeholderResId : Int = 0) {
2320 if (placeholderResId == 0 ) {
2421 imageView.setImageDrawable(null )
@@ -27,6 +24,7 @@ open class Image : Serializable {
2724 }
2825 }
2926
27+ @JvmOverloads
3028 open fun applyBackground (view : View , placeholderResId : Int = 0) {
3129 if (placeholderResId == 0 ) {
3230 view.setBackgroundResource(placeholderResId)
@@ -36,6 +34,7 @@ open class Image : Serializable {
3634 }
3735
3836
37+ @JvmOverloads
3938 @Throws(IOException ::class )
4039 open fun getStream (context : Context ,
4140 compressFormat : Bitmap .CompressFormat = Bitmap .CompressFormat .JPEG , quality : Int = 100): InputStream {
@@ -44,6 +43,10 @@ open class Image : Serializable {
4443 }
4544 }
4645
46+ open fun preload (context : Context ) {
47+ // nothing
48+ }
49+
4750 protected fun applyBackground (view : View , background : Drawable ? ) {
4851 Image .applyBackground(view, background)
4952 }
Original file line number Diff line number Diff line change @@ -329,6 +329,14 @@ operator fun Text?.plus(text: Text?): Text? {
329329 }
330330}
331331
332+ operator fun Text?.plus (string : String? ): Text ? {
333+ return when {
334+ this == null -> string?.let { Text .from(string) }
335+ string == null -> this
336+ else -> this + string
337+ }
338+ }
339+
332340operator fun Text?.plus (textStyle : TextStyle ? ): Text ? {
333341 return this ?.let { this + textStyle }
334342}
You can’t perform that action at this time.
0 commit comments