Sfoglia il codice sorgente

feat: 圈存第一步、第二步及弹窗

master
huting 2 anni fa
parent
commit
783965252e
39 ha cambiato i file con 1731 aggiunte e 8 eliminazioni
  1. BIN
      app/src/main/assets/fonts/beabas.ttf
  2. 2
    2
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/MyRetrofit.java
  3. 15
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/bean/RechargeBean.java
  4. 6
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/dialog/RechargeConfirmDialog.java
  5. 2
    2
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/IdentityInformationUploadActivity.java
  6. 2
    3
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/VehicleInformationActivity.java
  7. 6
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/RechargeRecordActivity.java
  8. 43
    1
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/TopEntrapmentActivity.java
  9. 1
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/TopUpActivity.java
  10. 31
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/order/AuditingActivity.java
  11. 86
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/adapter/RechargeAdapter.java
  12. 11
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/adapter/interfaces/INRechargeChoose.java
  13. 256
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/AddViewHolder.java
  14. 75
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/CommonAdapter.java
  15. 365
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/CommonViewHolder.java
  16. 106
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/GlideLoadImageUtils.java
  17. 30
    0
      app/src/main/java/com/huntersun/vkyes/etcopencard/src/widget/NoScrollGridView.java
  18. 5
    0
      app/src/main/res/drawable-v1/bg_green_radius.xml
  19. 5
    0
      app/src/main/res/drawable-v1/bg_grey_radius.xml
  20. 5
    0
      app/src/main/res/drawable-v1/bg_white_radius.xml
  21. 14
    0
      app/src/main/res/drawable-v1/border_gray.xml
  22. 12
    0
      app/src/main/res/drawable/btn_common_disable.xml
  23. 17
    0
      app/src/main/res/drawable/btn_common_pressed.xml
  24. 6
    0
      app/src/main/res/drawable/btn_common_selector.xml
  25. 35
    0
      app/src/main/res/layout-v3/item_gv_recharge.xml
  26. 50
    0
      app/src/main/res/layout/activity_auditing.xml
  27. 218
    0
      app/src/main/res/layout/activity_qc_step1.xml
  28. 121
    0
      app/src/main/res/layout/activity_qc_step2.xml
  29. 6
    0
      app/src/main/res/layout/activity_recharge_record.xml
  30. 20
    0
      app/src/main/res/layout/activity_to_entrapment.xml
  31. 6
    0
      app/src/main/res/layout/dialog_recharge_confirm.xml
  32. BIN
      app/src/main/res/mipmap-xhdpi/back_black.png
  33. BIN
      app/src/main/res/mipmap-xhdpi/bg_earmark.png
  34. BIN
      app/src/main/res/mipmap-xhdpi/icon_entrapment.png
  35. BIN
      app/src/main/res/mipmap-xhdpi/icon_right_black.png
  36. 3
    0
      app/src/main/res/values/colors.xml
  37. 18
    0
      app/src/main/res/values/styles.xml
  38. 149
    0
      app/src/main/res/values/styles_base.xml
  39. 4
    0
      library/base/src/main/res/values/colors.xml

BIN
app/src/main/assets/fonts/beabas.ttf Vedi File


+ 2
- 2
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/MyRetrofit.java Vedi File

