feat:轮胎信息查询气压、花纹页面

asv2022.3.1
wanghao 1 week ago
parent e66ba43add
commit 5e342d92e3

@ -107,8 +107,9 @@ public class TestActivity extends AppCompatActivity {
private void setupClickListeners() { private void setupClickListeners() {
binding.button.setOnClickListener(v -> { binding.button.setOnClickListener(v -> {
Intent intent = new Intent(this, HomePageActivity.class); // Intent intent = new Intent(this, HomePageActivity.class);
startActivity(intent); // startActivity(intent);
finish();
}); });
binding.searchButton.setOnClickListener(v -> { binding.searchButton.setOnClickListener(v -> {

@ -1,83 +1,61 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/allbg"
android:orientation="vertical"
tools:context=".TestActivity"> tools:context=".TestActivity">
<TextView <TextView
android:id="@+id/textView2" android:id="@+id/textView2"
style="@style/tablebarStyleTwo" style="@style/tablebarStyleTwo"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_height="55dp"
android:text="轮胎信息" android:text="轮胎信息"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout2" android:id="@+id/linearLayout2"
style="@style/layout_t12_s8_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="30dp" android:layout_height="45dp">
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="18dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2">
<TextView <TextView
style="@style/alltext" style="@style/alltext"
android:layout_width="match_parent" android:layout_width="90dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="2" android:text="扫描EPC:" />
android:text="EPC:" />
<TextView <TextView
android:id="@+id/in_santext" android:id="@+id/in_santext"
style="@style/scanTextStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent" />
android:layout_weight="0.5"
android:textSize="15sp"
android:textColor="@color/black"
android:background="@drawable/bg_santex_coppy"
android:gravity="center" />
</LinearLayout> </LinearLayout>
<LinearLayout <!-- <LinearLayout-->
android:orientation="vertical" <!-- android:layout_width="match_parent"-->
android:layout_width="match_parent" <!-- android:layout_height="520dp"-->
android:layout_height="520dp" <!-- android:layout_marginStart="20dp"-->
android:layout_marginStart="20dp" <!-- android:layout_marginTop="10dp"-->
android:layout_marginTop="10dp" <!-- android:layout_marginEnd="20dp"-->
android:layout_marginEnd="20dp" <!-- android:background="@drawable/bg_santex_coppy"-->
android:background="@drawable/bg_santex_coppy" <!-- android:orientation="vertical"-->
app:layout_constraintEnd_toEndOf="parent" <!-- app:layout_constraintEnd_toEndOf="parent"-->
app:layout_constraintHorizontal_bias="1.0" <!-- app:layout_constraintHorizontal_bias="1.0"-->
app:layout_constraintStart_toStartOf="parent" <!-- app:layout_constraintStart_toStartOf="parent"-->
app:layout_constraintTop_toBottomOf="@+id/linearLayout2"> <!-- app:layout_constraintTop_toBottomOf="@+id/linearLayout2">-->
<!-- <LinearLayout-->
<Button <!-- android:layout_width="match_parent"-->
android:id="@+id/basemessage" <!-- android:layout_height="300dp"-->
android:layout_width="match_parent" <!-- android:layout_marginTop="50dp"-->
android:layout_height="45dp" <!-- android:orientation="vertical">-->
android:background="@color/xuebai"
android:textSize="18sp"
android:text="基本信息"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginTop="50dp"
android:orientation="vertical">
<!--<LinearLayout--> <!--<LinearLayout-->
<!--android:id="@+id/linearLayout1"--> <!--android:id="@+id/linearLayout1"-->
@ -106,107 +84,142 @@
<LinearLayout <LinearLayout
android:id="@+id/linearLayout4" android:id="@+id/linearLayout4"
style="@style/layout_t12_s8_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="45dp">
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
<TextView <TextView
style="@style/alltext" style="@style/alltext"
android:layout_width="105dp" android:layout_width="90dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="23sp" android:text="品 牌:"
android:text="品 牌:" /> />
<TextView <TextView
android:id="@+id/pinpai" android:id="@+id/pinpai"
style="@style/infotext" style="@style/textView_info_style"
android:textSize="23sp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/linearLayout9" android:id="@+id/linearLayout9"
style="@style/layout_t12_s8_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="45dp">
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
<TextView <TextView
style="@style/alltext" style="@style/alltext"
android:layout_width="105dp" android:layout_width="90dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="23sp" android:text="型 号:"
android:text="型 号:" /> />
<TextView <TextView
android:id="@+id/xinghao" android:id="@+id/xinghao"
style="@style/infotext" style="@style/textView_info_style"
android:textSize="23sp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/linearLayout5" android:id="@+id/linearLayout5"
style="@style/layout_t12_s8_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="45dp">
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
<TextView <TextView
style="@style/alltext" style="@style/alltext"
android:layout_width="105dp" android:layout_width="90dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="23sp" android:text="层 级:"
android:text="层 级:" /> />
<TextView <TextView
android:id="@+id/cengji" android:id="@+id/cengji"
style="@style/infotext" style="@style/textView_info_style"
android:textSize="23sp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/linearLayout6" android:id="@+id/linearLayout6"
style="@style/layout_t12_s8_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="45dp">
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout3">
<TextView <TextView
style="@style/alltext" style="@style/alltext"
android:layout_width="105dp" android:layout_width="90dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="23sp" android:text="花 纹:"
android:text="花 纹:" /> />
<TextView <TextView
android:textSize="23sp"
android:id="@+id/huawen" android:id="@+id/huawen"
style="@style/infotext" style="@style/textView_info_style"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>
<LinearLayout
style="@style/layout_t12_s8_style"
android:layout_width="match_parent"
android:layout_height="45dp">
<TextView
style="@style/alltext"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="气 压:"
/>
<TextView
style="@style/textView_info_style"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
style="@style/layout_t12_s8_style"
android:layout_width="match_parent"
android:layout_height="45dp">
<TextView
style="@style/alltext"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="花纹深度:" />
<TextView
style="@style/textView_info_style"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<LinearLayout
style="@style/layout_t12_s8_style"
android:layout_width="match_parent"
android:layout_height="45dp">
<TextView
style="@style/alltext"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="剩余花纹:" />
<TextView
style="@style/textView_info_style"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<!--<LinearLayout--> <!--<LinearLayout-->
<!--android:id="@+id/linearLayout7"--> <!--android:id="@+id/linearLayout7"-->
<!--android:layout_width="match_parent"--> <!--android:layout_width="match_parent"-->
@ -264,47 +277,50 @@
<!--&gt;--> <!--&gt;-->
<!--</FrameLayout>--> <!--</FrameLayout>-->
</LinearLayout> <!-- </LinearLayout>-->
</LinearLayout> <!-- </LinearLayout>-->
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="55dp"-->
<!-- android:layout_marginStart="20dp"-->
<!-- android:layout_marginTop="600dp"-->
<!-- android:layout_marginEnd="20dp"-->
<!-- android:background="@drawable/bg_santex_coppy"-->
<!-- android:orientation="vertical"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintHorizontal_bias="1.0"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/linearLayout2">-->
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginStart="20dp"
android:layout_marginTop="600dp"
android:layout_marginEnd="20dp"
android:background="@drawable/bg_santex_coppy"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center"> android:gravity="center"
android:orientation="horizontal">
<Button <Button
android:id="@+id/scan_button" android:id="@+id/scan_button"
style="@style/buttonStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="55dp" android:layout_height="55dp"
android:layout_weight="1"
android:layout_margin="18dp" android:layout_margin="18dp"
style="@style/buttonStyle" android:layout_weight="1"
android:letterSpacing="1" android:letterSpacing="1"
android:text="扫描" /> android:text="扫描" />
<Button <Button
android:id="@+id/button" android:id="@+id/button"
style="@style/buttonStyle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="55dp" android:layout_height="55dp"
android:layout_weight="1"
android:layout_margin="18dp" android:layout_margin="18dp"
style="@style/buttonStyle" android:layout_weight="1"
android:letterSpacing="1" android:letterSpacing="1"
android:text="返回" /> android:text="返回" />
</LinearLayout> </LinearLayout>
<!-- </LinearLayout>-->
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -85,7 +85,7 @@
<item name="android:background">@drawable/bg_santex_coppy</item> <item name="android:background">@drawable/bg_santex_coppy</item>
<item name="android:gravity">center</item> <item name="android:gravity">center</item>
<item name="android:textColor">@color/black</item> <item name="android:textColor">@color/black</item>
<item name="android:textSize">15sp</item> <item name="android:textSize">16sp</item>
</style> </style>
<style name="layout_t12_s8_style"> <style name="layout_t12_s8_style">

Loading…
Cancel
Save