Commit 4d4c2838 authored by mengcuiguang's avatar mengcuiguang

添加动效

parent fa964b8c
{"v":"5.9.6","fr":25,"ip":0,"op":25,"w":1080,"h":360,"nm":"引导-播放按钮","ddd":0,"assets":[{"id":"image_0","w":840,"h":228,"u":"images/","p":"recommend_img_0.png","e":0},{"id":"image_1","w":900,"h":288,"u":"images/","p":"recommend_img_1.png","e":0}],"layers":[{"ddd":0,"ind":2,"ty":2,"nm":"Rectangle 6336.png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":10,"s":[100]},{"t":25,"s":[15]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[540,180,0],"ix":2,"l":2},"a":{"a":0,"k":[420,114,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":0,"s":[75,51,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":10,"s":[100,100,100]},{"t":25,"s":[120,150,100]}],"ix":6,"l":2}},"ao":0,"ip":0,"op":25,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":2,"nm":"Rectangle 6337.png","cl":"png","refId":"image_1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":10,"s":[100]},{"t":23,"s":[0]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":10,"s":[0]},{"t":23,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[540,180,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":10,"s":[540,180,0],"to":[0,0,0],"ti":[0,0,0]},{"t":23,"s":[540,180,0]}],"ix":2,"l":2},"a":{"a":0,"k":[450,144,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":0,"s":[80,54,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":10,"s":[100,100,100]},{"t":23,"s":[120,123,100]}],"ix":6,"l":2}},"ao":0,"ip":0,"op":25,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
......@@ -106,7 +106,6 @@ object LocalVedioManager {
bundle.putBoolean(Constant.VEDIO_NEXT, isPlayNext)
bundle.putBoolean(Constant.VEDIO_THIRD, isThirdId)
readyGo(activity, TxVideoActivity::class.java, bundle)
// readyGo(activity, RecommendActivity::class.java, bundle)
} else {
requestDrama(activity, data)
}
......
......@@ -3,13 +3,18 @@ package com.mints.helivideo.ui.activitys
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
import com.airbnb.lottie.LottieComposition
import com.airbnb.lottie.LottieCompositionFactory
import com.airbnb.lottie.LottieDrawable
import com.google.gson.Gson
import com.mints.helivideo.R
import com.mints.helivideo.common.Constant
import com.mints.helivideo.mvp.model.RecommendBean
import com.mints.helivideo.ui.activitys.base.BaseActivity
import com.mints.helivideo.video.tx.NewTxVideoActivity
import com.mints.helivideo.video.tx.TXVodPlayerWrapper
import com.mints.helivideo.video.tx.VideoModel
import com.mints.library.utils.json.JsonUtil
import com.mints.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_recommend.*
......@@ -43,6 +48,16 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
}
private fun initView() {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "recommend.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
lottieDrawable.loop(true)
lottieDrawable.playAnimation()
}
iv_recommend_top.setImageDrawable(lottieDrawable)
val videoModel = VideoModel(recommendBean?.showVedioUrl)
val txVodPlayerWrapper = TXVodPlayerWrapper(mContext)
txVodPlayerWrapper.preStartPlay(videoModel)
......@@ -52,6 +67,7 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
private fun initListener() {
ic_recommend_quit.setOnClickListener(this)
fl_recommend_next.setOnClickListener(this)
}
override fun onResume() {
......@@ -85,6 +101,11 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
R.id.ic_recommend_quit -> {
finish()
}
R.id.fl_recommend_next -> {
val bundle = Bundle()
bundle.putString(Constant.VEDIO_BEAN, JsonUtil.toJson(recommendBean?.vedioMsg))
readyGoThenKill(NewTxVideoActivity::class.java, bundle)
}
}
}
}
\ No newline at end of file
......@@ -5,33 +5,57 @@
android:background="#90000000"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="30dp"
android:layout_marginTop="40dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="40dp">
android:orientation="vertical">
<com.mints.helivideo.video.tx.TXVideoBaseView
android:id="@+id/baseItemView"
<RelativeLayout
android:layout_width="330dp"
android:layout_height="420dp">
<com.mints.helivideo.video.tx.TXVideoBaseView
android:id="@+id/baseItemView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/ic_recommend_quit"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentEnd="true"
android:layout_gravity="end"
android:layout_marginTop="2dp"
android:padding="10dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_quit_yuan" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/fl_recommend_next"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/ic_recommend_quit"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentEnd="true"
android:layout_gravity="end"
android:layout_marginTop="2dp"
android:layout_marginEnd="10dp"
android:padding="10dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_quit_yuan" />
</RelativeLayout>
android:layout_marginTop="10dp"
android:layout_height="100dp">
<ImageView
android:id="@+id/iv_recommend_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:scaleType="centerCrop" />
<Button
android:layout_width="260dp"
android:layout_height="50dp"
android:layout_centerInParent="true"
android:background="@mipmap/bg_vip_btn"
android:text="立即试看"
android:textColor="@color/white"
android:textSize="16sp" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment