座驾缩放模式修改
This commit is contained in:
@@ -33,10 +33,6 @@ import com.mango.moshen.avroom.activity.AVRoomActivity
|
|||||||
import com.mango.moshen.avroom.helper.AnimHelper
|
import com.mango.moshen.avroom.helper.AnimHelper
|
||||||
import com.mango.moshen.common.svga.SimpleSvgaCallback
|
import com.mango.moshen.common.svga.SimpleSvgaCallback
|
||||||
import com.mango.moshen.databinding.LayoutRoomEffectBinding
|
import com.mango.moshen.databinding.LayoutRoomEffectBinding
|
||||||
import com.mango.moshen.ui.utils.ImageLoadUtils
|
|
||||||
import com.mango.moshen.ui.utils.isDestroyed
|
|
||||||
import com.mango.moshen.ui.utils.load
|
|
||||||
import com.mango.moshen.ui.utils.loadAnim
|
|
||||||
import com.mango.moshen.ui.widget.SimpleAnimListener
|
import com.mango.moshen.ui.widget.SimpleAnimListener
|
||||||
import com.mango.moshen.ui.widget.drawgift.DrawGiftPlayHelper
|
import com.mango.moshen.ui.widget.drawgift.DrawGiftPlayHelper
|
||||||
import com.mango.moshen.utils.SpannableBuilder
|
import com.mango.moshen.utils.SpannableBuilder
|
||||||
@@ -52,10 +48,12 @@ import com.mango.core.super_admin.util.SuperAdminUtil
|
|||||||
import com.mango.core.user.UserModel
|
import com.mango.core.user.UserModel
|
||||||
import com.mango.core.user.bean.UserInfo
|
import com.mango.core.user.bean.UserInfo
|
||||||
import com.mango.core.utils.subAndReplaceDot
|
import com.mango.core.utils.subAndReplaceDot
|
||||||
|
import com.mango.moshen.ui.utils.*
|
||||||
import com.mango.moshen.ui.webview.CommonWebViewActivity
|
import com.mango.moshen.ui.webview.CommonWebViewActivity
|
||||||
import com.mango.moshen.utils.MsgBuilder
|
import com.mango.moshen.utils.MsgBuilder
|
||||||
import com.mango.moshen.utils.UserUtils
|
import com.mango.moshen.utils.UserUtils
|
||||||
import com.mango.xchat_android_library.utils.ListUtils
|
import com.mango.xchat_android_library.utils.ListUtils
|
||||||
|
import com.tencent.qgame.animplayer.util.ScaleType
|
||||||
import io.reactivex.Observable
|
import io.reactivex.Observable
|
||||||
import io.reactivex.ObservableEmitter
|
import io.reactivex.ObservableEmitter
|
||||||
import io.reactivex.ObservableOnSubscribe
|
import io.reactivex.ObservableOnSubscribe
|
||||||
@@ -1416,7 +1414,7 @@ class RoomEffectView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
isSvgaPlaying = true
|
isSvgaPlaying = true
|
||||||
binding.vapAnimView.visibility = VISIBLE
|
binding.vapAnimView.visibility = VISIBLE
|
||||||
binding.vapAnimView.loadAnim(viewUrl)
|
binding.vapAnimView.loadAnim(viewUrl, ScaleType.FIT_CENTER)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -144,7 +144,8 @@ fun SVGAImageView.loadFromAssets(name: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun AnimView.loadAnim(url: String) {
|
@JvmOverloads
|
||||||
|
fun AnimView.loadAnim(url: String, scaleType: ScaleType = ScaleType.CENTER_CROP) {
|
||||||
|
|
||||||
if (context.isDestroyed()) return
|
if (context.isDestroyed()) return
|
||||||
|
|
||||||
@@ -162,7 +163,7 @@ fun AnimView.loadAnim(url: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onResourceReady(resource: File, transition: Transition<in File>?) {
|
override fun onResourceReady(resource: File, transition: Transition<in File>?) {
|
||||||
this@loadAnim.setScaleType(ScaleType.CENTER_CROP)
|
this@loadAnim.setScaleType(scaleType)
|
||||||
this@loadAnim.startPlay(resource)
|
this@loadAnim.startPlay(resource)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
android:id="@+id/room_car_svga"
|
android:id="@+id/room_car_svga"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="fitCenter"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:autoPlay="true" />
|
app:autoPlay="true" />
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user