样式变更
This commit is contained in:
@@ -157,7 +157,7 @@ object OverlayLeftViewUtils {
|
||||
if(isCurrentProcess) {
|
||||
close(view, windowManager)
|
||||
val sumDis = SharedPrefsMgr.getInstance(context).getInt(TaxiPassengerConst.SP_KEY_ORDER_SUM_DIS, 0)
|
||||
VideoActivity.startActivity(context, VideoActivity.VIDEOTYPE_CONSULT,sumDis)
|
||||
VideoActivity.startActivity(context, VideoActivity.VIDEOTYPE_MOIES,sumDis)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.och.taxi.passenger.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.*
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.graphics.drawable.Drawable
|
||||
import androidx.annotation.DrawableRes
|
||||
|
||||
object ZoomDrawable {
|
||||
fun zoomDrawableImage(context: Context,@DrawableRes id:Int,scaleX:Float,scaleY:Float):Drawable{
|
||||
|
||||
val bitmap: Bitmap = BitmapFactory.decodeResource(context.resources, id)
|
||||
val bitmapWidth = bitmap.width
|
||||
val bitmapHeight = bitmap.height
|
||||
val matrix = Matrix()
|
||||
matrix.postScale(scaleX, scaleY)
|
||||
// 产生缩放后的Bitmap对象
|
||||
val resizeBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmapWidth, bitmapHeight, matrix, true)
|
||||
return BitmapDrawable(context.resources,resizeBitmap)
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.mogo.och.taxi.passenger.widget
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.util.TypedValue
|
||||
import android.view.Gravity
|
||||
@@ -14,13 +15,14 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.marginTop
|
||||
import androidx.core.app.ActivityCompat
|
||||
import com.mogo.eagle.core.utilcode.util.TimeTransformUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
|
||||
import com.mogo.och.taxi.passenger.R
|
||||
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils
|
||||
import com.mogo.och.taxi.passenger.ui.video.FullVideoUtils
|
||||
import com.mogo.och.taxi.passenger.utils.ZoomDrawable
|
||||
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
@@ -74,6 +76,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL)
|
||||
aivStartPlay.scaleX = 0.8f
|
||||
aivStartPlay.scaleY = 0.8f
|
||||
|
||||
mProgressBar.thumb = ZoomDrawable.zoomDrawableImage(context,R.drawable.bg_taxi_p_video_index,0.66f,0.66f)
|
||||
}
|
||||
|
||||
private fun addDrageAnchor(){
|
||||
@@ -82,8 +86,30 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
layoutBottom.post {
|
||||
val layoutParams = layoutBottom.layoutParams as ConstraintLayout.LayoutParams
|
||||
layoutParams.setMargins(333,0,333,90)
|
||||
layoutParams.height = 148
|
||||
layoutBottom.layoutParams = layoutParams
|
||||
}
|
||||
|
||||
mTopContainer.post {
|
||||
val layoutParams = mTopContainer.layoutParams as ConstraintLayout.LayoutParams
|
||||
layoutParams.height = 320
|
||||
mTopContainer.layoutParams = layoutParams
|
||||
|
||||
fullscreenButton.setPadding(92,0,92,0)
|
||||
titleTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 50f)
|
||||
val layoutParams1 = titleTextView.layoutParams as ConstraintLayout.LayoutParams
|
||||
layoutParams1.setMargins(80,0,0,0)
|
||||
titleTextView.layoutParams = layoutParams1
|
||||
aivStartPlay.scaleX = 1f
|
||||
aivStartPlay.scaleY = 1f
|
||||
val drawable = ActivityCompat.getDrawable(context, R.drawable.bg_taxi_p_video_index)
|
||||
mProgressBar.thumb = drawable
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
mProgressBar.maxHeight = 6
|
||||
mProgressBar.minHeight = 6
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -240,21 +266,6 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
}
|
||||
}
|
||||
|
||||
fun fullMarainTop(){
|
||||
if(mIfCurrentIsFullscreen&&smalllPlayer!=null) {
|
||||
if(mTopContainer.marginTop==0) {
|
||||
val layoutParams = mTopContainer.layoutParams as ConstraintLayout.LayoutParams
|
||||
layoutParams.height = 336
|
||||
mTopContainer.layoutParams = layoutParams
|
||||
fullscreenButton.setPadding(80,0,80,0)
|
||||
titleTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 50f)
|
||||
titleTextView.setPadding(30,0,0,0)
|
||||
aivStartPlay.scaleX = 1f
|
||||
aivStartPlay.scaleY = 1f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun setViewShowState(view: View?, visibility: Int) {
|
||||
if (view === mThumbImageViewLayout && visibility != View.VISIBLE) {
|
||||
return
|
||||
@@ -264,7 +275,6 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
|
||||
|
||||
override fun onSurfaceAvailable(surface: Surface) {
|
||||
super.onSurfaceAvailable(surface)
|
||||
fullMarainTop()
|
||||
if (GSYVideoType.getRenderType() != GSYVideoType.TEXTURE) {
|
||||
if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) {
|
||||
mThumbImageViewLayout.visibility = View.INVISIBLE
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="@color/taxi_order_status_textColor"/>
|
||||
<size android:width="24px" android:height="24px"/>
|
||||
</shape>
|
||||
@@ -19,7 +19,7 @@
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<corners android:radius="5px"/>
|
||||
<gradient android:startColor="#2972FF" android:endColor="#27C8FF"/>
|
||||
<gradient android:startColor="#303CFF" android:centerColor="#216CFF" android:endColor="#25C1F9"/>
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
android:src="@drawable/taxi_p_mogo_consult_title_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_130"
|
||||
android:layout_marginStart="@dimen/dp_100"
|
||||
android:layout_marginTop="157px"
|
||||
android:layout_marginStart="120px"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@+id/fullscreen"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/fullscreen"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="40px"
|
||||
android:textColor="@android:color/white"
|
||||
@@ -113,6 +113,7 @@
|
||||
android:max="100"
|
||||
android:maxHeight="4px"
|
||||
android:minHeight="4px"
|
||||
android:splitTrack="false"
|
||||
android:progressDrawable="@drawable/taxi_video_seekbar_style"
|
||||
android:thumb="@drawable/bg_taxi_p_video_index" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user