android:launchMode="singleTop" | android:launchMode="singleTop" | ||||
android:screenOrientation="portrait" /> | android:screenOrientation="portrait" /> | ||||
<!--申请退款--> | <!--申请退款--> | ||||
<activity android:name=".project.ui.activity.order.ApplyReturnMoneyActivity" | |||||
<activity android:name=".project.ui.activity.after.ApplyReturnMoneyActivity" | |||||
android:launchMode="singleTop" | |||||
android:screenOrientation="portrait" /> | |||||
<!--撤销圈存--> | |||||
<activity android:name=".project.ui.activity.after.UndoLoopActivity" | |||||
android:launchMode="singleTop" | android:launchMode="singleTop" | ||||
android:screenOrientation="portrait" /> | android:screenOrientation="portrait" /> | ||||
</application> | </application> |
package com.huntersun.vkyes.etcopencard.project.ui.activity.order; | |||||
package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | |||||
import android.view.View; | import android.view.View; | ||||
import com.blankj.utilcode.util.LogUtils; | import com.blankj.utilcode.util.LogUtils; | ||||
import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyReturnMoneyBinding; | import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyReturnMoneyBinding; | ||||
import com.huntersun.vkyes.etcopencard.project.api.bean.ReasonBean; | import com.huntersun.vkyes.etcopencard.project.api.bean.ReasonBean; | ||||
import com.huntersun.vkyes.etcopencard.project.api.bean.RechargeBean; | |||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.TopEntrapmentActivity; | |||||
import com.huntersun.vkyes.etcopencard.project.ui.adapter.RechargeAdapter; | |||||
import com.huntersun.vkyes.etcopencard.project.ui.adapter.ReturnReasonAdapter; | import com.huntersun.vkyes.etcopencard.project.ui.adapter.ReturnReasonAdapter; | ||||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | ||||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | ||||
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | ||||
import com.huntersun.vkyes.etcopencard.project.tool.EquipmentAndTools; | import com.huntersun.vkyes.etcopencard.project.tool.EquipmentAndTools; | ||||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.ApplyReturnMoneyActivity; | |||||
import com.huntersun.vkyes.etcopencard.project.ui.adapter.RechargeAdapter; | import com.huntersun.vkyes.etcopencard.project.ui.adapter.RechargeAdapter; | ||||
import com.huntersun.vkyes.etcopencard.project.ui.adapter.interfaces.INRechargeChoose; | import com.huntersun.vkyes.etcopencard.project.ui.adapter.interfaces.INRechargeChoose; | ||||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | ||||
//TODO 测试 | //TODO 测试 | ||||
//jumpToPage(RechargeRecordActivity.class); | //jumpToPage(RechargeRecordActivity.class); | ||||
jumpToPage(ApplyReturnMoneyActivity.class); | |||||
//jumpToPage(ApplyReturnMoneyActivity.class); | |||||
jumpToPage(UndoLoopActivity.class); | |||||
// 确认充值对话框 | // 确认充值对话框 | ||||
/*new RechargeConfirmDialog.Builder(TopEntrapmentActivity.this) | /*new RechargeConfirmDialog.Builder(TopEntrapmentActivity.this) |
package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | |||||
import android.text.TextUtils; | |||||
import android.view.View; | |||||
import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyReturnMoneyBinding; | |||||
import com.huntersun.vkyes.etcopencard.databinding.ActivityUndoLoopBinding; | |||||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||||
/** | |||||
* Date :2023-03-13 | |||||
* Description:撤销圈存 | |||||
*/ | |||||
public class UndoLoopActivity extends AppActivity { | |||||
private ActivityUndoLoopBinding binding; | |||||
@Override | |||||
protected View getLayoutView() { | |||||
binding = ActivityUndoLoopBinding.inflate(getLayoutInflater()); | |||||
return binding.getRoot(); | |||||
} | |||||
@Override | |||||
protected void initView() { | |||||
binding.btnConfirm.setOnClickListener(new View.OnClickListener() { | |||||
@Override | |||||
public void onClick(View view) { | |||||
if(FunHelper.isEmpty(FunHelper.getText(binding.etReason))){ | |||||
toast("请输入撤销原因"); | |||||
return; | |||||
} | |||||
toast(FunHelper.getText(binding.etReason)); | |||||
} | |||||
}); | |||||
} | |||||
@Override | |||||
protected void initData() { | |||||
} | |||||
} |
package com.huntersun.vkyes.etcopencard.project.utils; | package com.huntersun.vkyes.etcopencard.project.utils; | ||||
import android.text.SpannableString; | |||||
import android.text.Spanned; | |||||
import android.text.style.ForegroundColorSpan; | |||||
import android.widget.EditText; | |||||
import android.widget.TextView; | |||||
import java.util.List; | |||||
import java.util.regex.Matcher; | |||||
import java.util.regex.Pattern; | |||||
/** | /** | ||||
* Date :2023-03-12 | * Date :2023-03-12 | ||||
* Description:页面通用方法 | * Description:页面通用方法 | ||||
return ""; | return ""; | ||||
} | } | ||||
} | } | ||||
/* | |||||
* 判断集合为空 | |||||
* | |||||
* @param list | |||||
* @return | |||||
*/ | |||||
public static boolean isEmpty(List list) { | |||||
return list == null || list.size() == 0; | |||||
} | |||||
/* | |||||
* 判断集合不为空 | |||||
* | |||||
* @param list | |||||
* @return | |||||
*/ | |||||
public static boolean notEmpty(List list) { | |||||
return list != null && list.size() > 0; | |||||
} | |||||
/* | |||||
* 集合不为空但是无数据 | |||||
* | |||||
* @param list | |||||
* @return | |||||
*/ | |||||
public static boolean isSizeZero(List list) { | |||||
return list != null && list.size() == 0; | |||||
} | |||||
/* | |||||
* 字符串为空 | |||||
* | |||||
* @param str | |||||
* @return | |||||
*/ | |||||
public static boolean isEmpty(String str) { | |||||
if (str == null || str.length() == 0 | |||||
|| str.equalsIgnoreCase("null") | |||||
|| str.isEmpty() || str.equals("")) { | |||||
return true; | |||||
} else { | |||||
return false; | |||||
} | |||||
} | |||||
/* | |||||
* 字符串为空 | |||||
* | |||||
* @param str | |||||
* @return | |||||
*/ | |||||
public static boolean isWithZeroEmpty(String str) { | |||||
if (str == null || str.length() == 0 | |||||
|| str.equalsIgnoreCase("null") | |||||
|| str.isEmpty() || str.equals("") || str.equals("0")) { | |||||
return true; | |||||
} else { | |||||
return false; | |||||
} | |||||
} | |||||
/* | |||||
* 手机号中间4位替换为* | |||||
* | |||||
* @param phone | |||||
* @return | |||||
*/ | |||||
public static String midleReplaceStar(String phone){ | |||||
String result=null; | |||||
if (!isEmpty(phone)){ | |||||
if (phone.length()<7){ | |||||
result=phone; | |||||
}else{ | |||||
String start = phone.substring(0,3); | |||||
String end = phone.substring(phone.length()-4,phone.length()); | |||||
StringBuilder sb=new StringBuilder(); | |||||
sb.append(start).append("****").append(end); | |||||
result=sb.toString(); | |||||
} | |||||
} | |||||
return result; | |||||
} | |||||
/* | |||||
* 获取文字信息 | |||||
* | |||||
* @param editText | |||||
* @return | |||||
*/ | |||||
public static String getText(EditText editText){ | |||||
return editText.getText().toString().trim(); | |||||
} | |||||
/* | |||||
* 获取文字信息 | |||||
* | |||||
* @param textView | |||||
* @return | |||||
*/ | |||||
public static String getText(TextView textView){ | |||||
return textView.getText().toString().trim(); | |||||
} | |||||
/* | |||||
* 搜索关键字变色 | |||||
* | |||||
* @param color | |||||
* @param text | |||||
* @param keyword | |||||
* @return | |||||
*/ | |||||
public static SpannableString matcherSearchTitle(int color, String text, String keyword) { | |||||
String string = text.toLowerCase(); | |||||
String key = keyword.toLowerCase(); | |||||
Pattern pattern = Pattern.compile(key); | |||||
Matcher matcher = pattern.matcher(string); | |||||
SpannableString ss = new SpannableString(text); | |||||
while (matcher.find()) { | |||||
int start = matcher.start(); | |||||
int end = matcher.end(); | |||||
ss.setSpan(new ForegroundColorSpan(color), start, end, | |||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); | |||||
} | |||||
return ss; | |||||
} | |||||
} | } |
android:layout_gravity="center" | android:layout_gravity="center" | ||||
android:layout_marginTop="@dimen/dp_200" | android:layout_marginTop="@dimen/dp_200" | ||||
android:text="提交申请" | android:text="提交申请" | ||||
android:textSize="@dimen/sp_15" /> | |||||
android:textSize="@dimen/sp_14" /> | |||||
</LinearLayout> | </LinearLayout> | ||||
</androidx.core.widget.NestedScrollView> | </androidx.core.widget.NestedScrollView> |
<?xml version="1.0" encoding="utf-8"?> | |||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||||
style="@style/MatchMatch.Vertical" | |||||
android:background="@color/background_color"> | |||||
<com.hjq.bar.TitleBar | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
android:background="@color/white" | |||||
app:leftIcon="@mipmap/back_black" | |||||
app:lineVisible="false" | |||||
app:title="撤销圈存" | |||||
app:titleColor="@color/black" /> | |||||
<androidx.core.widget.NestedScrollView style="@style/MatchWrap"> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Vertical" | |||||
android:paddingHorizontal="@dimen/dp_15" | |||||
android:paddingVertical="@dimen/dp_15"> | |||||
<TextView | |||||
style="@style/MatchWrap" | |||||
android:text="基础信息" | |||||
android:textColor="@color/color_333333" | |||||
android:textSize="@dimen/sp_16" | |||||
android:textStyle="bold" /> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Vertical" | |||||
android:background="@drawable/bg_white_radius" | |||||
android:padding="@dimen/dp_15" | |||||
android:layout_marginTop="@dimen/dp_10"> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Horizontal"> | |||||
<TextView | |||||
style="@style/black02TextStyle14" | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1" | |||||
android:text="圈存单号" /> | |||||
<TextView | |||||
android:id="@+id/tv_number" | |||||
style="@style/blackTextStyle14" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:text="20221023654123" /> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Horizontal" | |||||
android:layout_marginTop="@dimen/dp_12"> | |||||
<TextView | |||||
style="@style/black02TextStyle14" | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1" | |||||
android:text="圈存金额" /> | |||||
<TextView | |||||
android:id="@+id/tv_money" | |||||
style="@style/blackTextStyle14" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/color_FF8000" | |||||
android:text="¥1000.00" /> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Horizontal" | |||||
android:layout_marginTop="@dimen/dp_12"> | |||||
<TextView | |||||
style="@style/black02TextStyle14" | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1" | |||||
android:text="圈存状态" /> | |||||
<TextView | |||||
android:id="@+id/tv_status" | |||||
style="@style/blackTextStyle14" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:text="半条流水" /> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Horizontal" | |||||
android:layout_marginTop="@dimen/dp_12"> | |||||
<TextView | |||||
style="@style/black02TextStyle14" | |||||
android:layout_width="0dp" | |||||
android:layout_height="wrap_content" | |||||
android:layout_weight="1" | |||||
android:text="当前卡内余额读取" /> | |||||
<TextView | |||||
android:id="@+id/tv_balance" | |||||
style="@style/blackTextStyle14" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/color_FF8000" | |||||
android:text="¥99.00 元" /> | |||||
</LinearLayout> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Horizontal" | |||||
android:layout_marginTop="@dimen/dp_15" | |||||
android:gravity="center"> | |||||
<TextView | |||||
style="@style/WrapWrap" | |||||
android:text="*" | |||||
android:textColor="@color/red" | |||||
android:textSize="@dimen/sp_16" /> | |||||
<TextView | |||||
style="@style/MatchWrap" | |||||
android:text="撤销原因" | |||||
android:textColor="@color/color_333333" | |||||
android:textSize="@dimen/sp_16" | |||||
android:textStyle="bold" /> | |||||
</LinearLayout> | |||||
<LinearLayout | |||||
style="@style/MatchWrap.Vertical" | |||||
android:background="@drawable/bg_white_radius" | |||||
android:padding="@dimen/dp_15" | |||||
android:layout_marginTop="@dimen/dp_10"> | |||||
<EditText | |||||
android:id="@+id/etReason" | |||||
style="@style/MatchWrap" | |||||
android:background="@null" | |||||
android:minHeight="@dimen/dp_80" | |||||
android:gravity="top" | |||||
android:hint="请输入撤销原因" | |||||
android:textColor="@color/color_333333" | |||||
android:textColorHint="#B3B3B3" | |||||
android:textSize="@dimen/sp_14" /> | |||||
</LinearLayout> | |||||
<Button | |||||
android:id="@+id/btnConfirm" | |||||
style="@style/BtnShortStyle" | |||||
android:layout_width="@dimen/dp_150" | |||||
android:layout_height="@dimen/dp_40" | |||||
android:layout_gravity="center" | |||||
android:layout_marginTop="@dimen/dp_200" | |||||
android:text="提交申请" | |||||
android:textSize="@dimen/sp_14" /> | |||||
</LinearLayout> | |||||
</androidx.core.widget.NestedScrollView> | |||||
</LinearLayout> |