Quellcode durchsuchen

提现的UI修改

jixionghui vor 4 Jahren
Ursprung
Commit
5fb946edd5

+ 1 - 1
jixin/src/main/AndroidManifest.xml

@@ -933,7 +933,7 @@
         <activity android:name=".ui.account.ChangePhoneActivity" />
         <activity android:name=".ui.me.EquipmentActivity" />
         <activity android:name=".ui.groupchat.SelectContactsForInterestActivity" />
-        <activity android:name=".ui.me.TiXianActivityNew" />
+        <activity android:name=".ui.me.WalletWithdrawActivity" />
         <activity android:name=".ui.me.bubble.SidaiCenterActivity" />
         <activity android:name=".ui.me.bubble.ZhuanPanActivity" />
         <activity android:name=".ui.me.bubble.HdXiangqingActivity" />

+ 1 - 0
jixin/src/main/java/com/jixin/im/fragment/ExclusiveRedPacketFragment.java

@@ -37,6 +37,7 @@ public class ExclusiveRedPacketFragment extends BaseRedPacketFragment {
 
     public ExclusiveRedPacketFragment(String chatType, String redPacketAcceptorId) {
         super(chatType, redPacketAcceptorId);
+        mRedPacketType = 4;
     }
 
     @Override

+ 1 - 0
jixin/src/main/java/com/jixin/im/fragment/PasswordRedPacketFragment.java

@@ -33,6 +33,7 @@ public class PasswordRedPacketFragment extends BaseRedPacketFragment {
         super.onActivityCreated(savedInstanceState,createView);
         if (createView) {
             setRemarkViewVisible(false);
+            mRedPacketType = 3;
         }
     }
 

+ 21 - 49
jixin/src/main/java/com/jixin/im/ui/me/TiXianActivityNew.java

@@ -42,17 +42,15 @@ import retrofit2.Response;
 /**
  * 提现俊友币
  */
-public class TiXianActivityNew extends BaseActivity implements View.OnClickListener {
+public class WalletWithdrawActivity extends BaseActivity implements View.OnClickListener {
 
     User mUser;
-    private ImageView ivVerifyCode;
-    private ClearEditText etAccount;
-    private ClearEditText etAmount;
-    private ClearEditText etReason;
-    private ClearEditText etVerifyCode;
-    private ClearEditText etPlatform;
-    private ClearEditText etDesc;
-    private TextView tv_all;
+
+
+    private ClearEditText mWithdrawAmountEdt;
+    private TextView mAccountBalanceTv;
+    private TextView mAccountWithdrawTv;
+
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -61,7 +59,7 @@ public class TiXianActivityNew extends BaseActivity implements View.OnClickListe
         if (!LoginHelper.isUserValidation(mUser)) {
             return;
         }
-        setContentView(R.layout.activity_offer_apply_new);
+        setContentView(R.layout.activity_wallet_withdraw);
         initActionBar();
         initView();
     }
@@ -70,54 +68,29 @@ public class TiXianActivityNew extends BaseActivity implements View.OnClickListe
         getSupportActionBar().hide();
         findViewById(R.id.iv_title_left).setOnClickListener(v -> finish());
         TextView tvTitle = (TextView) findViewById(R.id.tv_title_center);
-        tvTitle.setText("申请提现");
+        tvTitle.setText("提现");
         TextView tvRight = (TextView) findViewById(R.id.tv_title_right);
         tvRight.setText("提现记录");
-        tvRight.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                startActivity(new Intent(TiXianActivityNew.this, WithdrawalsRecordActivity.class));
-            }
+        tvRight.setOnClickListener(v -> {
+            startActivity(new Intent(WalletWithdrawActivity.this, WithdrawalsRecordActivity.class));
         });
     }
 
     private void initView() {
+        mWithdrawAmountEdt = findViewById(R.id.edt_withdraw_amount);
+        mAccountBalanceTv = findViewById(R.id.tv_account_balance);
+        mAccountWithdrawTv = findViewById(R.id.tv_account_withdraw);
 
-        ivVerifyCode = findViewById(R.id.ivVerifyCode);
-        ivVerifyCode.setImageBitmap(CodeUtils.getInstance().createBitmap());
-
-        ivVerifyCode.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                ivVerifyCode.setImageBitmap(CodeUtils.getInstance().createBitmap());
-            }
-        });
-
-        etAccount = findViewById(R.id.etAccount);
-        etAmount = findViewById(R.id.etAmount);
-        etReason = findViewById(R.id.etReason);
-        etVerifyCode = findViewById(R.id.etVerifyCode);
-        etPlatform = findViewById(R.id.etPlatform);
-        etDesc = findViewById(R.id.etDesc);
-        tv_all = findViewById(R.id.tv_all);
 //        tv_all.setText(coreManager.getSelf().getVipInfo().getCurrent());
