[m1]
[视频播放图片调整]
This commit is contained in:
yangyakun
2023-02-16 00:38:56 +08:00
parent 84f38d0aba
commit 208dcf2699
17 changed files with 84 additions and 13 deletions

View File

@@ -197,7 +197,8 @@ class BusPassengerFunctionSoftFragment :
}
}
if(HorizontalDecoration.distance!=0){
rv_aircondition_temperature.smoothScrollToPosition(data.size-1)
rv_aircondition_temperature.scrollToPosition(data.size-1)
adapter.setCheckIndex(data.size-1)
}
}
@@ -326,7 +327,9 @@ class BusPassengerFunctionSoftFragment :
val adapter = rv_aircondition_temperature.adapter as TemperatureAdapter
if(enable){
adapter.setEnable(true)
iv_temperature_select.visibility = View.VISIBLE
if(rg_select_function.checkedRadioButtonId==R.id.tv_setting_aircondition) {
iv_temperature_select.visibility = View.VISIBLE
}
rb_wind_speed_low.setTextColor(ContextCompat.getColorStateList(requireContext(),R.color.bus_p_function_airconditon_pattern_text_color_selector))
}else{
adapter.setEnable(false)

View File

@@ -58,7 +58,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
constructor(context: Context?, fullFlag: Boolean?) : super(context, fullFlag)
override fun init(context: Context) {
mEnlargeImageRes = R.drawable.taxi_p_change_full
mEnlargeImageRes = R.drawable.bus_p_function_video_player_change_full
super.init(context)
start = findViewById(R.id.start)
coverImage = findViewById(R.id.thumbImage)
@@ -78,7 +78,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
aivStartPlay.scaleX = 0.8f
aivStartPlay.scaleY = 0.8f
mProgressBar.thumb = ZoomDrawable.zoomDrawableImage(context,R.drawable.bg_taxi_p_video_index,0.66f,0.66f)
mProgressBar.thumb = ActivityCompat.getDrawable(context, R.drawable.bus_p_function_video_player_thumb_samll)
}
private fun addDrageAnchor(){
@@ -105,8 +105,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
titleTextView.layoutParams = layoutParams1
aivStartPlay.scaleX = 1f
aivStartPlay.scaleY = 1f
val drawable = ActivityCompat.getDrawable(context, R.drawable.bg_taxi_p_video_index)
mProgressBar.thumb = drawable
mProgressBar.thumb = ActivityCompat.getDrawable(context, R.drawable.bus_p_function_video_player_thumb_big)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
mProgressBar.maxHeight = 6
mProgressBar.minHeight = 6
@@ -122,11 +121,19 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
override fun updateStartImage() {
when (mCurrentState) {
GSYVideoView.CURRENT_STATE_PLAYING ->{
start.setImageResource(R.drawable.notice_video_pause)
if(isIfCurrentIsFullscreen){
start.setImageResource(R.drawable.bus_p_function_video_player_pause_big)
}else {
start.setImageResource(R.drawable.bus_p_function_video_player_pause_small)
}
aivStartPlay.visibility = View.GONE
}
else -> {
start.setImageResource(R.drawable.notice_video_after_pause)
if(isIfCurrentIsFullscreen){
start.setImageResource(R.drawable.bus_p_function_video_player_start_big)
}else {
start.setImageResource(R.drawable.bus_p_function_video_player_start_small)
}
aivStartPlay.visibility = View.VISIBLE
}
}
@@ -156,7 +163,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
override fun changeUiToNormal() {
super.changeUiToNormal()
setViewShowState(fullscreenButton, INVISIBLE)
setViewShowState(fullscreenButton, VISIBLE)
}
override fun changeUiToPlayingShow() {
@@ -237,7 +244,7 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
}
override fun onCompletion() {
start.setImageResource(R.drawable.notice_video_after_pause)
start.setImageResource(R.drawable.bus_p_function_video_player_start_small)
}
override fun onSurfaceUpdated(surface: Surface) {
@@ -375,8 +382,8 @@ class ConsultVideoPlayer : StandardGSYVideoPlayer {
cloneParams(this, gsyVideoPlayer)
val frameLayout = FrameLayout(context)
if (gsyVideoPlayer.fullscreenButton != null) {
gsyVideoPlayer.fullscreenButton.setImageResource(R.drawable.taxi_p_change_normal)
gsyVideoPlayer.start.setImageResource(R.drawable.notice_video_pause_big)
gsyVideoPlayer.fullscreenButton.setImageResource(R.drawable.bus_p_function_video_player_change_normal)
gsyVideoPlayer.start.setImageResource(R.drawable.bus_p_function_video_player_pause_big)
gsyVideoPlayer.fullscreenButton.setOnClickListener { v ->
if (mBackFromFullScreenListener == null) {
clearFullscreenLayout(gsyVideoPlayer)

View File

@@ -8,6 +8,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.och.bus.passenger.ui.adapter.TemperatureAdapter;
public class HorizontalDecoration extends RecyclerView.ItemDecoration {
private int space = 0;
@@ -55,7 +56,11 @@ public class HorizontalDecoration extends RecyclerView.ItemDecoration {
view.postDelayed(new Runnable() {
@Override
public void run() {
parent.smoothScrollToPosition(shouldScrollTo);
final RecyclerView.Adapter adapter = parent.getAdapter();
if(adapter instanceof TemperatureAdapter){
parent.scrollToPosition(shouldScrollTo);
((TemperatureAdapter)adapter).setCheckIndex(shouldScrollTo);
}
}
}, 500);
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp()).putInt(distancekey,distance);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1015 B

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/taxi_p_change_full"
android:width="@dimen/dp_44"
android:height="@dimen/dp_43"/>
</layer-list >

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/taxi_p_change_normal"
android:width="@dimen/dp_45"
android:height="@dimen/dp_42"/>
</layer-list >

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/notice_video_pause_big"
android:width="@dimen/dp_43"
android:height="@dimen/dp_61"/>
</layer-list >

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/notice_video_pause_small"
android:width="@dimen/dp_29"
android:height="@dimen/dp_42"/>
</layer-list >

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/notice_video_start_big"
android:width="@dimen/dp_44"
android:height="@dimen/dp_51"/>
</layer-list >

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/notice_video_start_small"
android:width="@dimen/dp_26"
android:height="@dimen/dp_37"/>
</layer-list >

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/bg_taxi_p_video_thumb_big"
android:width="@dimen/dp_44"
android:height="@dimen/dp_44"/>
</layer-list >

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/bg_taxi_p_video_thumb_small"
android:width="@dimen/dp_36"
android:height="@dimen/dp_35"/>
</layer-list >