update:2020.11.27

fix:适配横屏
add:
This commit is contained in:
2020-11-27 11:13:32 +08:00
parent cf253e460c
commit 790dd16b1a
11 changed files with 546 additions and 7 deletions

View File

@@ -0,0 +1,297 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
tools:context=".MainActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_exit"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_marginLeft="@dimen/dp_5"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bt_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="设备信息"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/imageView3"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/logo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout">
</ImageView>
<ImageView
android:id="@+id/imageView"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3"
app:layout_constraintVertical_bias="0.02">
</ImageView>
<TextView
android:id="@+id/tv_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请扫描绑定设备"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:layout_constraintVertical_bias="0.02" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="@dimen/dp_280"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/background"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_note">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设备SN"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_devsn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="设备SN"
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#797979">-->
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5">
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用户姓名"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#797979">-->
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5">
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="学校"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_school"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#797979">-->
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5">
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="年级"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_grade"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#8c8b8b">-->
<!-- </ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_10">
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="版本"
android:textColor="#4b4b4b"
android:textSize="@dimen/sp_12"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=" "
android:textSize="@dimen/sp_11"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="1dp"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginLeft="@dimen/dp_10"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="#8c8b8b"></ImageView>-->
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:text="连续点击版本号,自动下载新版本"
android:textColor="#E14B88"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>