@@ -40,9 +40,9 @@ import retrofit2.converter.scalars.ScalarsConverterFactory;
public class MyRetrofit {
//是否设置缓存
private static final boolean Cache = false;
private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/";
// private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/";
// private final String BaseUrl = "http://58.16.58.161:19002/ifzt/api/";
// private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/";
private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/";
private final String appId = "admin001";
private final String IFCODE = "";
private final String bizContent = "";

+ 15
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/bean/RechargeBean.java Vedi File

@@ -0,0 +1,15 @@
package com.huntersun.vkyes.etcopencard.project.api.bean;

/**
* Date :2023-03-13
* Description:充值金额
*/
public class RechargeBean {
public String payMoney;//充值金额
public boolean isSelected = false; //是否选中

public RechargeBean(String payMoney) {
this.payMoney = payMoney;
this.isSelected = false;
}
}

+ 6
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/dialog/RechargeConfirmDialog.java Vedi File

@@ -0,0 +1,6 @@
package com.huntersun.vkyes.etcopencard.project.dialog;
/**
* Date :2023-03-13
* Description:
*/ class RechargeConfirmDialog {
}

+ 2
- 2
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/IdentityInformationUploadActivity.java Vedi File

@@ -182,10 +182,10 @@ public class IdentityInformationUploadActivity extends AppActivity {
return;
}

if(!binding.text3.getText().toString().equals(identifyIdCard)){
/*if(!binding.text3.getText().toString().equals(identifyIdCard)){
toast("输入身份证号与上传的身份证信息不匹配,请重新输入或上传!");
return;
}
}*/

FatherBean<SendTheVerificationCodeBean> fatherBean = new FatherBean<>();
fatherBean.bizContent = new SendTheVerificationCodeBean();

+ 2
- 3
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/VehicleInformationActivity.java Vedi File

@@ -114,13 +114,12 @@ public class VehicleInformationActivity extends AppActivity {
}
}

//TODO 测试 update1
/* if(!inputVehiclePlate.equals(binding.text1.getText().toString())){
if(!inputVehiclePlate.equals(binding.text1.getText().toString())){
toast("输入的车牌与上传的行驶证车牌不一致,请重新输入或者上传!");
return;
}

if(!binding.text1.getText().toString().equals(getIntent().getStringExtra("vehiclePlate"))){
/*if(!binding.text1.getText().toString().equals(getIntent().getStringExtra("vehiclePlate"))){
toast("申办车牌与识别出来的车牌不一致,请重新上传申办车牌的行驶证!");
return;
}*/

+ 6
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/RechargeRecordActivity.java Vedi File

@@ -0,0 +1,6 @@
package com.huntersun.vkyes.etcopencard.project.ui.activity.after;
/**
* Date :2023-03-13
* Description:
*/ class RechargeRecordActivity {
}

+ 43
- 1
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/TopEntrapmentActivity.java Vedi File

@@ -17,23 +17,36 @@ import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit;
import com.huntersun.vkyes.etcopencard.project.api.RequestParameters;
import com.huntersun.vkyes.etcopencard.project.api.Result;
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode;
import com.huntersun.vkyes.etcopencard.project.api.bean.RechargeBean;
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean;
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean;
import com.huntersun.vkyes.etcopencard.project.tool.EquipmentAndTools;
import com.huntersun.vkyes.etcopencard.project.ui.adapter.RechargeAdapter;
import com.huntersun.vkyes.etcopencard.project.ui.adapter.interfaces.INRechargeChoose;
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick;
import com.huntersun.vkyes.etcopencard.src.app.AppActivity;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
* 圈存确认
* @author admin
*/
public class TopEntrapmentActivity extends AppActivity {
public class TopEntrapmentActivity extends AppActivity implements INRechargeChoose{
private ActivityToEntrapmentBinding binding;
private double licensePlateColor = 30.0;
private String cardId, vehiclePlate, vehiclePlateColorStr, name, command;
private ResultBean.BizContent rechargeOrder; //充值单

//模板适配器emo
private RechargeAdapter rechargeMoneyAdapter;
//选择模板事件回调
private INRechargeChoose inRechargeChoose;
//选择的充值金额
private RechargeBean moneyInfo;

@Override
protected View getLayoutView() {
binding = ActivityToEntrapmentBinding.inflate(getLayoutInflater());
@@ -42,6 +55,9 @@ public class TopEntrapmentActivity extends AppActivity {

@Override
protected void initView() {
inRechargeChoose = this;
rechargeMoneyAdapter = new RechargeAdapter(TopEntrapmentActivity.this,inRechargeChoose);

setTitle("圈存确认");
cardId = getIntent().getStringExtra("cardId");
vehiclePlate = getIntent().getStringExtra("vehiclePlate");
@@ -90,6 +106,8 @@ public class TopEntrapmentActivity extends AppActivity {

@Override
protected void initData() {
setRechargeMoneyList();

//调用圈存检测->充值检测->充值申请->跳转支付页面->获取支付二维码->调用支付检测->(成功)开启蓝牙模块->圈存检测->圈存申请->圈存确认
//调用圈存检测->充值检测->(成功)开启蓝牙模块->(执行指令)圈存检测->圈存申请->圈存确认
//调用圈存检测->圈存修复->回调圈存修复
@@ -407,4 +425,28 @@ public class TopEntrapmentActivity extends AppActivity {
}
}

/**
* 设置充值金额
*/
private void setRechargeMoneyList () {
List<RechargeBean> list = new ArrayList<>();
list.add(new RechargeBean("100"));
list.add(new RechargeBean("200"));
list.add(new RechargeBean("500"));
list.add(new RechargeBean("1000"));

rechargeMoneyAdapter.setmDatas(list);
binding.gvMoney.setAdapter(rechargeMoneyAdapter);
rechargeMoneyAdapter.notifyDataSetChanged();
}

/**
* 选择充值金额回调
* @param rechargeBean
*/
@Override
public void chooseRechargeMoney(RechargeBean rechargeBean) {
this.moneyInfo = rechargeBean;
toast(moneyInfo.payMoney);
}
}

+ 1
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/TopUpActivity.java Vedi File

@@ -27,6 +27,7 @@ import com.parkingwang.keyboard.PopupKeyboard;
import java.util.regex.Pattern;

/**
* 储值卡圈存
* @author admin
*/
public class TopUpActivity extends AppActivity {

+ 31
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/order/AuditingActivity.java Vedi File

@@ -0,0 +1,31 @@
package com.huntersun.vkyes.etcopencard.project.ui.activity.order;

import android.view.View;

import com.huntersun.vkyes.etcopencard.databinding.ActivityAuditingBinding;
import com.huntersun.vkyes.etcopencard.databinding.ActivityContractBinding;
import com.huntersun.vkyes.etcopencard.src.app.AppActivity;

/**
* Date :2023-03-13
* Description:审核
*/
public class AuditingActivity extends AppActivity {
private ActivityAuditingBinding binding;

@Override
protected View getLayoutView() {
binding = ActivityAuditingBinding.inflate(getLayoutInflater());
return binding.getRoot();
}

@Override
protected void initView() {

}

@Override
protected void initData() {

}
}

+ 86
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/adapter/RechargeAdapter.java Vedi File

@@ -0,0 +1,86 @@
package com.huntersun.vkyes.etcopencard.project.ui.adapter;

import android.content.Context;
import android.graphics.Typeface;
import android.view.View;
import android.widget.TextView;

import com.huntersun.vkyes.etcopencard.R;
import com.huntersun.vkyes.etcopencard.project.api.bean.RechargeBean;
import com.huntersun.vkyes.etcopencard.project.ui.adapter.interfaces.INRechargeChoose;
import com.huntersun.vkyes.etcopencard.src.ui.adapter.CommonAdapter;
import com.huntersun.vkyes.etcopencard.src.ui.adapter.CommonViewHolder;

/**
* Date :2023-03-13
* Description:充值金额选择adapter
*/
public class RechargeAdapter extends CommonAdapter<RechargeBean> {
private INRechargeChoose inRechargeChoose;
private RechargeBean moneyInfoBefore;
private CommonViewHolder holderBefore;

public RechargeAdapter(Context context, INRechargeChoose inRechargeChoose) {
super(context, R.layout.item_gv_recharge);
this.inRechargeChoose = inRechargeChoose;
}

@Override
public void convert(CommonViewHolder holder, RechargeBean rechargeBean) {
TextView tvMoneyOne = holder.getView(R.id.tvMoney);
Typeface typeface = Typeface.createFromAsset(mContext.getAssets(), "fonts/beabas.ttf");
tvMoneyOne.setTypeface(typeface);

holder.setText(R.id.tvMoney, rechargeBean.payMoney);

setSelected(holder,rechargeBean.isSelected);

if (rechargeBean.isSelected){
moneyInfoBefore = rechargeBean;
holderBefore = holder;
}

holder.setOnClickListener(R.id.LLItem, new View.OnClickListener() {
@Override
public void onClick(View v) {
if (moneyInfoBefore != null){
moneyInfoBefore.isSelected = false;
}
rechargeBean.isSelected = true;
setSelected(holder, true);
setSelected(holderBefore,false);
inRechargeChoose.chooseRechargeMoney(rechargeBean);
moneyInfoBefore = rechargeBean;
holderBefore = holder;
notifyDataSetChanged();
}
});
}

/*
* 设置是否选中
*
* @param holder
* @param isSelected
*/
private void setSelected(CommonViewHolder holder,boolean isSelected){
if (holder == null){
return;
}

holder.setTextSelected(R.id.tvHint,isSelected);
holder.setTextSelected(R.id.tvMoney,isSelected);

if (isSelected){
holder.setTextColor(R.id.tvHint,mContext.getResources().getColor(R.color.white));
holder.setTextColor(R.id.tvMoney,mContext.getResources().getColor(R.color.white));
holder.setTextColor(R.id.tvUnit,mContext.getResources().getColor(R.color.white));
holder.setBackgroundDrawable(R.id.LLItem,R.drawable.bg_green_radius);
}else{
holder.setTextColor(R.id.tvHint,mContext.getResources().getColor(R.color.color_999999));
holder.setTextColor(R.id.tvMoney,mContext.getResources().getColor(R.color.color_999999));
holder.setTextColor(R.id.tvUnit,mContext.getResources().getColor(R.color.color_999999));
holder.setBackgroundDrawable(R.id.LLItem,R.drawable.bg_grey_radius);
}
}
}

+ 11
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/adapter/interfaces/INRechargeChoose.java Vedi File

@@ -0,0 +1,11 @@
package com.huntersun.vkyes.etcopencard.project.ui.adapter.interfaces;

import com.huntersun.vkyes.etcopencard.project.api.bean.RechargeBean;

/**
* Date :2023-03-13
* Description:选择充值模板回调
*/
public interface INRechargeChoose {
void chooseRechargeMoney(RechargeBean rechargeBean);
}

+ 256
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/AddViewHolder.java Vedi File

@@ -0,0 +1,256 @@
package com.huntersun.vkyes.etcopencard.src.ui.adapter;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;

/**
* Date :2023-03-13
* Description:添加界面
*/
public class AddViewHolder {
private LayoutInflater inflater;
private Context context;
private View customView;
private SparseArray<View> mViews;

public AddViewHolder(Context context, int layoutId) {
this.context = context;
this.inflater = LayoutInflater.from(context);
this.customView = this.inflater.inflate(layoutId, (ViewGroup)null);
this.mViews = new SparseArray();
this.customView.setTag(this);
}

public View getCustomView() {
return this.customView;
}

public <T extends View> T getView(int viewId) {
View view = (View)this.mViews.get(viewId);
if (view == null) {
view = this.customView.findViewById(viewId);
this.mViews.put(viewId, view);
}
return (T) view;
}

public AddViewHolder setText(int viewId, CharSequence text) {
TextView tv = (TextView)this.getView(viewId);
tv.setText(text);
return this;
}

//设置有删除线的textview
public AddViewHolder setTextWithCenterLine(int viewId , CharSequence text){
TextView view = getView(viewId);
view.setText(""+text);
view.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG);

//希望可以链式调用
return this;
}

public AddViewHolder setText(int viewId, CharSequence text, TextView.BufferType type) {
TextView tv = (TextView)this.getView(viewId);
tv.setText(text, type);
return this;
}

public AddViewHolder setImage(int viewId, String url,int res) {
ImageView view = (ImageView)this.getView(viewId);
GlideLoadImageUtils.loadImg(context,view,url,res);
return this;
}

public AddViewHolder setImageRetance(int viewId, String url,int res) {
ImageView view = (ImageView)this.getView(viewId);
//Glide.with(this.context).load(url).placeholder(2130837673).error(2130837673).centerCrop().into(view);
GlideLoadImageUtils.loadRectangleImg(context,view,url,res);
return this;
}

public ImageView getImageView(int viewId) {
ImageView view = (ImageView)this.getView(viewId);
return view;
}

@SuppressLint("WrongConstant")
public AddViewHolder setVisible(int viewId, boolean visible) {
View view = this.getView(viewId);
view.setVisibility(visible ? 0 : 8);
return this;
}

public AddViewHolder setInVisible(int viewId){
View view = this.getView(viewId);
view.setVisibility(View.INVISIBLE);
return this;
}

public AddViewHolder setOnClickListener(int viewId, View.OnClickListener listener) {
View view = this.getView(viewId);
view.setOnClickListener(listener);
return this;
}

public AddViewHolder setOnLongClickListener(int viewID, View.OnLongClickListener listener) {
View view = this.getView(viewID);
view.setOnLongClickListener(listener);
return this;
}

public AddViewHolder setOnEditorActionListener(int viewId, TextView.OnEditorActionListener listener) {
EditText view = (EditText)this.getView(viewId);
view.setOnEditorActionListener(listener);
return this;
}

public AddViewHolder setColorFilter(int viewId, int color, PorterDuff.Mode type) {
ImageView iv = (ImageView)this.getView(viewId);
iv.getDrawable().setColorFilter(color, type);
return this;
}

public AddViewHolder clearColorFilter(int viewId) {
ImageView view = (ImageView)this.getView(viewId);
view.getDrawable().clearColorFilter();
return this;
}

public AddViewHolder setTextColor(int viewId, int color) {
TextView tv = (TextView)this.getView(viewId);
tv.setTextColor(this.context.getResources().getColor(color));
return this;
}

public AddViewHolder setBackgroundColor(int viewId, int color) {
TextView tv = (TextView)this.getView(viewId);
tv.setBackgroundColor(this.context.getResources().getColor(color));
return this;
}

public AddViewHolder setLinearLayoutBackgroundColor(int viewId, int color) {
LinearLayout tv = (LinearLayout)this.getView(viewId);
tv.setBackgroundColor(this.context.getResources().getColor(color));
return this;
}

public AddViewHolder setDimensionPixelSize(int viewId, int dimes) {
TextView tv = (TextView)this.getView(viewId);
ViewGroup.LayoutParams params = tv.getLayoutParams();
params.height = this.context.getResources().getDimensionPixelSize(dimes);
tv.setLayoutParams(params);
return this;
}

public AddViewHolder setImageDrawable(int viewId, int res) {
ImageView iv = (ImageView)this.getView(viewId);
iv.setImageDrawable(this.context.getResources().getDrawable(res));
return this;
}

public String getText(int viewId) {
TextView tv = (TextView)this.getView(viewId);
return tv.getText().toString();
}

public AddViewHolder setView(int viewId, View view) {
LinearLayout layout = (LinearLayout)this.getView(viewId);
layout.addView(view);
return this;
}

public AddViewHolder setAdapter(int viewId, ListAdapter adapter) {
ListView layout = (ListView)this.getView(viewId);
layout.setAdapter(adapter);
return this;
}

public AddViewHolder setGridAdapter(int viewId, ListAdapter adapter) {
GridView layout = (GridView)this.getView(viewId);
layout.setAdapter(adapter);
return this;
}

public AddViewHolder setIBSelected(int viewId, boolean flag) {
ImageButton imageButton = (ImageButton)this.getView(viewId);
imageButton.setSelected(flag);
return this;
}

public AddViewHolder setTextSelected(int viewId, boolean flag) {
TextView textView = (TextView)this.getView(viewId);
textView.setSelected(flag);
return this;
}

public AddViewHolder setChecked(int viewID, boolean flag) {
CheckBox checkBox = (CheckBox)this.getView(viewID);
checkBox.setChecked(flag);
return this;
}

public AddViewHolder setEnabled(int viewID, boolean flag) {
EditText editText = (EditText)this.getView(viewID);
editText.setEnabled(false);
return this;
}

public boolean isselected(int viewId) {
ImageButton imageButton = (ImageButton)this.getView(viewId);
boolean flag = imageButton.isSelected();
return flag;
}

public boolean ischecked(int viewID) {
CheckBox checkBox = (CheckBox)this.getView(viewID);
boolean flag = checkBox.isChecked();
return flag;
}

public AddViewHolder setClickable(int viewId, boolean flag) {
ImageButton imageButton = (ImageButton)this.getView(viewId);
imageButton.setClickable(flag);
return this;
}

public boolean isClickable(int viewId) {
ImageButton imageButton = (ImageButton)this.getView(viewId);
boolean flag = imageButton.isClickable();
return flag;
}

public AddViewHolder setCompoundDrawables(int viewId, Drawable nav) {
TextView tv = (TextView)this.getView(viewId);
tv.setCompoundDrawables((Drawable)null, (Drawable)null, nav, (Drawable)null);
return this;
}

public AddViewHolder setCompoundDrawablesWithIntrinsicBounds(int viewId, Drawable nav) {
TextView tv = (TextView)this.getView(viewId);
tv.setCompoundDrawablesWithIntrinsicBounds((Drawable)null, nav, (Drawable)null, (Drawable)null);
return this;
}

public AddViewHolder setImageResource(int viewId, int nav) {
ImageView imageView = (ImageView)this.getView(viewId);
imageView.setImageResource(nav);
return this;
}
}

+ 75
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/CommonAdapter.java Vedi File

@@ -0,0 +1,75 @@
package com.huntersun.vkyes.etcopencard.src.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.List;

/**
* Author :Aucifer
* Date :2019/5/28
* <p>
* Description:List适用的adapter
*/
public abstract class CommonAdapter<T> extends BaseAdapter {
protected Context mContext;
protected List<T> mDatas;
protected LayoutInflater mInflater;
private int layoutId;
protected int position;

public CommonAdapter(Context context, List<T> datas, int layoutId) {
this.mContext = context;
mInflater = LayoutInflater.from(context);
this.mDatas = datas;
this.layoutId = layoutId;
}

protected CommonAdapter(Context context, int layoutId) {
this.mContext = context;
mInflater = LayoutInflater.from(context);
this.layoutId = layoutId;
}

public List<T> getmDatas() {
return mDatas;
}

public void setmDatas(List<T> mDatas) {
this.mDatas = mDatas;
}

@Override
public int getCount() {
return mDatas == null ? 0 : mDatas.size();
}

@Override
public T getItem(int position) {
return mDatas.get(position);
}

@Override
public long getItemId(int position) {
return position;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
CommonViewHolder holder = CommonViewHolder.get(mContext, convertView, parent,
layoutId, position);
this.position = position;
convert(holder, getItem(position));

//新增
//AutoUtils.autoSize(holder.getConvertView());

return holder.getConvertView();
}

public abstract void convert(CommonViewHolder holder, T t);

}


+ 365
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/CommonViewHolder.java Vedi File

@@ -0,0 +1,365 @@
package com.huntersun.vkyes.etcopencard.src.ui.adapter;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.util.Linkify;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.widget.Button;
import android.widget.Checkable;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RatingBar;
import android.widget.TextView;

/**
* Date :2023-03-13
* Description:
*/
public class CommonViewHolder {
private SparseArray<View> mViews;
private int mPosition;
private View mConvertView;
private Context mContext;
private int mLayoutId;

public CommonViewHolder(Context context, ViewGroup parent, int layoutId,
int position) {
mContext = context;
mLayoutId = layoutId;
this.mPosition = position;
this.mViews = new SparseArray<View>();
mConvertView = LayoutInflater.from(context).inflate(layoutId, parent,
false);
mConvertView.setTag(this);
//mConvertView.setId(position);
}

public static CommonViewHolder get(Context context, View convertView,
ViewGroup parent, int layoutId, int position) {
if (convertView == null) {
return new CommonViewHolder(context, parent, layoutId, position);
} else {
CommonViewHolder holder = (CommonViewHolder) convertView.getTag();
holder.mPosition = position;
return holder;
}
}

public int getPosition() {
return mPosition;
}

public int getLayoutId() {
return mLayoutId;
}

/**
* 通过viewId获取控件
*
* @param viewId
* @return
*/
public <T extends View> T getView(int viewId) {
View view = mViews.get(viewId);
if (view == null) {
view = mConvertView.findViewById(viewId);
mViews.put(viewId, view);
}
return (T) view;
}

public View getConvertView() {
return mConvertView;
}

/**
* 设置TextView的值
*
* @param viewId
* @param text
* @return
*/
public CommonViewHolder setText(int viewId, String text) {
TextView tv = getView(viewId);
tv.setText(text);
return this;
}

//设置有删除线的textview
public CommonViewHolder setTextWithCenterLine(int viewId , CharSequence text){
TextView view = getView(viewId);
view.setText(""+text);
view.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG);
return this;
}

/**
* 得到TextView的值
*
* @param viewId
* @return
*/
public String getText(int viewId) {
TextView tv = getView(viewId);
return tv.getText().toString().trim();
}

public CommonViewHolder setImageViewSelected(int viewId, boolean bool) {
ImageView iv = getView(viewId);
iv.setSelected(bool);
return this;
}

public boolean isImageViewSelected(int viewId) {
ImageView iv = getView(viewId);
return iv.isSelected();
}

public CommonViewHolder setImageButtonSelected(int viewId, boolean bool) {
ImageButton iv = getView(viewId);
iv.setSelected(bool);
return this;
}

public CommonViewHolder setButtonSelected(int viewId, boolean bool) {
Button iv = getView(viewId);
iv.setSelected(bool);
return this;
}


public CommonViewHolder setTextSelected(int viewId, boolean bool) {
TextView tv = getView(viewId);
tv.setSelected(bool);
return this;
}

public boolean isImageButtonSelected(int viewId) {
ImageButton iv = getView(viewId);
return iv.isSelected();
}

public CommonViewHolder setImage(int viewId, String url,int res) {
ImageView view = getView(viewId);
GlideLoadImageUtils.loadRectangleImg(mContext, view, url,res);
return this;
}

//部队图片做适配处理
public CommonViewHolder setImageWithoutCenterCrop(int viewId, String url,int res) {
ImageView view = getView(viewId);
GlideLoadImageUtils.loadImg(mContext, view, url,res);
return this;
}

public CommonViewHolder setCircleImage(int viewId,String url,int res){
ImageView view = getView(viewId);
GlideLoadImageUtils.loadCircleImg(mContext,view,url,res);
return this;
}

public CommonViewHolder setTypeFace(int viewId, Typeface typeface) {
TextView view = getView(viewId);
view.setTypeface(typeface);
return this;
}

public CommonViewHolder setImageHead(int viewId, String url,int res) {
ImageView view = getView(viewId);
GlideLoadImageUtils.loadCircleImg(mContext, view, url,res);
return this;
}

public CommonViewHolder setImageResource(int viewId, int resId) {
ImageView view = getView(viewId);
view.setImageResource(resId);
return this;
}

public CommonViewHolder setImageBitmap(int viewId, Bitmap bitmap) {
ImageView view = getView(viewId);
view.setImageBitmap(bitmap);
return this;
}

public CommonViewHolder setImageDrawable(int viewId, Drawable drawable) {
ImageView view = getView(viewId);
view.setImageDrawable(drawable);
return this;
}

public CommonViewHolder setBackgroundColor(int viewId, int color) {
View view = getView(viewId);
view.setBackgroundColor(color);
return this;
}

public CommonViewHolder setBackgroundRes(int viewId, int backgroundRes) {
View view = getView(viewId);
view.setBackgroundResource(backgroundRes);
return this;
}

public CommonViewHolder setBackgroundDrawable(int viewId, int backgroundRes) {
View view = getView(viewId);
view.setBackground(mContext.getResources().getDrawable(backgroundRes));
return this;
}

public CommonViewHolder setTextColor(int viewId, int textColor) {
TextView view = getView(viewId);
view.setTextColor(textColor);
return this;
}

public CommonViewHolder setTextColorRes(int viewId, int textColorRes) {
TextView view = getView(viewId);
view.setTextColor(mContext.getResources().getColor(textColorRes));
return this;
}

@SuppressLint("NewApi")
public CommonViewHolder setAlpha(int viewId, float value) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getView(viewId).setAlpha(value);
} else {
// Pre-honeycomb hack to set Alpha value
AlphaAnimation alpha = new AlphaAnimation(value, value);
alpha.setDuration(0);
alpha.setFillAfter(true);
getView(viewId).startAnimation(alpha);
}
return this;
}

public CommonViewHolder setVisible(int viewId, boolean visible) {
View view = getView(viewId);
if (view != null) view.setVisibility(visible ? View.VISIBLE : View.GONE);
return this;
}

public CommonViewHolder setVisible(int viewId,boolean visible,boolean isLocation){
View view = getView(viewId);
if (isLocation){
view.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
}else{
view.setVisibility(visible ? View.VISIBLE : View.GONE);
}

return this;
}

public CommonViewHolder linkify(int viewId) {
TextView view = getView(viewId);
Linkify.addLinks(view, Linkify.ALL);
return this;
}

public CommonViewHolder setTypeface(Typeface typeface, int... viewIds) {
for (int viewId : viewIds) {
TextView view = getView(viewId);
view.setTypeface(typeface);
view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
}
return this;
}

public CommonViewHolder setProgress(int viewId, int progress) {
ProgressBar view = getView(viewId);
view.setProgress(progress);
return this;
}

public CommonViewHolder setProgress(int viewId, int progress, int max) {
ProgressBar view = getView(viewId);
view.setMax(max);
view.setProgress(progress);
return this;
}

public CommonViewHolder setMax(int viewId, int max) {
ProgressBar view = getView(viewId);
view.setMax(max);
return this;
}

public CommonViewHolder setRating(int viewId, float rating) {
RatingBar view = getView(viewId);
view.setRating(rating);
return this;
}

public CommonViewHolder setRating(int viewId, float rating, int max) {
RatingBar view = getView(viewId);
view.setMax(max);
view.setRating(rating);
return this;
}

public CommonViewHolder setTag(int viewId, Object tag) {
View view = getView(viewId);
view.setTag(tag);
return this;
}

public CommonViewHolder setTag(int viewId, int key, Object tag) {
View view = getView(viewId);
view.setTag(key, tag);
return this;
}

public CommonViewHolder setChecked(int viewId, boolean checked) {
Checkable view = (Checkable) getView(viewId);
view.setChecked(checked);
return this;
}

/**
* 关于事件的
*/
public CommonViewHolder setOnClickListener(int viewId,
View.OnClickListener listener) {
View view = getView(viewId);
view.setOnClickListener(listener);
return this;
}

public CommonViewHolder setOnTouchListener(int viewId,
View.OnTouchListener listener) {
View view = getView(viewId);
view.setOnTouchListener(listener);
return this;
}

public CommonViewHolder setOnLongClickListener(int viewId,
View.OnLongClickListener listener) {
View view = getView(viewId);
view.setOnLongClickListener(listener);
return this;
}

public CommonViewHolder setView(int viewId, View view) {
LinearLayout layout = getView(viewId);
layout.addView(view);
return this;
}

public CommonViewHolder setAdapter(int viewId, ListAdapter adapter) {
ListView listView = getView(viewId);
listView.setAdapter(adapter);
return this;
}
}

+ 106
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/src/ui/adapter/GlideLoadImageUtils.java Vedi File

@@ -0,0 +1,106 @@
package com.huntersun.vkyes.etcopencard.src.ui.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.huntersun.vkyes.etcopencard.src.app.AppApplication;

/**
* Date :2023-03-13
* Description:图片加载
*/
public class GlideLoadImageUtils {
/*
加载本地图片
*/
public static void loadLocalImg(Context mContext, ImageView imageView, int resId) {
Glide.with(mContext)
.load(resId)
.apply(new RequestOptions().centerCrop())
.into(imageView);
}

/*
* 加载图片 不指定加载的形状
*
* @param mContext
* @param imageView
* @param imgUrl
*/
public static void loadImg(Context mContext, ImageView imageView, String imgUrl, int res) {
mContext = null;
mContext = AppApplication.getInstance().getApplicationContext();
if (res == 0) {
//res = R.drawable.icon_state_error;
}

RequestOptions options = new RequestOptions();
options
.placeholder(res)
.error(res)
.skipMemoryCache(false)
//.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL);

Glide.with(mContext)
.load(imgUrl)
.apply(options)
.into(imageView);
}


/*
* 加载矩形图片
*
* @param mContext
* @param imageView
* @param imgUrl
*/
public static void loadRectangleImg(Context mContext, ImageView imageView, String imgUrl, int res) {
mContext = AppApplication.getInstance().getApplicationContext();
if (res == 0) {
//res = R.drawable.icon_state_error;
}
RequestOptions options = new RequestOptions();
options.placeholder(res)
.error(res)
.skipMemoryCache(false)
.dontTransform()
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL);

Glide.with(mContext).load(imgUrl) .apply(options).into(imageView);
}

/*
* 显示圆形图片(circleCropTransform();//圆形图片 好多的图片形式都是这么设置的)
*
* @param mContext
* @param imageView
* @param imgUrl
*/
public static void loadCircleImg(Context mContext, ImageView imageView, String imgUrl, int res) {
mContext = null;
mContext = AppApplication.getInstance().getApplicationContext();
if (res == 0) {
//res = R.drawable.icon_state_error;
}

RequestOptions options = RequestOptions.circleCropTransform();
options.placeholder(res)
.error(res)
.skipMemoryCache(false)
.centerCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL);

Glide.with(mContext)
.load(imgUrl)
.apply(options)
//.transition(withCrossFade())
.into(imageView);
}

}

+ 30
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/src/widget/NoScrollGridView.java Vedi File

@@ -0,0 +1,30 @@
package com.huntersun.vkyes.etcopencard.src.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

/**
* Date :2023-03-13
* Description:不可滚动的GridView
*/
public class NoScrollGridView extends GridView {

public NoScrollGridView(Context context) {
super(context);
}

public NoScrollGridView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}

public NoScrollGridView(android.content.Context context,
android.util.AttributeSet attrs) {
super(context, attrs);
}

public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}

