From de0f0e2607ef84c1dead2e03649fa996f726dba8 Mon Sep 17 00:00:00 2001 From: lmw <125975490@qq.com> Date: 星期二, 14 三月 2023 15:56:52 +0800 Subject: [PATCH] fix --- app/src/main/res/layout/activity_qr_code_pay.xml | 51 ++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 36 insertions(+), 15 deletions(-) diff --git a/app/src/main/res/layout/activity_qr_code_pay.xml b/app/src/main/res/layout/activity_qr_code_pay.xml index 38d889b..4ffd708 100644 --- a/app/src/main/res/layout/activity_qr_code_pay.xml +++ b/app/src/main/res/layout/activity_qr_code_pay.xml @@ -1,30 +1,51 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:background="@color/white" android:layout_height="match_parent"> - + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + android:text="订单金额" + android:id="@+id/tv_1" + android:layout_marginTop="30dp" + android:textColor="@color/textColor" + android:textStyle="bold" + android:textSize="16sp"/> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/tv_money" + app:layout_constraintTop_toBottomOf="@id/tv_1" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + android:layout_marginTop="4dp" + android:textColor="@color/red_price" + android:textSize="32sp" + android:textStyle="bold"/> <LinearLayout android:layout_width="match_parent" - android:layout_marginStart="50dp" - android:layout_marginEnd="50dp" android:orientation="vertical" - android:background="@drawable/bg_white_round_5" + android:background="@drawable/bg_qr_code" android:gravity="center_horizontal" - android:layout_marginTop="13dp" - android:paddingTop="20dp" - android:paddingBottom="20dp" - android:elevation="4dp" - android:layout_height="wrap_content"> + android:layout_marginTop="23dp" + android:layout_marginHorizontal="22dp" + app:layout_constraintTop_toBottomOf="@id/tv_money" + android:layout_height="0dp" + app:layout_constraintDimensionRatio="1:1"> <ImageView android:id="@+id/iv_qr_code" - android:layout_width="140dp" - android:layout_height="140dp" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="35dp" android:src="@mipmap/bg"/> - </LinearLayout> -</LinearLayout> \ No newline at end of file +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file -- Gitblit v1.7.1