-        findViewById(R.id.btnApply).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                //提交
-                submit();
-            }
+        findViewById(R.id.tv_wallet_withdraw).setOnClickListener(v -> {
+            submit();
         });
         getCoinInfo();
     }
 
     private void submit() {
-        String allMoney = tv_all.getText().toString().trim();
-//        if("0.0".equals(allMoney) || 0 == Long.parseLong(allMoney)){
-//            ToastUtil.showToast(this, "您当前余额为0");
-//            return;
-//        }
-        String amount = etAmount.getText().toString().trim();
+
+        String amount = mWithdrawAmountEdt.getText().toString().trim();
         if (TextUtils.isEmpty(amount)) {
             ToastUtil.showToast(this, "请输入提现金额");
             return;
@@ -127,7 +100,6 @@ public class TiXianActivityNew extends BaseActivity implements View.OnClickListe
         params.put("amount", amount);
         params.put("userId", coreManager.getSelf().getUserId());
         params.put("userName", coreManager.getSelf().getNickName());
-        params.put("remark", etDesc.getText().toString().trim());
         HttpUtils.post().url(AppConfig.API_ADD_WITHDRAWL)
                 .params(params)
                 .build()
@@ -137,7 +109,7 @@ public class TiXianActivityNew extends BaseActivity implements View.OnClickListe
                     public void onResponse(ObjectResult<Void> result) {
                         DialogHelper.dismissProgressDialog();
                         if (Result.checkSuccess(getApplicationContext(), result)) {
-                            TiXianDialog.Builder builder = new TiXianDialog.Builder(TiXianActivityNew.this);
+                            TiXianDialog.Builder builder = new TiXianDialog.Builder(WalletWithdrawActivity.this);
                             builder.create().show();
 //                            ToastUtil.showLongToast(TiXianActivityNew.this, "提交成功");
 //                            finish();
@@ -147,7 +119,7 @@ public class TiXianActivityNew extends BaseActivity implements View.OnClickListe
                     @Override
                     public void onError(Call call, Exception e) {
                         DialogHelper.dismissProgressDialog();
-                        ToastUtil.showLongToast(TiXianActivityNew.this, "提交失败,请重试");
+                        ToastUtil.showLongToast(WalletWithdrawActivity.this, "提交失败,请重试");
                     }
                 });
     }
@@ -174,7 +146,7 @@ public class TiXianActivityNew extends BaseActivity implements View.OnClickListe
                     if (jsonObject.getInt("resultCode") == 1) {
                         JSONObject js = jsonObject.getJSONObject("data");
                         String coin = js.getString("coin");
-                        tv_all.setText(""+coin);
+
                     } else {
 
                     }

+ 2 - 6
jixin/src/main/java/com/jixin/im/ui/me/redpacket/JunYouWalletActivity.java

@@ -5,10 +5,8 @@ import android.os.Bundle;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
-import android.widget.ImageView;
 import android.widget.TextView;
 
-import com.j256.ormlite.stmt.query.In;
 import com.jixin.RetrofitUtil.RetrofitUtils;
 import com.jixin.im.MyApplication;
 import com.jixin.im.R;
@@ -16,12 +14,10 @@ import com.jixin.im.bean.event.EventNotifyByTag;
 import com.jixin.im.bean.redpacket.Balance;
 import com.jixin.im.helper.LoginSecureHelper;
 import com.jixin.im.ui.base.BaseActivity;
-import com.jixin.im.ui.me.TiXianActivityNew;
-import com.jixin.im.ui.tool.ButtonColorChange;
+import com.jixin.im.ui.me.WalletWithdrawActivity;
 import com.jixin.im.util.Constants;
 import com.jixin.im.util.EventBusHelper;
 import com.jixin.im.util.PreferenceUtils;
-import com.jixin.im.util.SkinUtils;
 import com.jixin.im.util.ToastUtil;
 import com.jixin.im.view.SkinTextView;
 import com.xuan.xuanhttplibrary.okhttp.HttpUtils;
@@ -129,7 +125,7 @@ public class JunYouWalletActivity extends BaseActivity {
 
         mWithdrawTv.setOnClickListener(v -> {
             //提现
-            startActivity(new Intent(JunYouWalletActivity.this, TiXianActivityNew.class));
+            startActivity(new Intent(JunYouWalletActivity.this, WalletWithdrawActivity.class));
         });
 
         tvBindAlipay = findViewById(R.id.tv_bind_alipay);

+ 6 - 0
jixin/src/main/res/drawable/shape_withdraw_bg_white_radius_9.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners android:radius="9dp"/>
+    <solid android:color="@color/white"/>
+
+</shape>

+ 0 - 225
jixin/src/main/res/layout/activity_offer_apply_new.xml

@@ -1,225 +0,0 @@
-<com.jixin.im.view.MyLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:background="@color/normal_bg"
-    android:fitsSystemWindows="true"
-    android:focusable="true"
-    android:focusableInTouchMode="true"
-    android:orientation="vertical">
-
-    <include layout="@layout/a_view_actionbar" />
-
-    <ScrollView
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:background="@color/white"
-                android:gravity="center_vertical"
-                android:minHeight="50dp"
-                android:paddingLeft="20dp"
-                android:paddingRight="9dp">
-
-                <TextView
-                    style="@style/IMTbleLine_TextKey"
-                    android:drawablePadding="5dp"
-                    android:text="俊友币余额:" />
-
-                <TextView
-                    android:id="@+id/tv_all"
-                    android:layout_width="0dp"
-                    android:layout_weight="1"
-                    android:layout_height="wrap_content"
-                    android:gravity="right"
-                    tools:text="200"
-                    android:singleLine="true"
-                    android:paddingRight="@dimen/dp15" />
-            </LinearLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:background="@drawable/set_list_up_bg"
-                android:minHeight="50dp"
-                android:paddingLeft="20dp"
-                android:paddingRight="9dp">
-
-                <TextView
-                    android:id="@+id/tvPlatform"
-                    style="@style/IMTbleLine_TextKey"
-                    android:drawablePadding="5dp"
-                    android:text="平台名称:" />
-
-                <com.jixin.im.view.ClearEditText
-                    android:id="@+id/etPlatform"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toRightOf="@+id/tvPlatform"
-                    android:background="@null"
-                    android:hint="请输入平台名称"
-                    android:inputType="text"
-                    android:maxLength="16"
-                    android:paddingRight="@dimen/dp15" />
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:background="@drawable/set_list_up_bg"
-                android:minHeight="50dp"
-                android:paddingLeft="20dp"
-                android:paddingRight="9dp">
-
-                <TextView
-                    android:id="@+id/tvAccount"
-                    style="@style/IMTbleLine_TextKey"
-                    android:drawablePadding="5dp"
-                    android:text="会员账号:" />
-
-                <com.jixin.im.view.ClearEditText
-                    android:id="@+id/etAccount"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toRightOf="@+id/tvAccount"
-                    android:background="@null"
-                    android:hint="请输入会员账号"
-                    android:inputType="text"
-                    android:maxLength="16"
-                    android:paddingRight="@dimen/dp15" />
-            </RelativeLayout>
-
-
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:background="@drawable/set_list_up_bg"
-                android:minHeight="50dp"
-                android:paddingLeft="20dp"
-                android:paddingRight="9dp">
-
-                <TextView
-                    android:id="@+id/tvAmount"
-                    style="@style/IMTbleLine_TextKey"
-                    android:drawablePadding="5dp"
-                    android:text="提现金额:" />
-
-                <com.jixin.im.view.ClearEditText
-                    android:id="@+id/etAmount"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toRightOf="@+id/tvAmount"
-                    android:background="@null"
-                    android:hint="请输入提现金额"
-                    android:digits="0123456789."
-                    android:inputType="text"
-                    android:maxLength="16"
-                    android:paddingRight="@dimen/dp15" />
-
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:background="@drawable/set_list_up_bg"
-                android:minHeight="50dp"
-                android:paddingLeft="20dp"
-                android:paddingRight="9dp">
-
-                <TextView
-                    android:id="@+id/tvReason"
-                    style="@style/IMTbleLine_TextKey"
-                    android:drawablePadding="5dp"
-                    android:text="提现理由:" />
-
-                <com.jixin.im.view.ClearEditText
-                    android:id="@+id/etReason"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toRightOf="@+id/tvReason"
-                    android:background="@null"
-                    android:hint="请输入提现理由"
-                    android:inputType="text"
-                    android:maxLength="16"
-                    android:paddingRight="@dimen/dp15" />
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:background="@drawable/set_list_up_bg"
-                android:minHeight="50dp"
-                android:paddingLeft="20dp"
-                android:paddingRight="9dp">
-
-                <TextView
-                    android:id="@+id/tvDesc"
-                    style="@style/IMTbleLine_TextKey"
-                    android:drawablePadding="5dp"
-                    android:text="描述:" />
-
-                <com.jixin.im.view.ClearEditText
-                    android:id="@+id/etDesc"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toRightOf="@+id/tvDesc"
-                    android:background="@null"
-                    android:hint="请输入描述"
-                    android:inputType="text"
-                    android:maxLength="16"
-                    android:paddingRight="@dimen/dp15" />
-            </RelativeLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:background="@drawable/set_list_up_bg"
-                android:gravity="center_vertical"
-                android:minHeight="50dp"
-                android:orientation="horizontal"
-                android:paddingLeft="20dp"
-                android:paddingRight="9dp">
-
-                <TextView
-                    android:id="@+id/tvVerifyCode"
-                    style="@style/IMTbleLine_TextKey"
-                    android:drawablePadding="5dp"
-                    android:text="验证码:" />
-
-                <com.jixin.im.view.ClearEditText
-                    android:id="@+id/etVerifyCode"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_width="wrap_content"
-                    android:layout_weight="1"
-                    android:background="@null"
-                    android:hint="请输入验证码"
-                    android:inputType="text"
-                    android:maxLength="4"
-                    android:paddingRight="@dimen/dp15" />
-
-                <ImageView
-                    android:id="@+id/ivVerifyCode"
-                    android:layout_width="100dp"
-                    android:layout_height="50dp"
-                    android:gravity="right" />
-
-            </LinearLayout>
-
-            <Button
-                android:id="@+id/btnApply"
-                style="@style/BossGreenBtn"
-                android:text="提  交" />
-
-        </LinearLayout>
-
-    </ScrollView>
-
-</com.jixin.im.view.MyLinearLayout>

+ 116 - 0
jixin/src/main/res/layout/activity_wallet_withdraw.xml

@@ -0,0 +1,116 @@
+<LinearLayout 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:orientation="vertical">
+
+    <include layout="@layout/a_view_actionbar" />
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="#ebebeb">
+
+        <androidx.constraintlayout.widget.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="15dp"
+            android:background="@drawable/shape_withdraw_bg_white_radius_9"
+            android:paddingBottom="40dp">
+
+            <TextView
+                android:id="@+id/tv_yuan"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="14dp"
+                android:layout_marginTop="20dp"
+                android:text="@string/withdraw_amount_yuan"
+                android:textColor="#333333"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <TextView
+                android:id="@+id/tv_symbol_rmb"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="14dp"
+                android:layout_marginTop="10dp"
+                android:text="¥"
+                android:textColor="#333333"
+                android:textSize="35dp"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/tv_yuan" />
+
+            <com.jixin.im.view.ClearEditText
+                android:id="@+id/edt_withdraw_amount"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="10dp"
+                android:layout_marginEnd="10dp"
+                android:textSize="20sp"
+                android:background="@color/transparent"
+                android:gravity="bottom|end"
+                android:layout_marginBottom="4dp"
+                app:layout_constraintBottom_toBottomOf="@+id/tv_symbol_rmb"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toEndOf="@+id/tv_symbol_rmb"
+           />
+
+            <View
+                android:id="@+id/view_line_withdraw"
+                android:layout_width="match_parent"
+                android:layout_height="1px"
+                android:layout_marginTop="4dp"
+                app:layout_constraintTop_toBottomOf="@+id/tv_symbol_rmb" />
+
+            <TextView
+                android:id="@+id/tv_account_withdraw"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="10dp"
+                android:drawableRight="@mipmap/icon_alipay"
+                android:drawablePadding="4dp"
+                android:gravity="center_vertical"
+                android:text="@string/account_withdraw"
+                android:textSize="@dimen/sp_15_text_size"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/view_line_withdraw" />
+
+
+            <TextView
+                android:id="@+id/tv_account_balance"
+                android:layout_width="wrap_content"
+
+                android:layout_height="wrap_content"
+                android:layout_marginStart="10dp"
+                android:layout_marginTop="4dp"
+                android:drawablePadding="4dp"
+                android:gravity="center_vertical"
+                android:text="@string/account_balance"
+                android:textSize="@dimen/sp_15_text_size"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/tv_account_withdraw" />
+
+            <TextView
+                android:id="@+id/tv_wallet_withdraw"
+                android:layout_width="186dp"
+
+                android:layout_height="32dp"
+                android:layout_marginTop="100dp"
+                android:background="@drawable/shape_withdraw_bg_gray_radius_16"
+                android:gravity="center"
+
+
+                android:text="@string/withdraw"
+                android:textColor="#2A86FF"
+                android:textSize="@dimen/one_level_title"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/tv_account_balance" />
+
+        </androidx.constraintlayout.widget.ConstraintLayout>
+
+    </FrameLayout>
+
+</LinearLayout>

BIN
jixin/src/main/res/mipmap-xhdpi/icon_alipay.png


BIN
jixin/src/main/res/mipmap-xxhdpi/icon_alipay.png


BIN
jixin/src/main/res/mipmap-xxxhdpi/icon_alipay.png


+ 3 - 0
jixin/src/main/res/values/strings.xml

@@ -2361,6 +2361,9 @@
     <string name="bind_alipay">绑定支付宝</string>
     <string name="not_set">未设置</string>
     <string name="have_set">已设置</string>
+    <string name="withdraw_amount_yuan">提现金额(元)</string>
+    <string name="account_withdraw">到账账户:%1$1s</string>
+    <string name="account_balance">余额:¥%1$1s</string>
 
     <!-- 俊友钱包 end -->
     <string-array name="icons">