|
@@ -56,30 +56,37 @@ class StoreBuyDialog : BaseXDFragment<DialogStoreDetailBinding>(){
|
|
storeBean?.let {
|
|
storeBean?.let {
|
|
binding.tvName.text = it.product_name
|
|
binding.tvName.text = it.product_name
|
|
binding.tvCoin.text = "${it.product_coin}"
|
|
binding.tvCoin.text = "${it.product_coin}"
|
|
- if (storeType == 1 || storeType == 2){
|
|
|
|
|
|
+ if (storeType == 1){
|
|
binding.ivIcon.visibility = View.GONE
|
|
binding.ivIcon.visibility = View.GONE
|
|
|
|
+ binding.svgContent.visibility = View.VISIBLE
|
|
|
|
+ binding.svgAvatar.visibility = View.GONE
|
|
svgaParser?.decodeFromURL(URL(it.product_svg_url), object : SVGAParser.ParseCompletion{
|
|
svgaParser?.decodeFromURL(URL(it.product_svg_url), object : SVGAParser.ParseCompletion{
|
|
override fun onComplete(videoItem: SVGAVideoEntity) {
|
|
override fun onComplete(videoItem: SVGAVideoEntity) {
|
|
val drawable = SVGADrawable(videoItem)
|
|
val drawable = SVGADrawable(videoItem)
|
|
- if (storeType == 1){
|
|
|
|
- binding.svgContent.visibility = View.VISIBLE
|
|
|
|
- binding.svgAvatar.visibility = View.GONE
|
|
|
|
- binding.svgContent.setImageDrawable(drawable)
|
|
|
|
- binding.svgContent.startAnimation()
|
|
|
|
- } else {
|
|
|
|
- binding.svgContent.visibility = View.GONE
|
|
|
|
- binding.svgAvatar.visibility = View.VISIBLE
|
|
|
|
- binding.svgAvatar.setImageDrawable(drawable)
|
|
|
|
- binding.svgAvatar.startAnimation()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ binding.svgContent.visibility = View.VISIBLE
|
|
|
|
+ binding.svgAvatar.visibility = View.GONE
|
|
|
|
+ binding.svgContent.setImageDrawable(drawable)
|
|
|
|
+ binding.svgContent.startAnimation()
|
|
|
|
+ }
|
|
|
|
+ override fun onError() {
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else if (storeType == 2){
|
|
|
|
+ binding.ivIcon.visibility = View.GONE
|
|
|
|
+ binding.svgContent.visibility = View.GONE
|
|
|
|
+ binding.svgAvatar.visibility = View.VISIBLE
|
|
|
|
+ svgaParser?.decodeFromURL(URL(it.product_svg_url), object : SVGAParser.ParseCompletion{
|
|
|
|
+ override fun onComplete(videoItem: SVGAVideoEntity) {
|
|
|
|
+ val drawable = SVGADrawable(videoItem)
|
|
|
|
+ binding.svgContent.visibility = View.GONE
|
|
|
|
+ binding.svgAvatar.visibility = View.VISIBLE
|
|
|
|
+ binding.svgAvatar.setImageDrawable(drawable)
|
|
|
|
+ binding.svgAvatar.startAnimation()
|
|
}
|
|
}
|
|
-
|
|
|
|
override fun onError() {
|
|
override fun onError() {
|
|
-
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
|
|
+ }else {
|
|
binding.svgContent.visibility = View.GONE
|
|
binding.svgContent.visibility = View.GONE
|
|
binding.svgAvatar.visibility = View.GONE
|
|
binding.svgAvatar.visibility = View.GONE
|
|
binding.ivIcon.visibility = View.VISIBLE
|
|
binding.ivIcon.visibility = View.VISIBLE
|