+ 5
- 0
app/src/main/res/drawable-v1/bg_green_radius.xml Vedi File

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

+ 5
- 0
app/src/main/res/drawable-v1/bg_grey_radius.xml Vedi File

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

+ 5
- 0
app/src/main/res/drawable-v1/bg_white_radius.xml Vedi File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_10"/>
<solid android:color="#ffffff"/>
</shape>

+ 14
- 0
app/src/main/res/drawable-v1/border_gray.xml Vedi File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="0.5dp"
android:insetTop="0.5dp"
android:insetRight="0.5dp"
android:insetBottom="0.5dp">
<shape>
<corners android:radius="0dp" />
<solid android:color="@android:color/transparent" />
<stroke
android:width="0.5dp"
android:color="#999999" />
</shape>
</inset>

+ 12
- 0
app/src/main/res/drawable/btn_common_disable.xml Vedi File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:color="@color/common_divider"
tools:ignore="NewApi,ResourceName">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/common_divider" />
<corners android:radius="@dimen/dp_50" />
</shape>
</item>
</ripple>

+ 17
- 0
app/src/main/res/drawable/btn_common_pressed.xml Vedi File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:color="#e3e3e3"
tools:ignore="NewApi,ResourceName">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/common_accent_color" />
<gradient
android:angle="0"
android:centerColor="@color/common_accent_color"
android:endColor="@color/common_accent_color"
android:startColor="@color/common_accent_color" />
<corners android:radius="@dimen/dp_50" />
</shape>
</item>
</ripple>

