[fix]
[UI变更]
This commit is contained in:
yangyakun
2025-06-17 17:10:55 +08:00
parent 9286462d19
commit 5988f2a7b9
14 changed files with 25 additions and 12 deletions

View File

@@ -39,6 +39,7 @@ class TaskRunningAdapter(
private var totalHeight = 0f private var totalHeight = 0f
fun setDataList(dataList: List<BusStationBean>) { fun setDataList(dataList: List<BusStationBean>) {
CallerLogger.d(TAG,"设置view-----")
this.mData.clear() this.mData.clear()
this.mData.addAll(dataList) this.mData.addAll(dataList)
if (LineModel.startStationIndex == 0) { if (LineModel.startStationIndex == 0) {
@@ -47,7 +48,7 @@ class TaskRunningAdapter(
totalHeight = totalHeight =
(halfHeight + (dataList.size - 1 - LineModel.startStationIndex) * heightItem).toFloat() (halfHeight + (dataList.size - 1 - LineModel.startStationIndex) * heightItem).toFloat()
} }
notifyItemRangeChanged(0, dataList.size, true) notifyDataSetChanged()
} }
override fun onCreateViewHolder( override fun onCreateViewHolder(

View File

@@ -4,8 +4,10 @@ import android.animation.Animator
import android.animation.AnimatorListenerAdapter import android.animation.AnimatorListenerAdapter
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.content.Context import android.content.Context
import android.graphics.drawable.AnimationDrawable
import android.util.AttributeSet import android.util.AttributeSet
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.commons.AbsMogoApplication import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -17,6 +19,7 @@ import kotlinx.android.synthetic.main.m2_arrive_view.view.aciv_arrow_left
import kotlinx.android.synthetic.main.m2_arrive_view.view.aciv_arrow_right import kotlinx.android.synthetic.main.m2_arrive_view.view.aciv_arrow_right
import kotlinx.android.synthetic.main.m2_arrive_view.view.aciv_door_left import kotlinx.android.synthetic.main.m2_arrive_view.view.aciv_door_left
import kotlinx.android.synthetic.main.m2_arrive_view.view.aciv_door_right import kotlinx.android.synthetic.main.m2_arrive_view.view.aciv_door_right
import kotlinx.android.synthetic.main.m2_arrive_view.view.iv_animal_list
import kotlinx.android.synthetic.main.m2_arrive_view.view.ochtv_arrive_station_value import kotlinx.android.synthetic.main.m2_arrive_view.view.ochtv_arrive_station_value
import me.jessyan.autosize.utils.AutoSizeUtils import me.jessyan.autosize.utils.AutoSizeUtils
@@ -95,6 +98,9 @@ class ArrivedView : ConstraintLayout {
if(!animator.isRunning){ if(!animator.isRunning){
animator.start() animator.start()
} }
iv_animal_list.visibility = View.VISIBLE
val animationDrawable = iv_animal_list.drawable as AnimationDrawable
animationDrawable.start()
}else{ }else{
animator.cancel() animator.cancel()
val paramsLeft = aciv_door_left.layoutParams as LayoutParams val paramsLeft = aciv_door_left.layoutParams as LayoutParams
@@ -108,6 +114,10 @@ class ArrivedView : ConstraintLayout {
aciv_arrow_left.visibility = GONE aciv_arrow_left.visibility = GONE
aciv_arrow_right.visibility = GONE aciv_arrow_right.visibility = GONE
animatorArrow.cancel() animatorArrow.cancel()
iv_animal_list.visibility = View.VISIBLE
val animationDrawable = iv_animal_list.drawable as AnimationDrawable
animationDrawable.stop()
} }
} }

View File

@@ -49,9 +49,7 @@ class LineView : ConstraintLayout, LineViewModel.LineViewCallback {
// AutoSizeUtils.dp2px(context,20f) // AutoSizeUtils.dp2px(context,20f)
// ) // )
// ) // )
autoplit_info.onClick {
updateRemainMt("12公里","25分钟")
}
ll_station_container.setAdapter(mAdapter) ll_station_container.setAdapter(mAdapter)
ll_station_container.itemAnimator?.addDuration = 0; ll_station_container.itemAnimator?.addDuration = 0;

View File

@@ -76,19 +76,13 @@ class M2StatusBarView @JvmOverloads constructor(
tv_power_cos?.also { tv_power_cos?.also {
it.text = "?" it.text = "?"
} }
iv_logon.onClick {
BizLoopManager.runInMainThread{
BleManager.scanLeDevice()
}
}
tv_power_cos.onClick { tv_power_cos.onClick {
BizLoopManager.runInIoThread { BizLoopManager.runInIoThread {
BleManager.sendData2Wx("1889480", "00,${System.currentTimeMillis()}") BleManager.sendData2Wx("1889480", "00,${System.currentTimeMillis()}")
} }
} }
tv_status_line_name.onClick {
updateLineInfo("线路名称")
}
} }
override fun updateLineInfo(lineName: String?) { override fun updateLineInfo(lineName: String?) {

View File

@@ -12,6 +12,7 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
android:clickable="false"
app:layout_constraintEnd_toStartOf="@+id/autoplit_info" app:layout_constraintEnd_toStartOf="@+id/autoplit_info"
android:layout_marginEnd="@dimen/dp_41" android:layout_marginEnd="@dimen/dp_41"
android:layout_width="0dp" android:layout_width="0dp"

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:background="@color/b2_95B1D6" tools:background="@color/b2_95B1D6"
android:clickable="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_68" android:layout_height="@dimen/dp_68"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"> tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:background="@color/b2_95B1D6" tools:background="@color/b2_95B1D6"
android:clickable="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_68" android:layout_height="@dimen/dp_68"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"> tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">

View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:background="@color/b2_95B1D6" tools:background="@color/b2_95B1D6"
android:layout_width="match_parent" android:layout_width="match_parent"
android:clickable="false"
android:layout_height="@dimen/dp_68" android:layout_height="@dimen/dp_68"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"> tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:clickable="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"> android:layout_height="@dimen/dp_68">

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:clickable="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"> android:layout_height="@dimen/dp_68">

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:clickable="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"> android:layout_height="@dimen/dp_68">

View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:clickable="false"
android:layout_height="@dimen/dp_68"> android:layout_height="@dimen/dp_68">
<View <View

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:clickable="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"> android:layout_height="@dimen/dp_68">

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout" tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
android:clickable="false"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_68"> android:layout_height="@dimen/dp_68">