BadCase
UI调整
This commit is contained in:
@@ -9,6 +9,7 @@ import android.os.SystemClock
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.*
|
||||
import android.widget.CheckBox
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
@@ -67,7 +68,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
private lateinit var rbFive: CheckBox
|
||||
private lateinit var rbSix: CheckBox
|
||||
|
||||
private lateinit var viewAudioButton: View
|
||||
private lateinit var viewAudioButton: ImageView
|
||||
private lateinit var tvAudioCountDown: TextView
|
||||
|
||||
private lateinit var tvInitiativeReport: TextView
|
||||
@@ -203,7 +204,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
audioFileName = "Audio_${System.currentTimeMillis()}_BadCase"
|
||||
RecordManager.getInstance().start(audioFileName)
|
||||
//更改录音按钮背景
|
||||
viewAudioButton.background = mActivity.getDrawable(R.drawable.bad_case_audio_select)
|
||||
viewAudioButton.setImageResource(R.drawable.icon_bad_case_audio_select)
|
||||
tvAudioCountDown.visibility = View.VISIBLE
|
||||
//开始倒计时
|
||||
if(countDownTimer==null){
|
||||
@@ -218,7 +219,7 @@ class InitiativeBadCaseWindow constructor(activity: Activity) : View.OnTouchList
|
||||
//结束录音
|
||||
RecordManager.getInstance().stop()
|
||||
//更改录音按钮背景
|
||||
viewAudioButton.background = mActivity.getDrawable(R.drawable.bad_case_audio_normal)
|
||||
viewAudioButton.setImageResource(R.drawable.icon_bad_case_audio_normal)
|
||||
}
|
||||
}
|
||||
countDownTimer?.start()
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.util.Log
|
||||
import android.view.*
|
||||
import android.widget.CheckBox
|
||||
import android.widget.CompoundButton
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import com.google.android.flexbox.FlexboxLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
@@ -78,7 +79,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
private lateinit var tvPassiveTime: TextView
|
||||
private lateinit var tvPassiveIdentity: TextView
|
||||
|
||||
private lateinit var viewAudioButton: View
|
||||
private lateinit var viewAudioButton: ImageView
|
||||
private lateinit var tvAudioCountDown: TextView
|
||||
|
||||
private lateinit var tvPassiveReport: TextView
|
||||
@@ -156,7 +157,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
audioFileName = "Audio_${System.currentTimeMillis()}_BadCase"
|
||||
RecordManager.getInstance().start(audioFileName)
|
||||
//更改录音按钮背景
|
||||
viewAudioButton.background = mActivity.getDrawable(R.drawable.bad_case_audio_select)
|
||||
viewAudioButton.setImageResource(R.drawable.icon_bad_case_audio_select)
|
||||
tvAudioCountDown.visibility = View.VISIBLE
|
||||
//开始倒计时
|
||||
if(countDownTimer==null){
|
||||
@@ -171,7 +172,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
//结束录音
|
||||
RecordManager.getInstance().stop()
|
||||
//更改录音按钮背景
|
||||
viewAudioButton.background = mActivity.getDrawable(R.drawable.bad_case_audio_normal)
|
||||
viewAudioButton.setImageResource(R.drawable.icon_bad_case_audio_normal)
|
||||
}
|
||||
}
|
||||
countDownTimer?.start()
|
||||
@@ -285,10 +286,10 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
val lp = FlexboxLayout.LayoutParams(FlexboxLayout.LayoutParams.WRAP_CONTENT,
|
||||
FlexboxLayout.LayoutParams.WRAP_CONTENT)
|
||||
checkBox.buttonDrawable = mActivity.resources.getDrawable(R.drawable.badcase_radio_button_style)
|
||||
checkBox.setPadding(SizeUtils.dp2px(12f),
|
||||
SizeUtils.dp2px(5f),
|
||||
checkBox.setPadding(SizeUtils.dp2px(10f),
|
||||
SizeUtils.dp2px(10f),
|
||||
SizeUtils.dp2px(5f))
|
||||
SizeUtils.dp2px(10f),
|
||||
SizeUtils.dp2px(10f))
|
||||
checkBox.textSize = SizeUtils.sp2px(9f).toFloat()
|
||||
checkBox.text = it.reason
|
||||
checkBox.isChecked = it.isChecked
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#3A57C5"
|
||||
android:endColor="#1E2E87"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="8px" />
|
||||
</shape>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#ff43559C" />
|
||||
<stroke android:width="7px" android:color="#6643559C" />
|
||||
<size
|
||||
android:width="105px"
|
||||
android:height="105px" />
|
||||
</shape>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval"
|
||||
android:useLevel="false">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="145"
|
||||
/>
|
||||
<stroke android:width="7px" android:color="#FFA7B6F0" />
|
||||
<size
|
||||
android:width="105px"
|
||||
android:height="105px" />
|
||||
</shape>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FF3B4577" />
|
||||
<corners android:radius="8px" />
|
||||
</shape>
|
||||
@@ -145,7 +145,7 @@
|
||||
android:textSize="38px"
|
||||
app:layout_constraintTop_toBottomOf="@id/rbProduct"
|
||||
app:layout_constraintLeft_toLeftOf="@id/rbProduct"
|
||||
android:layout_marginTop="@dimen/dp_80"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -290,7 +290,7 @@
|
||||
android:layout_height="15px"
|
||||
android:src="@drawable/icon_expand"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvInitiativeAfter"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvInitiativeAfter"
|
||||
app:layout_constraintTop_toBottomOf="@id/etInitiativeAfterTime"
|
||||
android:layout_marginTop="@dimen/dp_80"
|
||||
/>
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="30px"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/cancel_button_bg"
|
||||
android:background="@drawable/icon_cancel_bg"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
|
||||
@@ -172,40 +172,30 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="30px"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/cancel_button_bg"
|
||||
android:background="@drawable/icon_cancel_bg"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<View
|
||||
<ImageView
|
||||
android:id="@+id/viewAudioBg"
|
||||
android:layout_width="824px"
|
||||
android:layout_height="174px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvInitiativeReport"
|
||||
android:background="@drawable/bad_case_audio_bg"
|
||||
android:background="@drawable/icon_audio_bg"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<View
|
||||
<ImageView
|
||||
android:id="@+id/viewAudioButton"
|
||||
android:layout_width="105px"
|
||||
android:layout_height="105px"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewAudioBg"
|
||||
app:layout_constraintRight_toRightOf="@id/viewAudioBg"
|
||||
app:layout_constraintTop_toTopOf="@id/viewAudioBg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewAudioBg"
|
||||
android:background="@drawable/bad_case_audio_normal"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40px"
|
||||
android:layout_height="55px"
|
||||
android:src="@drawable/icon_audio"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewAudioButton"
|
||||
app:layout_constraintRight_toRightOf="@id/viewAudioButton"
|
||||
app:layout_constraintTop_toTopOf="@id/viewAudioButton"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewAudioButton"
|
||||
android:background="@drawable/icon_bad_case_audio_normal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -78,40 +78,30 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="30px"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/cancel_button_bg"
|
||||
android:background="@drawable/icon_cancel_bg"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<View
|
||||
<ImageView
|
||||
android:id="@+id/viewAudioBg"
|
||||
android:layout_width="824px"
|
||||
android:layout_height="174px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassiveReport"
|
||||
android:background="@drawable/bad_case_audio_bg"
|
||||
android:background="@drawable/icon_audio_bg"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
/>
|
||||
|
||||
<View
|
||||
<ImageView
|
||||
android:id="@+id/viewAudioButton"
|
||||
android:layout_width="105px"
|
||||
android:layout_height="105px"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewAudioBg"
|
||||
app:layout_constraintRight_toRightOf="@id/viewAudioBg"
|
||||
app:layout_constraintTop_toTopOf="@id/viewAudioBg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewAudioBg"
|
||||
android:background="@drawable/bad_case_audio_normal"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40px"
|
||||
android:layout_height="55px"
|
||||
android:src="@drawable/icon_audio"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewAudioButton"
|
||||
app:layout_constraintRight_toRightOf="@id/viewAudioButton"
|
||||
app:layout_constraintTop_toTopOf="@id/viewAudioButton"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewAudioButton"
|
||||
android:background="@drawable/icon_bad_case_audio_normal"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user