+ 6
- 0
app/src/main/res/drawable/btn_common_selector.xml Vedi File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/btn_common_disable" android:state_enabled="false" />
<item android:drawable="@drawable/btn_common_pressed" android:state_enabled="true" />
<item android:drawable="@drawable/btn_common_pressed" />
</selector>

+ 35
- 0
app/src/main/res/layout-v3/item_gv_recharge.xml Vedi File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?><!--bg_cz_item_normal-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LLItem"
style="@style/WrapWrap.Horizontal"
android:gravity="center_horizontal|bottom"
android:background="@drawable/bg_grey_radius"
android:minHeight="@dimen/dp_55"
android:paddingHorizontal="@dimen/dp_30"
android:paddingVertical="@dimen/dp_20">

<TextView
android:id="@+id/tvHint"
style="@style/WrapWrap"
android:text="¥"
android:textColor="@color/color_999999"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />

<TextView
android:id="@+id/tvMoney"
style="@style/WrapWrap"
android:layout_marginLeft="@dimen/dp_2"
android:text="0"
android:textStyle="bold"
android:textColor="@color/color_999999"
android:textSize="@dimen/sp_16" />

<TextView
android:id="@+id/tvUnit"
style="@style/WrapWrap"
android:layout_marginLeft="@dimen/dp_2"
android:text="元"
android:textColor="@color/color_999999"
android:textSize="@dimen/sp_12" />
</LinearLayout>

