|
|
@@ -6,6 +6,7 @@ import android.util.AttributeSet
|
|
|
import android.util.TypedValue
|
|
|
import android.view.LayoutInflater
|
|
|
import android.widget.Toast
|
|
|
+import androidx.annotation.DrawableRes
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout
|
|
|
import androidx.core.view.updateLayoutParams
|
|
|
import com.adealink.frame.aab.util.getCompatColor
|
|
|
@@ -97,7 +98,7 @@ class UserIdView @JvmOverloads constructor(
|
|
|
width = idTag.width
|
|
|
}
|
|
|
binding.svgaEffectId.setAsset(idTag.url)
|
|
|
- setCopyButton()
|
|
|
+ setCopyButton(R.drawable.profile_good_id_copy_ic)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
@@ -106,12 +107,13 @@ class UserIdView @JvmOverloads constructor(
|
|
|
binding.tvId.text = getCompatString(R.string.profile_short_id, userInfo.uid.toString())
|
|
|
binding.tvId.setTextColor(normalTextColor)
|
|
|
binding.tvId.setPadding(0, 0, 0, 0)
|
|
|
+ setCopyButton(copyBtnResID)
|
|
|
}
|
|
|
|
|
|
- private fun setCopyButton() {
|
|
|
+ private fun setCopyButton(@DrawableRes resId: Int) {
|
|
|
if (showCopyBtn) {
|
|
|
binding.ivCopy.show()
|
|
|
- binding.ivCopy.setImageResource(copyBtnResID)
|
|
|
+ binding.ivCopy.setImageResource(resId)
|
|
|
}
|
|
|
}
|
|
|
|