Ver código fonte

样式布局修改V1

zhongzhao 1 ano atrás
pai
commit
fb54b045a0

+ 10 - 2
app/src/main/java/com/hw/nativeapp/ui/activity/PaymentMethodActivity.java

@@ -1,9 +1,11 @@
 package com.hw.nativeapp.ui.activity;
+import android.Manifest;
 import android.annotation.SuppressLint;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.PackageManager;
 import android.graphics.Bitmap;
 import android.os.Bundle;
 import android.os.CountDownTimer;
@@ -13,6 +15,8 @@ import android.widget.ImageView;
 import android.widget.TextView;
 import android.widget.Toast;
 
+import androidx.core.app.ActivityCompat;
+
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.google.zxing.qrcode.encoder.QRCode;
@@ -71,7 +75,6 @@ public class PaymentMethodActivity extends BaseActivity  {
         });
         getPageTransmitParams();
         getGotoNativePay();
-        registerReceiver();
         startCountDownTimer();
     }
     @Override
@@ -79,7 +82,11 @@ public class PaymentMethodActivity extends BaseActivity  {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_payment_method);
     }
-
+    @Override
+    protected void onStart() {
+        super.onStart();
+        registerReceiver();
+    }
     @Override
     protected void onStop() {
         super.onStop();
@@ -191,6 +198,7 @@ public class PaymentMethodActivity extends BaseActivity  {
         public void onReceive(Context context, Intent intent)
         {
             String code = intent.getStringExtra("data");
+            Toast.makeText(PaymentMethodActivity.this, "扫码返回数据:" + code, Toast.LENGTH_SHORT).show();
             if (code != null && !code.isEmpty())
             {
                 gotoMicroPay(code);

+ 15 - 4
app/src/main/java/com/hw/nativeapp/ui/activity/SelectInfoActivity.java

@@ -197,10 +197,21 @@ public class SelectInfoActivity extends BaseActivity  {
                     @Override
                     public void onSuccess(JSONObject data) {
                         JSONArray list = data.getJSONArray("list");
-                        performTimeId = list.getJSONObject(0).getString("id");
-                        is_selectTimes.removeAllViews();
-                        addTimes(list);
-                        getSelectRegion();
+                        if (list != null && list.size() > 0) { //  已超过当前时间
+                            btnStatus = true;
+                            select_btn.setBackground(getResources().getDrawable(R.drawable.bg_btn_01));
+                            select_btn.setText("确定");
+
+                            performTimeId = list.getJSONObject(0).getString("id");
+                            is_selectTimes.removeAllViews();
+                            addTimes(list);
+                            getSelectRegion();
+                        } else {
+                            btnStatus = false;
+                            is_selectTimes.removeAllViews();
+                            select_btn.setBackground(getResources().getDrawable(R.drawable.bg_btn_02));
+                            select_btn.setText("当前日期暂无演出场次,请重新选择");
+                        }
                     }
 
                     @Override

+ 52 - 46
app/src/main/res/layout/activity_info_enter.xml

@@ -21,72 +21,78 @@
         app:title="信息录入"
         app:titleColor="@color/white"
         app:titleSize="@dimen/text_50dp_size" />
-    <LinearLayout
+    <ScrollView
+        android:id="@+id/sv"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_gravity="top"
-        android:layout_marginTop="180sp"
-        android:orientation="vertical"
-        android:padding="60sp">
-
+        android:layout_below="@+id/tb_main_bar">
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:layout_marginTop="20sp"
-            android:layout_weight="1"
-            android:background="@drawable/bg_take"
+            android:layout_gravity="top"
+            android:layout_marginTop="60sp"
             android:orientation="vertical"
-            android:padding="30sp">
+            android:padding="60sp">
 
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginTop="100sp"
-                android:gravity="center"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_marginTop="20sp"
+                android:layout_weight="1"
+                android:background="@drawable/bg_take"
                 android:orientation="vertical"
-                android:paddingBottom="60sp">
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:background="@drawable/bg_btn_01"
-                    android:gravity="center"
-                    android:paddingLeft="80dp"
-                    android:paddingRight="80dp"
-                    android:paddingTop="20dp"
-                    android:paddingBottom="20dp"
-                    android:text="请将身份证放置在读卡区!"
-                    android:textColor="@color/white"
-                    android:textFontWeight="800"
-                    android:textSize="@dimen/text_50dp_size" />
-
-                <ImageView
-                    android:layout_width="1000dp"
-                    android:layout_height="650dp"
-                    android:layout_marginTop="120sp"
-                    android:scaleType="fitXY"
-                    android:src="@mipmap/idcard" />
+                android:padding="30sp">
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="60sp"
+                    android:layout_height="match_parent"
+                    android:layout_marginTop="80sp"
                     android:gravity="center"
-                    android:orientation="vertical">
+                    android:orientation="vertical"
+                    android:paddingBottom="60sp">
 
                     <TextView
-                        android:id="@+id/idCard_btn"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_marginTop="10sp"
-                        android:text="忘带身份证?"
-                        android:textColor="@color/login_bk"
-                        android:textSize="@dimen/text_50dp_size" />
+                        android:background="@drawable/bg_btn_01"
+                        android:gravity="center"
+                        android:paddingLeft="80dp"
+                        android:paddingRight="80dp"
+                        android:paddingTop="20dp"
+                        android:paddingBottom="20dp"
+                        android:text="请将身份证放置在读卡区!"
+                        android:textColor="@color/white"
+                        android:textFontWeight="800"
+                        android:textSize="@dimen/text_30dp_size" />
+
+                    <ImageView
+                        android:layout_width="800dp"
+                        android:layout_height="400dp"
+                        android:layout_marginTop="100sp"
+                        android:scaleType="fitXY"
+                        android:src="@mipmap/idcard" />
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="60sp"
+                        android:gravity="center"
+                        android:orientation="vertical">
+
+                        <TextView
+                            android:id="@+id/idCard_btn"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="10sp"
+                            android:text="忘带身份证?"
+                            android:textColor="@color/login_bk"
+                            android:textSize="@dimen/text_30dp_size" />
+                    </LinearLayout>
                 </LinearLayout>
-            </LinearLayout>
 
+            </LinearLayout>
         </LinearLayout>
-    </LinearLayout>
+    </ScrollView>
 
 </RelativeLayout>