+ 50
- 0
app/src/main/res/layout/activity_auditing.xml Vedi File

@@ -0,0 +1,50 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
style="@style/MatchMatch.Vertical.Common">

<com.hjq.bar.TitleBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
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">
<TextView
style="@style/WrapWrap"
android:text="详情"
android:textSize="@dimen/sp_16"
android:textStyle="bold"
android:paddingTop="@dimen/dp_28"
android:paddingLeft="@dimen/dp_15"
android:paddingBottom="@dimen/dp_10"
android:textColor="@color/common_text_color"/>

<LinearLayout
style="MatchWrap.Vertical"
android:background="@drawable/home_search_bar_gray_bg2"
android:paddingHorizontal="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15">

</LinearLayout>

</LinearLayout>
</androidx.core.widget.NestedScrollView>

<Button
android:id="@+id/btn_next"
style="@style/BtnShortStyle"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_marginLeft="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginRight="@dimen/dp_30"
android:text="下一步"
android:textSize="@dimen/sp_16" />
</LinearLayout>

+ 218
- 0
app/src/main/res/layout/activity_qc_step1.xml Vedi File

@@ -0,0 +1,218 @@
<?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/MatchWrap.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">

<!--搜索框-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:layout_marginHorizontal="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_20"
android:background="@drawable/item_home_frame3"
android:gravity="center_vertical"
android:paddingHorizontal="@dimen/dp_12">

