Skip to content

Commit

Permalink
PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fjquileze committed Nov 28, 2023
1 parent feb14ab commit 9cf2cf3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,7 @@ fun Callouts() {
title = title.takeIf { it.isNotBlank() },
description = description.takeIf { it.isNotBlank() },
buttonConfig = buttonConfig,
imageConfig = when (iconType) {
CalloutViewImageConfig.NONE -> CalloutViewImageConfig.NONE
CalloutViewImageConfig.ICON -> CalloutViewImageConfig.ICON
CalloutViewImageConfig.SQUARE_IMAGE -> CalloutViewImageConfig.SQUARE_IMAGE
CalloutViewImageConfig.CIRCULAR_IMAGE -> CalloutViewImageConfig.CIRCULAR_IMAGE
},
imageConfig = iconType,
iconRes = when (iconType) {
CalloutViewImageConfig.NONE -> null
CalloutViewImageConfig.ICON -> R.drawable.ic_callout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,34 +348,6 @@ class CalloutView @JvmOverloads constructor(
}
}

private fun setImageConfig(imageConfig: CalloutViewImageConfig) {
when (imageConfig) {
CalloutViewImageConfig.NONE -> {
icon.visibility = GONE
image.visibility = GONE
circularImage.visibility = GONE
}

CalloutViewImageConfig.ICON -> {
icon.visibility = VISIBLE
image.visibility = GONE
circularImage.visibility = GONE
}

CalloutViewImageConfig.SQUARE_IMAGE -> {
icon.visibility = GONE
image.visibility = VISIBLE
circularImage.visibility = GONE
}

CalloutViewImageConfig.CIRCULAR_IMAGE -> {
icon.visibility = GONE
image.visibility = GONE
circularImage.visibility = VISIBLE
}
}
}

private fun marginStart(value: Float): LinearLayout.LayoutParams {
val layoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
Expand Down

0 comments on commit 9cf2cf3

Please sign in to comment.