main
parent
2ad238ff63
commit
b5ad951171
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
Binary file not shown.
@ -0,0 +1,189 @@
|
||||
package com.example.tyre;
|
||||
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.DownloadManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.Settings;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.example.tyre.util.MyUrl;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class MainActivity2 extends AppCompatActivity {
|
||||
|
||||
private static final int REQUEST_PERMISSIONS = 100;
|
||||
private long downloadId;
|
||||
private DownloadManager downloadManager;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main2);
|
||||
|
||||
Button downloadButton = findViewById(R.id.download_button);
|
||||
|
||||
// 注册下载完成广播接收器
|
||||
registerReceiver(onDownloadComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
||||
|
||||
downloadButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (checkPermissions()) {
|
||||
startDownload("app-release.apk");
|
||||
} else {
|
||||
requestPermissions();
|
||||
}
|
||||
}
|
||||
});
|
||||
downloadButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (checkPermissions()) {
|
||||
startDownload("app-release.apk");
|
||||
} else {
|
||||
requestPermissions();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean checkPermissions() {
|
||||
boolean storagePermissionGranted = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;
|
||||
boolean installPermissionGranted = true;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
installPermissionGranted = getPackageManager().canRequestPackageInstalls();
|
||||
}
|
||||
|
||||
return storagePermissionGranted && installPermissionGranted;
|
||||
}
|
||||
|
||||
private void requestPermissions() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
ActivityCompat.requestPermissions(this,
|
||||
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||
REQUEST_PERMISSIONS);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if (!getPackageManager().canRequestPackageInstalls()) {
|
||||
startActivityForResult(new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES)
|
||||
.setData(Uri.parse(String.format("package:%s", getPackageName()))), 1001);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始下载 APK
|
||||
* @param fileName 服务器上的文件名 (例如: "app-release.apk" 或若依数据库里的 "resourceName")
|
||||
*/
|
||||
private void startDownload(String fileName) {
|
||||
// 1. 构建完整的下载 URL
|
||||
String downloadUrl = MyUrl.url + "/common/downloadApk?fileName=tyre_update.apk";
|
||||
|
||||
downloadManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(downloadUrl));
|
||||
request.setTitle("APK下载");
|
||||
request.setDescription("正在下载更新...");
|
||||
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
request.setRequiresDeviceIdle(false);
|
||||
request.setAllowedOverMetered(true);
|
||||
request.setAllowedOverRoaming(true);
|
||||
}
|
||||
|
||||
downloadId = downloadManager.enqueue(request);
|
||||
Toast.makeText(this, "开始下载...", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
private BroadcastReceiver onDownloadComplete = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
|
||||
|
||||
if (downloadId == id) {
|
||||
DownloadManager.Query query = new DownloadManager.Query();
|
||||
query.setFilterById(id);
|
||||
|
||||
Cursor cursor = downloadManager.query(query);
|
||||
if (cursor.moveToFirst()) {
|
||||
int status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
|
||||
|
||||
if (status == DownloadManager.STATUS_SUCCESSFUL) {
|
||||
String localUri = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI));
|
||||
installApk(Uri.parse(localUri).getPath());
|
||||
} else {
|
||||
int reason = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_REASON));
|
||||
Toast.makeText(context, "下载失败,错误码: " + reason, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
cursor.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private void installApk(String apkPath) {
|
||||
File file = new File(apkPath);
|
||||
if (!file.exists()) {
|
||||
Toast.makeText(this, "APK文件不存在", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
Uri uri;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
uri = FileProvider.getUriForFile(this, getPackageName() + ".fileprovider", file);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
} else {
|
||||
uri = Uri.fromFile(file);
|
||||
}
|
||||
|
||||
intent.setDataAndType(uri, "application/vnd.android.package-archive");
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
try {
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "无法安装应用: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
unregisterReceiver(onDownloadComplete);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 1001) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
Toast.makeText(this, "已获得安装未知应用权限", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
Toast.makeText(this, "未获得安装未知应用权限,无法自动安装", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.example.tyre.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CheckInfoSpinnerVo {
|
||||
private List<String> checkResultList;
|
||||
private List<String> checkTypeList;
|
||||
|
||||
public List<String> getCheckResultList() {
|
||||
return checkResultList;
|
||||
}
|
||||
|
||||
public void setCheckResultList(List<String> checkResultList) {
|
||||
this.checkResultList = checkResultList;
|
||||
}
|
||||
|
||||
public List<String> getCheckTypeList() {
|
||||
return checkTypeList;
|
||||
}
|
||||
|
||||
public void setCheckTypeList(List<String> checkTypeList) {
|
||||
this.checkTypeList = checkTypeList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FFFFFF"/>
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="#DDDDDD"/>
|
||||
<padding
|
||||
android:left="2dp"
|
||||
android:top="2dp"
|
||||
android:right="2dp"
|
||||
android:bottom="2dp"/>
|
||||
</shape>
|
||||
@ -0,0 +1,68 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="200"
|
||||
android:viewportHeight="200">
|
||||
|
||||
<!-- 1. 轮胎外圈 (黑色橡胶) -->
|
||||
<!-- 这是轮胎花纹的底色 -->
|
||||
<path
|
||||
android:fillColor="#1A1A1A"
|
||||
android:pathData="M100,100m-95,0a95,95 0,1 1,190 0a95,95 0,1 1,-190 0" />
|
||||
|
||||
<!-- 2. 轮胎花纹沟槽 (模拟俯视纹理) -->
|
||||
<!-- 我们通过绘制多个“Y”字形或放射状线条来模拟花纹 -->
|
||||
<!-- 沟槽 1 -->
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M100,30
|
||||
L100,50
|
||||
M80,45
|
||||
L100,55
|
||||
L120,45
|
||||
M100,55
|
||||
L100,70" />
|
||||
<!-- 沟槽 2 (旋转90度) -->
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M170,100
|
||||
L150,100
|
||||
M155,80
|
||||
L145,100
|
||||
L155,120
|
||||
M145,100
|
||||
L130,100" />
|
||||
<!-- 沟槽 3 (旋转45度) -->
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M150,50
|
||||
L135,65
|
||||
M140,55
|
||||
L130,70
|
||||
L120,60
|
||||
M130,70
|
||||
L115,85" />
|
||||
<!-- 沟槽 4 (旋转-45度) -->
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M150,150
|
||||
L135,135
|
||||
M140,145
|
||||
L130,130
|
||||
L120,140
|
||||
M130,130
|
||||
L115,115" />
|
||||
|
||||
<!-- 3. 轮胎中心孔 (深色) -->
|
||||
<!-- 模拟轮毂中心 -->
|
||||
<path
|
||||
android:fillColor="#333333"
|
||||
android:pathData="M100,100m-15,0a15,15 0,1 1,30 0a15,15 0,1 1,-30 0" />
|
||||
|
||||
<!-- 4. 高光效果 (模拟橡胶反光) -->
|
||||
<!-- 增加一点光泽感,让轮胎看起来不那么死板 -->
|
||||
<path
|
||||
android:fillColor="#33333333"
|
||||
android:pathData="M100,100m-70,0a70,70 0,1 1,140 0a70,70 0,1 1,-140 0" />
|
||||
|
||||
</vector>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@ -1,234 +1,284 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
style="@style/tablebarStyleTwo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:text="轮胎质检"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F5F5F5"> <!-- 浅灰色背景 -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
|
||||
<TextView
|
||||
style="@style/alltext"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/blue2"
|
||||
android:text="EPC:" />
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/epc"
|
||||
<!-- 顶部标题卡片 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/black"
|
||||
android:background="@drawable/bg_santex_coppy"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
|
||||
<TextView
|
||||
style="@style/alltext"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/blue2"
|
||||
android:text="胎号:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/th"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/black"
|
||||
android:background="@drawable/bg_santex_coppy"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
|
||||
<TextView
|
||||
style="@style/alltext"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/blue2"
|
||||
android:text="自编号:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/zbh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/black"
|
||||
android:background="@drawable/bg_santex_coppy"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
|
||||
<TextView
|
||||
style="@style/alltext"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/blue2"
|
||||
android:text="检查结果:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/checkresult"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="22sp"
|
||||
android:textColor="@color/black"
|
||||
android:background="@drawable/bg_santex_coppy"
|
||||
android:gravity="center" />
|
||||
<Spinner
|
||||
android:id="@+id/result"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="match_parent"></Spinner>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
|
||||
<TextView
|
||||
style="@style/alltext"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/blue2"
|
||||
android:text="处理意见:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tyrecon"
|
||||
android:layout_width="256dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_santex_coppy"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
android:inputType="textMultiLine"
|
||||
android:minLines="3"
|
||||
android:lines="5"
|
||||
android:gravity="top|start"
|
||||
android:padding="8dp"
|
||||
android:scrollbars="vertical"
|
||||
android:hint="请输入内容"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:text="轮胎质检"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:textColor="@android:color/white" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- EPC 输入项 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/epc_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp"
|
||||
android:enabled="false">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/epc_display"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:text="等待扫描..."
|
||||
android:textSize="16sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:background="@null"
|
||||
android:enabled="false"
|
||||
android:focusable="false"
|
||||
android:cursorVisible="false" />/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 胎号 & 自编号 (并排显示) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/th_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/th"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="轮胎编号"
|
||||
android:textSize="16sp"
|
||||
android:enabled="false"
|
||||
android:focusable="false"
|
||||
android:cursorVisible="false" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginStart="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/zbh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/zbh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="自编号"
|
||||
android:textSize="16sp"
|
||||
android:enabled="false"
|
||||
android:focusable="false"
|
||||
android:cursorVisible="false" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 花纹深度 & 里程 (并排显示) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/patternDepth_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/patternDepth"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="花纹深度(毫米)"
|
||||
android:inputType="numberDecimal"
|
||||
android:textSize="16sp" />
|
||||
<!-- 单位直接写在 Hint 或通过辅助文本显示 -->
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginStart="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/mileage_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/mileage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="当前里程(公里)"
|
||||
android:inputType="number"
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 检查结果 (下拉选择) -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/result_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/result"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/check_type_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/CheckTypeSpinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 处理意见 (多行文本) -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_margin="8dp"
|
||||
app:boxStrokeColor="?attr/colorPrimary">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/tyrecon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:gravity="top|start"
|
||||
android:hint="详细处理意见..."
|
||||
android:inputType="textMultiLine"
|
||||
android:maxLines="5"
|
||||
android:textSize="16sp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="24dp"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/wc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:text="保存并完成"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/fh"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="8dp"
|
||||
android:text="返回重填"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<!--<LinearLayout-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="40dp"-->
|
||||
<!--android:layout_marginStart="8dp"-->
|
||||
<!--android:layout_marginTop="20dp"-->
|
||||
<!--android:layout_marginEnd="8dp"-->
|
||||
<!--android:orientation="horizontal"-->
|
||||
<!--app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!--app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!--app:layout_constraintTop_toBottomOf="@+id/linearLayout3">-->
|
||||
<!--<TextView-->
|
||||
<!--style="@style/alltext"-->
|
||||
<!--android:layout_width="80dp"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:background="@color/blue2"-->
|
||||
<!--android:text="操作人:" />-->
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:id="@+id/czr"-->
|
||||
<!--android:layout_width="match_parent"-->
|
||||
<!--android:layout_height="match_parent"-->
|
||||
<!--android:layout_marginStart="8dp"-->
|
||||
<!--android:layout_weight="1"-->
|
||||
<!--android:textSize="22sp"-->
|
||||
<!--android:textColor="@color/black"-->
|
||||
<!--android:background="@drawable/bg_santex_coppy"-->
|
||||
<!--android:gravity="center" />-->
|
||||
<!--<Spinner-->
|
||||
<!--android:id="@+id/spinner"-->
|
||||
<!--android:entries="@array/user"-->
|
||||
<!--android:layout_width="30dp"-->
|
||||
<!--android:layout_height="match_parent"></Spinner>-->
|
||||
<!--</LinearLayout>-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="150dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:id="@+id/wc"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="完成"
|
||||
style="@style/buttonStyle"
|
||||
android:textColor="@color/black"/>
|
||||
<View
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
<Button
|
||||
android:id="@+id/fh"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="返回"
|
||||
style="@style/buttonStyle"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:background="#f5f5f5">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="APK下载安装器"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333"
|
||||
android:layout_marginBottom="32dp"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:src="@drawable/bg_button"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:contentDescription="Android Logo" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/download_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="下载并安装APK"
|
||||
android:textSize="18sp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:backgroundTint="#4CAF50"
|
||||
android:textColor="#FFFFFF"
|
||||
android:elevation="4dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="点击按钮开始下载并自动安装APK文件"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666"
|
||||
android:layout_marginTop="24dp"
|
||||
android:gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:background="#F0F4F8"> <!-- 浅灰色背景提升质感 -->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp">
|
||||
|
||||
<!-- 顶部:搜索卡片 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="公交车轮胎管理"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#202020"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="20dp"/>
|
||||
|
||||
<!-- 车牌号输入 -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_plate_number"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入车牌号"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:endIconMode="custom"
|
||||
app:endIconDrawable="@mipmap/search_icon">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_plate_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textCapCharacters"
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_retrieve"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="立即检索"
|
||||
android:textSize="16sp"
|
||||
app:cornerRadius="8dp" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 底部:三轴轮位图展示区 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_visual"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/card_search"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 辅助线:垂直中心线 (分隔左右轮胎) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_vertical_center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<!-- 辅助线:水平线 1 (第1轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="96dp" />
|
||||
|
||||
<!-- 辅助线:水平线 2 (第2轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="241dp" />
|
||||
|
||||
<!-- 辅助线:水平线 3 (第3轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="399dp" />
|
||||
|
||||
<!-- 车头指示 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🚗 车头方向"
|
||||
android:textColor="#999999"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- ================= 第1轴 (前轴) ================= -->
|
||||
<!-- 左侧轮胎 (1轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_left_front"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_1"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_1" />
|
||||
|
||||
<!-- 右侧轮胎 (1轴) -->
|
||||
|
||||
<!-- ================= 第2轴 (中轴) ================= -->
|
||||
<!-- 左侧轮胎 (2轴) -->
|
||||
|
||||
<include
|
||||
android:id="@+id/tire_right_front"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_1" />
|
||||
|
||||
<include
|
||||
android:id="@+id/tire_middle_left"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_2"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
|
||||
<!-- 右侧轮胎 (2轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_middle_right"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_2"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_2"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
|
||||
<!-- ================= 第3轴 (后轴) ================= -->
|
||||
<!-- 左侧轮胎 (3轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_bottom_left"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_3"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
|
||||
<!-- 右侧轮胎 (3轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_bottom_right"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_3"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_3"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@ -0,0 +1,71 @@
|
||||
<?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="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="2dp">
|
||||
|
||||
<!-- 使用 LinearLayout 包裹三个 TextView -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_tire_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
app:layout_constraintWidth_min="100dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_tire_icon">
|
||||
|
||||
<!-- 品牌 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_brand"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="品牌:"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 规格 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_spec"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="规格:"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<!-- 安装日期/自编号 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_self_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="自编号:"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12sp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_install_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="日期:"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧:轮胎图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_tire_icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/tire_side_view"
|
||||
app:layout_constraintStart_toEndOf="@id/ll_tire_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintWidth_max="60dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_tire_circl"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="4dp">
|
||||
|
||||
<!-- 品牌/简略信息 -->
|
||||
<TextView
|
||||
android:id="@+id/tvBrandShort"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"/>
|
||||
|
||||
<!-- 规格简略 -->
|
||||
<TextView
|
||||
android:id="@+id/tvSpecShort"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textSize="8sp"
|
||||
android:textColor="#666666"/>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<!-- 必须包含 external-path 指向 Download 目录 -->
|
||||
<external-path name="download" path="Download/" />
|
||||
<external-path name="external_files" path="."/>
|
||||
</paths>
|
||||
Loading…
Reference in New Issue