<ImageView
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:src="@drawable/search_ic" />

<com.hjq.widget.view.ClearEditText
android:id="@+id/text1"
style="@style/EditTextStyle"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_30"
android:drawablePadding="@dimen/dp_10"
android:hint="请输入订单编号/车牌号"
android:textColor="#ff999999"
android:textSize="@dimen/sp_12"/>
</LinearLayout>

<TextView
style="@style/WrapWrap"
android:text="基础信息"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:textSize="@dimen/sp_16"
android:textColor="@color/color_333333"
android:textStyle="bold"/>

<!--基础信息-->
<LinearLayout
style="@style/MatchWrap.Vertical"
android:background="@drawable/bg_white_radius"
android:padding="@dimen/dp_15"
android:layout_marginHorizontal="@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_name"
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_idcard_type"
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_idcard"
style="@style/blackTextStyle14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="5115***********452" />
</LinearLayout>
<View
style="@style/MatchOne.HorLine"
android:layout_marginTop="@dimen/dp_10" />
<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_numberplate"
style="@style/blackTextStyle14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="贵A123456" />
</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_card"
style="@style/blackTextStyle14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="11223300" />
</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="#FF8000"
android:text="¥200.00" />
</LinearLayout>
<View
style="@style/MatchOne.HorLine"
android:layout_marginTop="@dimen/dp_10" />

