[2.14.0]BadCase三期-录包管理
This commit is contained in:
@@ -107,6 +107,10 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
BadCaseManager.showBadCaseConfigWindow(ctx)
|
||||
}
|
||||
|
||||
override fun showBadCaseManagerView(context: Context) {
|
||||
BadCaseManager.showBadCaseManagerWindow(context)
|
||||
}
|
||||
|
||||
override fun getUpgradeVersionUrls(versionName: String) {
|
||||
upgradeManager.getPackageUrls(versionName)
|
||||
}
|
||||
|
||||
@@ -98,6 +98,22 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示BadCase录包管理页面
|
||||
*/
|
||||
fun showBadCaseManagerWindow(context: Context){
|
||||
val badCaseManagerView = BadCaseManagerView(context)
|
||||
badCaseManagerView.setOnClickListener(object: BadCaseManagerView.ClickListener{
|
||||
override fun onClose() {
|
||||
hideFloat?.invoke()
|
||||
hideFloat = null
|
||||
}
|
||||
})
|
||||
context.enqueuePop(badCaseManagerView,AutoSizeUtils.dp2px(context,960f), WindowManager.LayoutParams.MATCH_PARENT, key = "BadCaseConfigView").also {
|
||||
hideFloat = it
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 主动采集BadCase
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.zhidao.loglib.download.DownloadManager
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.record.Audition
|
||||
import kotlinx.android.synthetic.main.layout_badcase_manager.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
internal class BadCaseManagerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr){
|
||||
|
||||
companion object {
|
||||
const val TAG = "BadCaseManagerView"
|
||||
}
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_badcase_manager, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
background = ColorDrawable(Color.parseColor("#F0151D41"))
|
||||
//关闭BadCase管理窗口
|
||||
ivManagerClose.setOnClickListener {
|
||||
clickListener?.onClose()
|
||||
}
|
||||
|
||||
//音频文件播放
|
||||
// Audition.getInstance().playOrStop("/mnt/sdcard/mogo/test.wav")
|
||||
|
||||
//音频下载
|
||||
// DownloadManager.getInstance().init(context)
|
||||
// DownloadManager.getInstance().download("CarPad/mogopadlog/X20202111230C01YYW/2023-01-30/Audio_1675049657187_BadCase.wav",
|
||||
// "/mnt/sdcard/mogo/","test13.wav")
|
||||
}
|
||||
|
||||
fun setOnClickListener(clickListener: ClickListener) {
|
||||
this.clickListener = clickListener
|
||||
}
|
||||
|
||||
interface ClickListener {
|
||||
fun onClose()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.zhjt.mogo_core_function_devatools.R;
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description Bag包上传进度展示弹窗
|
||||
* @since: 2022/2/1
|
||||
*/
|
||||
public class BagUploadDialog extends Dialog {
|
||||
|
||||
private TextView tvCancelUpload;//取消上传
|
||||
private TextView tvCancel;//取消
|
||||
private TextView tvUploadDetail;//上传详情
|
||||
|
||||
public BagUploadDialog(@NonNull Context context) {
|
||||
super(context, R.style.bad_case_dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_bag_upload);
|
||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
||||
params.height = 688;
|
||||
params.width = 1110;
|
||||
getWindow().setAttributes(params);//向WindowManager设置属性
|
||||
setCanceledOnTouchOutside(false);
|
||||
init();
|
||||
initEvent();
|
||||
}
|
||||
|
||||
private void init(){
|
||||
tvCancelUpload = findViewById(R.id.tvCancelUpload);
|
||||
tvCancel = findViewById(R.id.tvCancel);
|
||||
tvUploadDetail = findViewById(R.id.tvUploadDetail);
|
||||
}
|
||||
|
||||
private void initEvent(){
|
||||
//取消上传
|
||||
tvCancelUpload.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
//取消
|
||||
tvCancel.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.zhjt.mogo_core_function_devatools.R;
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase车端磁盘空间已满预警弹窗
|
||||
* @since: 2022/2/1
|
||||
*/
|
||||
public class SpaceWarningDialog extends Dialog {
|
||||
|
||||
private TextView tvCleanDisk;//清理磁盘
|
||||
private TextView tvCancel;//取消
|
||||
|
||||
public SpaceWarningDialog(@NonNull Context context) {
|
||||
super(context, R.style.bad_case_dialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_space_warning);
|
||||
WindowManager.LayoutParams params = getWindow().getAttributes();
|
||||
params.height = 688;
|
||||
params.width = 1110;
|
||||
getWindow().setAttributes(params);//向WindowManager设置属性
|
||||
setCanceledOnTouchOutside(false);
|
||||
init();
|
||||
initEvent();
|
||||
}
|
||||
|
||||
private void init(){
|
||||
tvCleanDisk = findViewById(R.id.tvCleanDisk);
|
||||
tvCancel = findViewById(R.id.tvCancel);
|
||||
}
|
||||
|
||||
private void initEvent(){
|
||||
//清理磁盘
|
||||
tvCleanDisk.setOnClickListener(v -> {
|
||||
//跳转录包管理页面
|
||||
CallerDevaToolsManager.INSTANCE.showBadCaseManagerView(getContext());
|
||||
dismiss();
|
||||
});
|
||||
//取消
|
||||
tvCancel.setOnClickListener(v -> {
|
||||
//取消弹窗
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.biz.adapter
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.CheckBox
|
||||
import android.widget.EditText
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.zhjt.mogo_core_function_devatools.R
|
||||
import kotlinx.coroutines.NonDisposableHandle
|
||||
import kotlinx.coroutines.NonDisposableHandle.parent
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description Bag包管理列表适配器
|
||||
* @since: 2022/12/19
|
||||
*/
|
||||
class BagManagerListAdapter: RecyclerView.Adapter<BagManagerListAdapter.BagManagerListHolder>() {
|
||||
|
||||
private var data:List<String> ?= null
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BagManagerListHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_bag_manager, parent, false)
|
||||
return BagManagerListHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: BagManagerListHolder, position: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
class BagManagerListHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var cbBagSelect: CheckBox = itemView.findViewById(R.id.cbBagSelect)
|
||||
var etBagNameEdit: EditText = itemView.findViewById(R.id.etBagNameEdit)
|
||||
var tvBagReportStatus: TextView = itemView.findViewById(R.id.tvBagReportStatus)
|
||||
var ivBagAudio: ImageView = itemView.findViewById(R.id.ivBagAudio)
|
||||
var tvBagTime: TextView = itemView.findViewById(R.id.tvBagTime)
|
||||
var tvBagSize: TextView = itemView.findViewById(R.id.tvBagSize)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.zhjt.mogo_core_function_devatools.badcase.record;
|
||||
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.text.TextUtils;
|
||||
|
||||
//播放试听
|
||||
public class Audition implements MediaPlayer.OnPreparedListener, MediaPlayer.OnCompletionListener{
|
||||
private static volatile Audition INSTANCE;
|
||||
public MediaPlayer mediaPlayer;
|
||||
private String oldPath;
|
||||
private OnAuditionListener listener;
|
||||
|
||||
public interface OnAuditionListener {
|
||||
void onAuditionCompletion();
|
||||
|
||||
}
|
||||
|
||||
public void registerOnAuditionListener(OnAuditionListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public void unregisterOnAuditionListener() {
|
||||
this.listener = null;
|
||||
}
|
||||
|
||||
private Audition() {
|
||||
}
|
||||
|
||||
public static Audition getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
synchronized (Audition.class) {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new Audition();
|
||||
}
|
||||
}
|
||||
}
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
public boolean isPlaying() {
|
||||
return mediaPlayer != null && mediaPlayer.isPlaying();
|
||||
}
|
||||
|
||||
private void play(String path) {
|
||||
oldPath = path;
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.release();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
if (mediaPlayer == null) {
|
||||
mediaPlayer = new MediaPlayer();
|
||||
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
|
||||
mediaPlayer.setOnPreparedListener(this);
|
||||
mediaPlayer.setOnCompletionListener(this);
|
||||
}
|
||||
try {
|
||||
mediaPlayer.setDataSource(path);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mediaPlayer.prepareAsync();
|
||||
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
oldPath = null;
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer.stop();
|
||||
mediaPlayer.reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean playOrStop(String path) {
|
||||
if (!TextUtils.equals(oldPath, path)) {
|
||||
play(path);
|
||||
return true;
|
||||
} else {
|
||||
stop();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
stop();
|
||||
mediaPlayer = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepared(MediaPlayer mp) {
|
||||
mp.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
oldPath = null;
|
||||
if (listener != null) {
|
||||
listener.onAuditionCompletion();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#BB791C"
|
||||
android:endColor="#BB791C"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#566195"
|
||||
android:endColor="#566195"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#3B4577"
|
||||
android:endColor="#3B4577"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#3B4577"
|
||||
android:endColor="#3B4577"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="16px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="13px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 设置背景色 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<corners android:radius="0dp" />
|
||||
<gradient
|
||||
android:startColor="#33A682"
|
||||
android:endColor="#4ADD80"
|
||||
/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 设置进度条颜色 -->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape>
|
||||
<corners android:radius="0dp" />
|
||||
<gradient
|
||||
android:startColor="#FFD900"
|
||||
android:endColor="#FFAB00"
|
||||
/>
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:startColor="#33A682"
|
||||
android:endColor="#4ADD80"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:startColor="#029DFF"
|
||||
android:endColor="#0056FF"
|
||||
android:angle="0"
|
||||
/>
|
||||
<corners android:radius="16px" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="0"
|
||||
android:startColor="#FFD900"
|
||||
android:endColor="#FFAB00"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="1110px"
|
||||
android:layout_height="688px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUploadTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:text="cos桶上传中"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="56px"
|
||||
android:layout_marginTop="95px"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewVerticalLine"
|
||||
android:layout_width="2px"
|
||||
android:layout_height="160px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewHorizontalLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/viewVerticalLine"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancelUpload"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="取消上传"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUploadProgress"
|
||||
android:layout_width="791px"
|
||||
android:layout_height="42px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="275px"
|
||||
android:background="#FFFFFFFF"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUploadDetail"
|
||||
android:layout_width="814px"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="378px"
|
||||
android:textColor="#FF06D1ED"
|
||||
android:textSize="43px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="1110px"
|
||||
android:layout_height="688px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWarningTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="当前工控机磁盘空间已满"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="56px"
|
||||
android:layout_marginTop="95px"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewVerticalLine"
|
||||
android:layout_width="2px"
|
||||
android:layout_height="160px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewHorizontalLine"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2px"
|
||||
android:background="#66B8BFE8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/viewVerticalLine"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCleanDisk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="清理磁盘"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewHorizontalLine"
|
||||
app:layout_constraintLeft_toRightOf="@id/viewVerticalLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="52px"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewProgress"
|
||||
android:layout_width="791px"
|
||||
android:layout_height="42px"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="275px"
|
||||
android:background="#FFFFFFFF"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="378px"
|
||||
android:text="100G"
|
||||
android:textColor="#FFFF6200"
|
||||
android:textSize="43px"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbBagSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@drawable/badcase_radio_button_style"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etBagNameEdit"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableEnd="@drawable/shape_size_check_false"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/cbBagSelect"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagReportStatus"
|
||||
android:layout_width="162dp"
|
||||
android:layout_height="68dp"
|
||||
android:background="@drawable/bag_report_button_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:text="上报"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBagAudio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvBagReportStatus"
|
||||
android:src="@drawable/shape_size_check_false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/ivBagAudio"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBagSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/ivBagAudio"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:layout_width="960dp"
|
||||
tools:layout_height="match_parent"
|
||||
android:background="#F0151D41"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivManagerClose"
|
||||
android:layout_width="107dp"
|
||||
android:layout_height="107dp"
|
||||
android:layout_marginTop="66dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:src="@drawable/icon_close_nor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewManagerTitleLine"
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="92dp"
|
||||
android:background="#2966EC"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvManagerTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="任务管理"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="42dp"
|
||||
app:layout_constraintTop_toTopOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewManagerTitleLine"
|
||||
android:layout_marginStart="50dp"
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbSpacePercent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewManagerTitleLine"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="785dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:progressDrawable="@drawable/space_percent_bg"
|
||||
android:max="100"
|
||||
android:progress="30"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUsedSpace"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/pbSpacePercent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbSpacePercent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/used_space_bg"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUsedSpaceContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintTop_toTopOf="@id/viewUsedSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewUsedSpace"
|
||||
app:layout_constraintLeft_toRightOf="@id/viewUsedSpace"
|
||||
android:layout_marginStart="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUnusedSpaceContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
app:layout_constraintTop_toTopOf="@id/viewUsedSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewUsedSpace"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewUnusedSpace"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:background="@drawable/unused_space_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/viewUsedSpace"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewUsedSpace"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvUnusedSpaceContent"
|
||||
android:layout_marginEnd="10dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSelectAll"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="80dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/viewManagerTitleLine"
|
||||
app:layout_constraintTop_toBottomOf="@id/viewUsedSpace"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/select_all_button_bg"
|
||||
android:text="一键全选"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancelSelect"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="80dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSelectAll"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSelectAll"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvSelectAll"
|
||||
android:layout_marginStart="20dp"
|
||||
android:background="@drawable/cancel_select_button_bg"
|
||||
android:text="取消"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSelectedBagSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSelectAll"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSelectAll"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
android:textColor="#FF00AFFF"
|
||||
android:textSize="34dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUploadCloud"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbSpacePercent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@drawable/upload_cloud_button_bg"
|
||||
android:text="上云"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="42dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDeleteSelect"
|
||||
android:layout_width="330dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvUploadCloud"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvUploadCloud"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
android:background="@drawable/delete_button_bg"
|
||||
android:text="删除"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="42dp"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvBagList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/pbSpacePercent"
|
||||
app:layout_constraintRight_toRightOf="@id/pbSpacePercent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSelectAll"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvUploadCloud"
|
||||
/>
|
||||
|
||||
</merge>
|
||||
Reference in New Issue
Block a user