<Button
android:id="@+id/btn_next"
style="@style/BtnShortStyle"
android:layout_width="@dimen/dp_70"
android:layout_height="@dimen/dp_25"
android:layout_gravity="center_vertical|right"
android:layout_marginTop="@dimen/dp_10"
android:text="圈存"
android:textSize="@dimen/sp_12" />
</LinearLayout>

<!--充值记录-->
<LinearLayout android:id="@+id/ll_record"
style="@style/MatchWrap.Horizontal"
android:background="@drawable/bg_white_radius"
android:padding="@dimen/dp_15"
android:gravity="center_vertical"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15">

<TextView
style="@style/blackTextStyle14"
android:drawableLeft="@mipmap/icon_entrapment"
android:drawablePadding="@dimen/dp_10"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="充值记录" />

<ImageView
style="@style/WrapWrap"
android:src="@mipmap/icon_right_black"/>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

+ 121
- 0
app/src/main/res/layout/activity_qc_step2.xml Vedi File

@@ -0,0 +1,121 @@
<?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">

<!--top-->
<RelativeLayout
style="@style/MatchWrap"
android:minHeight="@dimen/dp_110"
android:paddingHorizontal="@dimen/dp_25"
android:paddingVertical="@dimen/dp_15"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginVertical="@dimen/dp_15"
android:background="@mipmap/bg_earmark">

<TextView
android:id="@+id/tv_card_num"
style="@style/WrapWrap"
android:text="ETC卡号:00520"
android:textColor="@color/white"
android:textSize="@dimen/sp_12"
android:layout_alignParentRight="true"/>
<TextView
android:id="@+id/tv_money_label"
style="@style/WrapWrap"
android:text="卡内余额"
android:layout_below="@id/tv_card_num"
android:textSize="@dimen/sp_14"
android:textColor="@color/white"/>

<TextView
android:id="@+id/tv_money"
style="@style/MatchWrap"
android:text="¥100.00"
android:layout_marginTop="@dimen/dp_12"
android:layout_below="@+id/tv_money_label"
android:textSize="@dimen/sp_24"
android:textColor="@color/white"
android:textStyle="bold"/>
</RelativeLayout>

<!--输入金额-->
<com.hjq.widget.view.ClearEditText
android:id="@+id/et_input_money"
style="@style/EditTextStyle"
android:layout_marginHorizontal="@dimen/dp_80"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:hint="请输入金额"
android:gravity="center"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/border_gray"
android:textColorHint="@color/color_333333"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
/>
<TextView
android:id="@+id/tv_hint"
style="@style/WrapWrap"
android:text="最低充值金额不小于10元"
android:textSize="@dimen/sp_13"
android:textColor="#666666"
android:layout_marginTop="@dimen/dp_9"
android:gravity="center"
android:layout_gravity="center"/>

<TextView
style="@style/WrapWrap"
android:text="充值金额"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_30"
android:paddingRight="@dimen/dp_15"
android:textSize="@dimen/sp_16"
android:textColor="@color/color_333333"
android:textStyle="bold"/>

<LinearLayout
style="@style/MatchWrap.Vertical"
android:background="@drawable/bg_white_radius"
android:paddingHorizontal="@dimen/dp_30"
android:paddingVertical="@dimen/dp_15"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_10">

<com.huntersun.vkyes.etcopencard.src.widget.NoScrollGridView
android:id="@+id/gv_money"
style="@style/MatchWrap"
android:horizontalSpacing="@dimen/dp_35"
android:listSelector="@null"
android:numColumns="2"
android:scrollbars="none"
android:verticalSpacing="@dimen/dp_20" />
</LinearLayout>

<Button
android:id="@+id/nextStep"
style="@style/BtnShortStyle"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_40"
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_90"
android:text="立即充值"
android:textSize="@dimen/sp_15" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

+ 6
- 0
app/src/main/res/layout/activity_recharge_record.xml Vedi File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

</LinearLayout>

+ 20
- 0
app/src/main/res/layout/activity_to_entrapment.xml Vedi File

@@ -14,6 +14,24 @@
app:lineVisible="false"
app:titleColor="#FFFFFF" />

<LinearLayout
style="@style/MatchWrap.Vertical"
android:background="@drawable/bg_white_radius"
android:paddingHorizontal="@dimen/dp_30"
android:paddingVertical="@dimen/dp_15"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_10">

<com.huntersun.vkyes.etcopencard.src.widget.NoScrollGridView
android:id="@+id/gv_money"
style="@style/MatchWrap"
android:horizontalSpacing="@dimen/dp_35"
android:listSelector="@null"
android:numColumns="2"
android:scrollbars="none"
android:verticalSpacing="@dimen/dp_20" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -327,6 +345,8 @@

</LinearLayout>



<Button
android:id="@+id/nextStep"
android:layout_width="match_parent"

+ 6
- 0
app/src/main/res/layout/dialog_recharge_confirm.xml Vedi File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

</LinearLayout>

BIN
app/src/main/res/mipmap-xhdpi/back_black.png Vedi File


BIN
app/src/main/res/mipmap-xhdpi/bg_earmark.png Vedi File


BIN
app/src/main/res/mipmap-xhdpi/icon_entrapment.png Vedi File


BIN
app/src/main/res/mipmap-xhdpi/icon_right_black.png Vedi File


+ 3
- 0
app/src/main/res/values/colors.xml Vedi File

@@ -96,4 +96,7 @@
<!-- 橘色-->
<color name="orange01">#FA8C16</color>
<!-- 分割线颜色-->
<color name="common_divider">#e3e3e3</color>
</resources>

+ 18
- 0
app/src/main/res/values/styles.xml Vedi File

@@ -272,4 +272,22 @@
<!-- &lt;!&ndash;<item name="banner_placeholderDrawable">@mipmap/err_img</item>&ndash;&gt;-->
<!-- </style>-->
<!--按钮样式-->
<style name="BtnShortStyle" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@drawable/btn_common_pressed</item>
<item name="android:gravity">center_vertical|center_horizontal</item>
<item name="android:textColor">@color/white</item>
</style>
<!-- 按钮样式-带不可用状态 -->
<style name="FullBtnStyle" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/white</item>
<item name="android:background">@drawable/btn_common_selector</item>
<item name="android:gravity">center_vertical|center_horizontal</item>
<item name="android:enabled">false</item>
</style>
</resources>

+ 149
- 0
app/src/main/res/values/styles_base.xml Vedi File

@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
tools:ignore="ResourceName">

<style name="WrapMatch" >
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
</style>

<style name="MatchWrap">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="WrapWrap">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="MatchMatch">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
</style>

<style name="MatchAuto">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_height">0dp</item>
</style>

<style name="AutoMatch">
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_height">match_parent</item>
</style>

<style name="WrapAuto">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_height">0dp</item>
</style>

<style name="AutoWrap">
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="WrapMatch.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="WrapMatch.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="MatchWrap.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="MatchWrap.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="WrapWrap.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="WrapWrap.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="MatchMatch.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="MatchMatch.Common">
<item name="android:background">@color/background_color</item>
</style>

<style name="MatchWrap.Common">
<item name="android:background">@color/background_color</item>
</style>

<style name="MatchMatch.Vertical.Common">
<item name="android:background">@color/background_color</item>
</style>

<style name="MatchMatch.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="MatchAuto.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="MatchAuto.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="AutoMatch.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="AutoMatch.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="WrapAuto.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="WrapAuto.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="AutoWrap.Vertical">
<item name="android:orientation">vertical</item>
</style>

<style name="AutoWrap.Horizontal">
<item name="android:orientation">horizontal</item>
</style>

<style name="MatchOne">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">0.5dp</item>
</style>

<style name="OneMatch">
<item name="android:layout_width">0.5dp</item>
<item name="android:layout_height">match_parent</item>
</style>

<style name="WeightMatch">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_weight">1</item>
</style>

<style name="MatchOne.HorLine">
<item name="android:background">@color/common_divider</item>
</style>

<style name="OneMatch.VerLine">
<item name="android:background">@color/common_divider</item>
</style>
</resources>

+ 4
- 0
library/base/src/main/res/values/colors.xml Vedi File

@@ -69,4 +69,8 @@
<!-- 橙色 -->
<color name="orange">#FFFFA500</color>

<!-- 文字颜色-->
<color name="color_333333">#333333</color>
<color name="color_999999">#999999</color>
<color name="color_F7F6FB">#F7F6FB</color>
</resources>

Loading…
Annulla
Salva