ode class="language-java"> userLogin.setOnClickListener(this);
@ -901,6 +776,27 @@ public class UserCenterActivity extends Activity implements View.OnClickListener
901 776
                MobclickAgent.onEvent(getApplicationContext(), "0815");
902 777
                break;
903 778
779
            case R.id.rl_car_owner_certificate: // 车主认证
780
                if (!MainApplication.isLogin()) {
781
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
782
                    startActivity(new Intent(getApplication(), LoginActivity.class));
783
                } else {
784
                    // 列表接口
785
                    // 1.无认证记录
786
                    startActivity(new Intent(getApplication(), CarOwnerCertificateActivity.class));
787
//                    MobclickAgent.onEvent(getApplicationContext(), "0810"); // TODO
788
                }
789
                break;
790
            case R.id.rl_publish_price: // 发表成交价
791
                if (!MainApplication.isLogin()) {
792
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();
793
                    startActivity(new Intent(getApplication(), LoginActivity.class));
794
                } else {
795
                    // TODO 跳转html
796
                    System.out.println("come on");
797
                }
798
                break;
799
904 800
            case R.id.rl_chongzhi:
905 801
                if (!MainApplication.isLogin()) {
906 802
                    Toast.makeText(getApplication(), "请先登录", Toast.LENGTH_SHORT).show();

+ 97 - 0
app/src/main/java/com/electric/chargingpile/adapter/CarBrandGroupedListAdapter.java

@ -0,0 +1,97 @@
1
package com.electric.chargingpile.adapter;
2
3
import android.content.Context;
4
import android.view.LayoutInflater;
5
import android.view.View;
6
import android.view.ViewGroup;
7
import android.widget.Button;
8
import android.widget.ImageView;
9
10
import com.bumptech.glide.Glide;
11
import com.bumptech.glide.load.engine.DiskCacheStrategy;
12
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
13
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
14
import com.electric.chargingpile.R;
15
import com.electric.chargingpile.entity.CarBrandChildEntity;
16
import com.electric.chargingpile.entity.CarBrandGroupEntity;
17
18
import java.util.ArrayList;
19
20
public class CarBrandGroupedListAdapter extends GroupedRecyclerViewAdapter {
21
22
    protected ArrayList<CarBrandGroupEntity> groups;
23
24
    public CarBrandGroupedListAdapter(Context context, ArrayList<CarBrandGroupEntity> groups) {
25
        super(context);
26
        this.groups = groups;
27
    }
28
29
    public void clear() {
30
        groups.clear();
31
        notifyDataChanged();
32
    }
33
34
    public void setGroups(ArrayList<CarBrandGroupEntity> groups) {
35
        this.groups = groups;
36
        notifyDataChanged();
37
    }
38
39
    @Override
40
    public int getGroupCount() {
41
        return groups == null ? 0 : groups.size();
42
    }
43
44
    @Override
45
    public int getChildrenCount(int groupPosition) {
46
        ArrayList<CarBrandChildEntity> children = groups.get(groupPosition).getBrandList();
47
        return children == null ? 0 : children.size();
48
    }
49
50
    @Override
51
    public boolean hasHeader(int groupPosition) {
52
        return true;
53
    }
54
55
    @Override
56
    public boolean hasFooter(int groupPosition) {
57
        return false;
58
    }
59
60
    @Override
61
    public int getHeaderLayout(int viewType) {
62
        return R.layout.adapter_header_car_brand;
63
    }
64
65
    @Override
66
    public int getFooterLayout(int viewType) {
67
        return 0;
68
    }
69
70
    @Override
71
    public int getChildLayout(int viewType) {
72
        return R.layout.adapter_child_car_brand;
73
    }
74
75
    @Override
76
    public void onBindHeaderViewHolder(BaseViewHolder holder, int groupPosition) {
77
        CarBrandGroupEntity entity = groups.get(groupPosition);
78
        holder.setText(R.id.title, entity.getInitial());
79
    }
80
81
    @Override
82
    public void onBindFooterViewHolder(BaseViewHolder holder, int groupPosition) {
83
    }
84
85
    @Override
86
    public void onBindChildViewHolder(BaseViewHolder holder, int groupPosition, int childPosition) {
87
        CarBrandChildEntity entity = groups.get(groupPosition).getBrandList().get(childPosition);
88
        holder.setText(R.id.title, entity.getBrandName());
89
        if (childPosition == 0) {
90
            holder.setVisible(R.id.line, View.GONE);
91
        } else {
92
            holder.setVisible(R.id.line, View.VISIBLE);
93
        }
94
        ImageView icon = holder.getImageView(R.id.icon);
95
        Glide.with(mContext).load(entity.getIcon()).placeholder(android.R.color.white).fitCenter().into(icon);
96
    }
97
}

+ 95 - 0
app/src/main/java/com/electric/chargingpile/adapter/CarModelGroupedListAdapter.java

@ -0,0 +1,95 @@
1
package com.electric.chargingpile.adapter;
2
3
import android.content.Context;
4
import android.view.View;
5
import android.widget.ImageView;
6
7
import com.bumptech.glide.Glide;
8
import com.bumptech.glide.load.engine.DiskCacheStrategy;
9
import com.donkingliang.groupedadapter.adapter.GroupedRecyclerViewAdapter;
10
import com.donkingliang.groupedadapter.holder.BaseViewHolder;
11
import com.electric.chargingpile.R;
12
import com.electric.chargingpile.entity.CarCompanyEntity;
13
import com.electric.chargingpile.entity.CarSeriesEntity;
14
15
import java.util.ArrayList;
16
17
public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
18
    protected ArrayList<CarCompanyEntity> groups;
19
20
    public CarModelGroupedListAdapter(Context context, ArrayList<CarCompanyEntity> groups) {
21
        super(context);
22
        this.groups = groups;
23
    }
24
25
    public void clear() {
26
        groups.clear();
27
        notifyDataChanged();
28
    }
29
30
    public void setGroups(ArrayList<CarCompanyEntity> groups) {
31
        this.groups = groups;
32
        notifyDataChanged();
33
    }
34
35
    @Override
36
    public int getGroupCount() {
37
        return groups == null ? 0 : groups.size();
38
    }
39
40
    @Override
41
    public int getChildrenCount(int groupPosition) {
42
        ArrayList<CarSeriesEntity> children = groups.get(groupPosition).getSerieslist();
43
        return children == null ? 0 : children.size();
44
    }
45
46
    @Override
47
    public boolean hasHeader(int groupPosition) {
48
        return true;
49
    }
50
51
    @Override
52
    public boolean hasFooter(int groupPosition) {
53
        return false;
54
    }
55
56
    @Override
57
    public int getHeaderLayout(int viewType) {
58
        return R.layout.adapter_header_car_model;
59
    }
60
61
    @Override
62
    public int getFooterLayout(int viewType) {
63
        return 0;
64
    }
65
66
    @Override
67
    public int getChildLayout(int viewType) {
68
        return R.layout.adapter_child_car_model;
69
    }
70
71
    @Override
72
    public void onBindHeaderViewHolder(BaseViewHolder holder, int groupPosition) {
73
        CarCompanyEntity entity = groups.get(groupPosition);
74
        holder.setText(R.id.title, entity.getCompanyName());
75
    }
76
77
    @Override
78
    public void onBindFooterViewHolder(BaseViewHolder holder, int groupPosition) {
79
80
    }
81
82
    @Override
83
    public void onBindChildViewHolder(BaseViewHolder holder, int groupPosition, int childPosition) {
84
        CarSeriesEntity entity = groups.get(groupPosition).getSerieslist().get(childPosition);
85
        holder.setText(R.id.title, entity.getSeriesName());
86
        if (childPosition == 0) {
87
            holder.setVisible(R.id.line, View.GONE);
88
        } else {
89
            holder.setVisible(R.id.line, View.VISIBLE);
90
        }
91
        ImageView icon = holder.getImageView(R.id.icon);
92
        Glide.with(mContext).load(entity.getIcon()).placeholder(android.R.color.white).diskCacheStrategy(DiskCacheStrategy.RESOURCE).fitCenter().into(icon);
93
    }
94
95
}

+ 59 - 0
app/src/main/java/com/electric/chargingpile/entity/CarBrandChildEntity.java

@ -0,0 +1,59 @@
1
package com.electric.chargingpile.entity;
2
3
import java.util.ArrayList;
4
5
public class CarBrandChildEntity {
6
    private int brandId;
7
    private String brandName;
8
    private int seriesNum;
9
    private String icon;
10
    private ArrayList<CarCompanyEntity> companyList;
11
12
    public CarBrandChildEntity(int brandId, String brandName, int seriesNum, String icon, ArrayList<CarCompanyEntity> companyList) {
13
        this.brandId = brandId;
14
        this.brandName = brandName;
15
        this.seriesNum = seriesNum;
16
        this.icon = icon;
17
        this.companyList = companyList;
18
    }
19
20
    public int getBrandId() {
21
        return brandId;
22
    }
23
24
    public void setBrandId(int brandId) {
25
        this.brandId = brandId;
26
    }
27
28
    public String getBrandName() {
29
        return brandName;
30
    }
31
32
    public void setBrandName(String brandName) {
33
        this.brandName = brandName;
34
    }
35
36
    public int getSeriesNum() {
37
        return seriesNum;
38
    }
39
40
    public void setSeriesNum(int seriesNum) {
41
        this.seriesNum = seriesNum;
42
    }
43
44
    public String getIcon() {
45
        return icon;
46
    }
47
48
    public void setIcon(String icon) {
49
        this.icon = icon;
50
    }
51
52
    public ArrayList<CarCompanyEntity> getCompanyList() {
53
        return companyList;
54
    }
55
56
    public void setCompanyList(ArrayList<CarCompanyEntity> companyList) {
57
        this.companyList = companyList;
58
    }
59
}

+ 30 - 0
app/src/main/java/com/electric/chargingpile/entity/CarBrandGroupEntity.java

@ -0,0 +1,30 @@
1
package com.electric.chargingpile.entity;
2
3
4
import java.util.ArrayList;
5
6
public class CarBrandGroupEntity {
7
    private String initial; // header
8
    private ArrayList<CarBrandChildEntity> brandList; // children
9
10
    public CarBrandGroupEntity(String initial, ArrayList<CarBrandChildEntity> brandList) {
11
        this.initial = initial;
12
        this.brandList = brandList;
13
    }
14
15
    public String getInitial() {
16
        return initial;
17
    }
18
19
    public void setInitial(String initial) {
20
        this.initial = initial;
21
    }
22
23
    public ArrayList<CarBrandChildEntity> getBrandList() {
24
        return brandList;
25
    }
26
27
    public void setBrandList(ArrayList<CarBrandChildEntity> brandList) {
28
        this.brandList = brandList;
29
    }
30
}

+ 50 - 0
app/src/main/java/com/electric/chargingpile/entity/CarCompanyEntity.java

@ -0,0 +1,50 @@
1
package com.electric.chargingpile.entity;
2
3
import java.util.ArrayList;
4
5
public class CarCompanyEntity {
6
    private int companyId;
7
    private String companyName;
8
    private int brandId;
9
    private ArrayList<CarSeriesEntity> serieslist;
10
11
    public CarCompanyEntity(int companyId, String companyName, int brandId, ArrayList<CarSeriesEntity> serieslist) {
12
        this.companyId = companyId;
13
        this.companyName = companyName;
14
        this.brandId = brandId;
15
        this.serieslist = serieslist;
16
    }
17
18
19
    public int getCompanyId() {
20
        return companyId;
21
    }
22
23
    public void setCompanyId(int companyId) {
24
        this.companyId = companyId;
25
    }
26
27
    public String getCompanyName() {
28
        return companyName;
29
    }
30
31
    public void setCompanyName(String companyName) {
32
        this.companyName = companyName;
33
    }
34
35
    public int getBrandId() {
36
        return brandId;
37
    }
38
39
    public void setBrandId(int brandId) {
40
        this.brandId = brandId;
41
    }
42
43
    public ArrayList<CarSeriesEntity> getSerieslist() {
44
        return serieslist;
45
    }
46
47
    public void setSerieslist(ArrayList<CarSeriesEntity> serieslist) {
48
        this.serieslist = serieslist;
49
    }
50
}

+ 67 - 0
app/src/main/java/com/electric/chargingpile/entity/CarSeriesEntity.java

@ -0,0 +1,67 @@
1
package com.electric.chargingpile.entity;
2
3
public class CarSeriesEntity {
4
    private int brandId;
5
    private String brandName;
6
    private int companyId;
7
    private int seriesId;
8
    private String seriesName;
9
    private String icon;
10
11
    public CarSeriesEntity(int brandId, String brandName, int companyId, int seriesId, String seriesName, String icon) {
12
        this.brandId = brandId;
13
        this.brandName = brandName;
14
        this.companyId = companyId;
15
        this.seriesId = seriesId;
16
        this.seriesName = seriesName;
17
        this.icon = icon;
18
    }
19
20
    public int getBrandId() {
21
        return brandId;
22
    }
23
24
    public void setBrandId(int brandId) {
25
        this.brandId = brandId;
26
    }
27
28
    public String getBrandName() {
29
        return brandName;
30
    }
31
32
    public void setBrandName(String brandName) {
33
        this.brandName = brandName;
34
    }
35
36
    public int getCompanyId() {
37
        return companyId;
38
    }
39
40
    public void setCompanyId(int companyId) {
41
        this.companyId = companyId;
42
    }
43
44
    public int getSeriesId() {
45
        return seriesId;
46
    }
47
48
    public void setSeriesId(int seriesId) {
49
        this.seriesId = seriesId;
50
    }
51
52
    public String getSeriesName() {
53
        return seriesName;
54
    }
55
56
    public void setSeriesName(String seriesName) {
57
        this.seriesName = seriesName;
58
    }
59
60
    public String getIcon() {
61
        return icon;
62
    }
63
64
    public void setIcon(String icon) {
65
        this.icon = icon;
66
    }
67
}

+ 21 - 0
app/src/main/java/com/electric/chargingpile/event/CarBrandEvent.java

@ -0,0 +1,21 @@
1
package com.electric.chargingpile.event;
2
3
import com.electric.chargingpile.entity.CarBrandGroupEntity;
4
5
import java.util.ArrayList;
6
7
public class CarBrandEvent {
8
    private ArrayList<CarBrandGroupEntity> groups;
9
10
    public CarBrandEvent(ArrayList<CarBrandGroupEntity> groups) {
11
        this.groups = groups;
12
    }
13
14
    public ArrayList<CarBrandGroupEntity> getGroups() {
15
        return groups;
16
    }
17
18
    public void setGroups(ArrayList<CarBrandGroupEntity> groups) {
19
        this.groups = groups;
20
    }
21
}

+ 20 - 0
app/src/main/java/com/electric/chargingpile/event/CarCompanyEvent.java

@ -0,0 +1,20 @@
1
package com.electric.chargingpile.event;
2
3
import com.electric.chargingpile.entity.CarCompanyEntity;
4
5
import java.util.ArrayList;
6
7
public class CarCompanyEvent {
8
    private ArrayList<CarCompanyEntity> companyList;
9
    public ArrayList<CarCompanyEntity> getCompanyList() {
10
        return companyList;
11
    }
12
13
    public void setCompanyList(ArrayList<CarCompanyEntity> companyList) {
14
        this.companyList = companyList;
15
    }
16
17
    public CarCompanyEvent(ArrayList<CarCompanyEntity> companyList) {
18
        this.companyList = companyList;
19
    }
20
}

+ 19 - 0
app/src/main/java/com/electric/chargingpile/event/CarSerieEvent.java

@ -0,0 +1,19 @@
1
package com.electric.chargingpile.event;
2
3
import com.electric.chargingpile.entity.CarSeriesEntity;
4
5
public class CarSerieEvent {
6
    private CarSeriesEntity carSeriesEntity;
7
8
    public CarSerieEvent(CarSeriesEntity carSeriesEntity) {
9
        this.carSeriesEntity = carSeriesEntity;
10
    }
11
12
    public CarSeriesEntity getCarSeriesEntity() {
13
        return carSeriesEntity;
14
    }
15
16
    public void setCarSeriesEntity(CarSeriesEntity carSeriesEntity) {
17
        this.carSeriesEntity = carSeriesEntity;
18
    }
19
}

+ 12 - 0
app/src/main/java/com/electric/chargingpile/util/DensityUtil.java

@ -28,4 +28,16 @@ public class DensityUtil {
28 28
        final float scale = context.getResources().getDisplayMetrics().density;
29 29
        return (int) (pxValue / scale + 0.5f);
30 30
    }
31

32
    /**
33
     * 将sp值转换为px值,保证文字大小不变
34
     *
35
     * @param spValue fontScale(DisplayMetrics类中属性scaledDensity)
36
     * @return
37
     */
38
    public static int sp2px(Context context, float spValue) {
39
        final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
40
        return (int) (spValue * fontScale + 0.5f);
41
    }
42

31 43
}

+ 154 - 0
app/src/main/java/com/electric/chargingpile/view/LetterSideView.java

@ -0,0 +1,154 @@
1
package com.electric.chargingpile.view;
2
3
import android.content.Context;
4
import android.graphics.Canvas;
5
import android.graphics.Color;
6
import android.graphics.Paint;
7
import android.graphics.Rect;
8
import android.util.AttributeSet;
9
import android.view.MotionEvent;
10
import android.view.View;
11
import android.widget.TextView;
12
13
import com.electric.chargingpile.util.DensityUtil;
14
15
public class LetterSideView extends View {
16
    // 26个字母
17
    public static String[] letters = {
18
            "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
19
            "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "#"
20
    };
21
    private int choose = -1;  // 选中的字母的y坐标
22
    private int chosen = -1;
23
    private Paint paint = new Paint(); // 字母画笔
24
    private Paint circle = new Paint(); // 选中字符背景
25
    private TextView mTextDialog;  // 显示当前字母的文本框
26
    private int singleHeight;      // 一个字母的空间
27
    Rect rect = new Rect();     // 存放文字的高度
28
29
    public LetterSideView(Context context, AttributeSet attrs) {
30
        super(context, attrs);
31
    }
32
33
    @Override
34
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
35
        super.onLayout(changed, left, top, right, bottom);
36
        paint.setAntiAlias(true); // 设置抗锯齿
37
        paint.setTextSize(DensityUtil.sp2px(getContext(), 12f)); // 设置字母字体大小为12sp
38
        paint.getTextBounds("A", 0, 1, rect);  // 获取一个字母实际的宽高到rect
39
        singleHeight = (getHeight() - (getPaddingTop() + getPaddingBottom())) / letters.length;   // 获取一个字母的空间
40
41
        circle.setAntiAlias(true); // 设置抗锯齿
42
        circle.setColor(Color.parseColor("#C1CCD5"));
43
    }
44
45
    /**
46
     * 为SideBar设置显示字母的TextView
47
     *
48
     * @param mTextDialog 在activity传递过来的textView
49
     */
50
    public void setTextView(TextView mTextDialog) {
51
        this.mTextDialog = mTextDialog;
52
    }
53
54
    public void setPosition(int position) {
55
        chosen = position;
56
        invalidate();
57
    }
58
59
    /**
60
     * 绘制
61
     */
62
    @Override
63
    protected void onDraw(Canvas canvas) {
64
        super.onDraw(canvas);
65
        // 循环绘制字母
66
        for (int i = 0; i < letters.length; i++) {
67
            //paint.setTypeface(Typeface.DEFAULT_BOLD); // 设置默认字体加粗
68
69
70
            // 选中的状态
71
            if (i == chosen) {
72
                paint.setColor(Color.parseColor("#FFFFFF")); // 选中的字母改变颜色
73
                paint.setFakeBoldText(true); // 设置字体为粗体
74
                float yPos = getPaddingTop() + singleHeight * i + rect.height() / 2f;
75
                canvas.drawCircle(getWidth() / 2f, yPos, getWidth() * 0.35f, circle);
76
            } else {
77
                paint.setColor(Color.parseColor("#6F6F7D")); // 设置字体颜色
78
                paint.setFakeBoldText(false); // 设置字体为正常
79
            }
80
81
            // x坐标等于中间-字符宽度的一半.
82
            float xPos = getWidth() / 2 - paint.measureText(letters[i]) / 2;
83
            // Y轴坐标
84
            float yPos = getPaddingTop() + singleHeight * i + rect.height();
85
            canvas.drawText(letters[i], xPos, yPos, paint); // 绘制字母
86
        }
87
    }
88
89
    /**
90
     * 分发触摸事件
91
     *
92
     * @param event
93
     * @return
94
     */
95
    @Override
96
    public boolean dispatchTouchEvent(MotionEvent event) {
97
        final int action = event.getAction();
98
        final float y = event.getY(); // 点击y坐标
99
        chosen = choose;  // 上一个选中的字母
100
        // 点击y坐标所占总高度的比例  *   数组的长度就等于点击了 数组中的位置.
101
        final int c = (int) (y / (getHeight() - getPaddingTop() - getPaddingBottom()) * letters.length);
102
        switch (action) {
103
            case MotionEvent.ACTION_UP:
104
                //抬起来的时候设置背景为透明
105
                //setBackgroundDrawable(new ColorDrawable(0x00000000));
106
                choose = -1;
107
                invalidate();
108
                if (mTextDialog != null) {
109
                    mTextDialog.setVisibility(View.INVISIBLE);
110
                }
111
                break;
112
            default:
113
                //按下,滑动的时候设置背景为灰色
114
                //setBackgroundDrawable(new ColorDrawable(0x44000000));
115
                //setBackgroundResource(R.drawable.sidebar_background);
116
                if (chosen != c) { // 判断选中字母是否发生改变
117
                    if (c >= 0 && c < letters.length) {
118
                        if (listener != null) {
119
                            listener.onTouchLetterChanged(letters[c]);
120
                            listener.onTouchLetterPosition(c);
121
                        }
122
                        if (mTextDialog != null) {
123
                            mTextDialog.setText(letters[c]);
124
                            mTextDialog.setVisibility(View.VISIBLE);
125
                        }
126
                        // 设置选中字母在数组的位置
127
                        choose = c;
128
                        chosen = choose;
129
                        invalidate();
130
                    }
131
                }
132
                break;
133
        }
134
        return true;
135
    }
136
137
    // 触摸回调接口
138
    private OnTouchLetterChangedListener listener;
139
140
141
    public void setOnTouchLetterChangedListener(OnTouchLetterChangedListener onTouchLetterChangedListener) {
142
        this.listener = onTouchLetterChangedListener;
143
    }
144
145
    public interface OnTouchLetterChangedListener {
146
        /**
147
         * 触摸字母回调
148
         *
149
         * @param s 触摸的字符
150
         */
151
        void onTouchLetterChanged(String s);
152
        void onTouchLetterPosition(int position);
153
    }
154
}

+ 92 - 0
app/src/main/java/com/electric/chargingpile/view/TextImageView.java

@ -0,0 +1,92 @@
1
package com.electric.chargingpile.view;
2
3
import android.content.Context;
4
import android.content.res.TypedArray;
5
import android.graphics.Rect;
6
import android.graphics.drawable.Drawable;
7
import android.util.AttributeSet;
8
9
import androidx.appcompat.widget.AppCompatTextView;
10
11
import com.electric.chargingpile.R;
12
13
public class TextImageView extends AppCompatTextView {
14
    private int leftWidth;
15
    private int leftHeight;
16
    private int topWidth;
17
    private int topHeight;
18
    private int rightWidth;
19
    private int rightHeight;
20
    private int bottomWidth;
21
    private int bottomHeight;
22
23
24
    public TextImageView(Context context) {
25
        super(context);
26
    }
27
28
    public TextImageView(Context context, AttributeSet attrs) {
29
        super(context, attrs);
30
        init(context, attrs);
31
    }
32
33
    public TextImageView(Context context, AttributeSet attrs, int defStyleAttr) {
34
        super(context, attrs, defStyleAttr);
35
        init(context, attrs);
36
    }
37
38
    private void init(Context context, AttributeSet attrs) {
39
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TextImageView);
40
        leftWidth = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableLeftWidth, 0);
41
        leftHeight = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableLeftHeight, 0);
42
        topWidth = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableTopWidth, 0);
43
        topHeight = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableTopHeight, 0);
44
        rightWidth = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableRightWidth, 0);
45
        rightHeight = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableRightHeight, 0);
46
        bottomWidth = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableBottomWidth, 0);
47
        bottomHeight = typedArray.getDimensionPixelOffset(R.styleable.TextImageView_drawableBottomHeight, 0);
48
        typedArray.recycle();
49
        setDrawablesSize();
50
    }
51
52
    private void setDrawablesSize() {
53
        Drawable[] compoundDrawables = getCompoundDrawables();
54
        for (int i = 0; i < compoundDrawables.length; i++) {
55
            switch (i) {
56
                case 0:
57
                    setDrawableBounds(compoundDrawables[0], leftWidth, leftHeight);
58
                    break;
59
                case 1:
60
                    setDrawableBounds(compoundDrawables[1], topWidth, topHeight);
61
                    break;
62
                case 2:
63
                    setDrawableBounds(compoundDrawables[2], rightWidth, rightHeight);
64
                    break;
65
                case 3:
66
                    setDrawableBounds(compoundDrawables[3], bottomWidth, bottomHeight);
67
                    break;
68
                default:
69
                    break;
70
            }
71
        }
72
        setCompoundDrawables(compoundDrawables[0], compoundDrawables[1], compoundDrawables[2], compoundDrawables[3]);
73
    }
74
75
    private void setDrawableBounds(Drawable drawable, int width, int height) {
76
        if (drawable != null) {
77
            double scale = ((double) drawable.getIntrinsicHeight()) / ((double) drawable.getIntrinsicWidth());
78
            drawable.setBounds(0, 0, width, height);
79
            Rect bounds = drawable.getBounds();
80
            // 高宽只给一个值时,自适应
81
            if (bounds.right != 0 | bounds.bottom != 0) {
82
                bounds.right = (int) (bounds.bottom / scale);
83
                drawable.setBounds(bounds);
84
            }
85
            if (bounds.bottom == 0) {
86
                bounds.bottom = (int) (bounds.right * scale);
87
                drawable.setBounds(bounds);
88
            }
89
        }
90
    }
91
92
}

BIN
app/src/main/res/drawable-hdpi/icon_radio_normal.png


BIN
app/src/main/res/drawable-hdpi/icon_radio_selected.png


BIN
app/src/main/res/drawable-mdpi/icon_radio_normal.png


BIN
app/src/main/res/drawable-mdpi/icon_radio_selected.png


BIN
app/src/main/res/drawable-xhdpi/icon_radio_normal.png


BIN
app/src/main/res/drawable-xhdpi/icon_radio_selected.png


BIN
app/src/main/res/drawable-xxhdpi/icon_radio_normal.png


BIN
app/src/main/res/drawable-xxhdpi/icon_radio_selected.png


BIN
app/src/main/res/drawable-xxxhdpi/icon_radio_normal.png


BIN
app/src/main/res/drawable-xxxhdpi/icon_radio_selected.png


+ 8 - 0
app/src/main/res/drawable/bg_add_car_model_shape.xml

@ -0,0 +1,8 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:shape="rectangle">
4
    <corners android:radius="48dp" /> <!-- 圆角大小 -->
5
    <stroke
6
        android:width="1dp"
7
        android:color="#CFE5D6" /> <!-- 边框颜色 -->
8
</shape>

BIN
app/src/main/res/drawable/group_adapter_empty_view_image.png


+ 83 - 0
app/src/main/res/layout/activity_car_brand.xml

@ -0,0 +1,83 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="@color/white"
8
    tools:context=".activity.CarBrandActivity">
9
10
    <androidx.constraintlayout.widget.ConstraintLayout
11
        android:id="@+id/nav_bar"
12
        android:layout_width="match_parent"
13
        android:layout_height="44dp"
14
        app:layout_constraintTop_toTopOf="parent">
15
16
        <TextView
17
            android:id="@+id/nav_title"
18
            android:layout_width="match_parent"
19
            android:layout_height="match_parent"
20
            android:gravity="center"
21
            android:text="品牌"
22
            android:textColor="#444444"
23
            android:textSize="18sp" />
24
25
        <ImageView
26
            android:id="@+id/iv_back"
27
            android:layout_width="wrap_content"
28
            android:layout_height="match_parent"
29
            android:layout_alignParentLeft="true"
30
            android:layout_centerVertical="true"
31
            android:contentDescription="@null"
32
            android:paddingLeft="15dp"
33
            android:paddingRight="15dp"
34
            android:src="@drawable/icon_lvback1119"
35
            app:layout_constraintLeft_toLeftOf="parent" />
36
37
        <View
38
            android:layout_width="match_parent"
39
            android:layout_height="0.5dp"
40
            android:background="@color/ui_titleline"
41
            app:layout_constraintBottom_toBottomOf="parent" />
42
    </androidx.constraintlayout.widget.ConstraintLayout>
43
44
    <com.donkingliang.groupedadapter.widget.StickyHeaderLayout
45
        android:id="@+id/sticky_header_layout"
46
        android:layout_width="match_parent"
47
        android:layout_height="0dp"
48
        app:layout_constraintBottom_toBottomOf="parent"
49
        app:layout_constraintTop_toBottomOf="@+id/nav_bar">
50
51
        <androidx.recyclerview.widget.RecyclerView
52
            android:id="@+id/recycler_view"
53
            android:layout_width="match_parent"
54
            android:layout_height="match_parent" />
55
    </com.donkingliang.groupedadapter.widget.StickyHeaderLayout>
56
57
    <com.electric.chargingpile.view.LetterSideView
58
        android:id="@+id/letter_side_view"
59
        android:layout_width="30dp"
60
        android:layout_height="0dp"
61
        android:background="#F8FBFE"
62
        android:paddingTop="25dp"
63
        android:paddingBottom="25dp"
64
        android:visibility="gone"
65
        app:layout_constraintBottom_toBottomOf="parent"
66
        app:layout_constraintRight_toRightOf="parent"
67
        app:layout_constraintTop_toBottomOf="@+id/nav_bar"
68
        tools:visibility="visible" />
69
70
    <TextView
71
        android:id="@+id/text_view_dialog"
72
        android:layout_width="match_parent"
73
        android:layout_height="0dp"
74
        android:gravity="center"
75
        android:textColor="#CCCCCC"
76
        android:textSize="40sp"
77
        android:visibility="gone"
78
        app:layout_constraintBottom_toBottomOf="parent"
79
        app:layout_constraintTop_toBottomOf="@+id/nav_bar"
80
        tools:text="X"
81
        tools:visibility="visible" />
82
83
</androidx.constraintlayout.widget.ConstraintLayout>

+ 57 - 0
app/src/main/res/layout/activity_car_model.xml

@ -0,0 +1,57 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="@color/white"
8
    tools:context=".activity.CarModelActivity">
9
10
    <androidx.constraintlayout.widget.ConstraintLayout
11
        android:id="@+id/nav_bar"
12
        android:layout_width="match_parent"
13
        android:layout_height="44dp"
14
        app:layout_constraintTop_toTopOf="parent">
15
16
        <TextView
17
            android:id="@+id/nav_title"
18
            android:layout_width="match_parent"
19
            android:layout_height="match_parent"
20
            android:gravity="center"
21
            android:text="车型"
22
            android:textColor="#444444"
23
            android:textSize="18sp" />
24
25
        <ImageView
26
            android:id="@+id/iv_back"
27
            android:layout_width="wrap_content"
28
            android:layout_height="match_parent"
29
            android:layout_alignParentLeft="true"
30
            android:layout_centerVertical="true"
31
            android:contentDescription="@null"
32
            android:paddingLeft="15dp"
33
            android:paddingRight="15dp"
34
            android:src="@drawable/icon_lvback1119"
35
            app:layout_constraintLeft_toLeftOf="parent" />
36
37
        <View
38
            android:layout_width="match_parent"
39
            android:layout_height="0.5dp"
40
            android:background="@color/ui_titleline"
41
            app:layout_constraintBottom_toBottomOf="parent" />
42
    </androidx.constraintlayout.widget.ConstraintLayout>
43
44
    <com.donkingliang.groupedadapter.widget.StickyHeaderLayout
45
        android:id="@+id/sticky_header_layout"
46
        android:layout_width="match_parent"
47
        android:layout_height="0dp"
48
        android:background="#FFF2F6F9"
49
        app:layout_constraintBottom_toBottomOf="parent"
50
        app:layout_constraintTop_toBottomOf="@+id/nav_bar">
51
52
        <androidx.recyclerview.widget.RecyclerView
53
            android:id="@+id/recycler_view"
54
            android:layout_width="match_parent"
55
            android:layout_height="match_parent" />
56
    </com.donkingliang.groupedadapter.widget.StickyHeaderLayout>
57
</androidx.constraintlayout.widget.ConstraintLayout>

+ 363 - 0
app/src/main/res/layout/activity_car_owner_certificate.xml

@ -0,0 +1,363 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="@color/white"
8
    android:focusableInTouchMode="true"
9
    tools:context=".activity.CarOwnerCertificateActivity">
10
11
    <androidx.constraintlayout.widget.ConstraintLayout
12
        android:id="@+id/nav_bar"
13
        android:layout_width="match_parent"
14
        android:layout_height="44dp"
15
        app:layout_constraintTop_toTopOf="parent">
16
17
        <TextView
18
            android:id="@+id/nav_title"
19
            android:layout_width="match_parent"
20
            android:layout_height="match_parent"
21
            android:gravity="center"
22
            android:text="车主认证"
23
            android:textColor="#444444"
24
            android:textSize="18sp" />
25
26
        <ImageView
27
            android:id="@+id/iv_back"
28
            android:layout_width="wrap_content"
29
            android:layout_height="match_parent"
30
            android:layout_alignParentLeft="true"
31
            android:layout_centerVertical="true"
32
            android:contentDescription="@null"
33
            android:paddingLeft="15dp"
34
            android:paddingRight="15dp"
35
            android:src="@drawable/icon_lvback1119"
36
            app:layout_constraintLeft_toLeftOf="parent" />
37
38
        <View
39
            android:layout_width="match_parent"
40
            android:layout_height="0.5dp"
41
            android:background="@color/ui_titleline"
42
            app:layout_constraintBottom_toBottomOf="parent" />
43
    </androidx.constraintlayout.widget.ConstraintLayout>
44
45
    <ScrollView
46
        android:layout_width="match_parent"
47
        android:layout_height="0dp"
48
        android:orientation="vertical"
49
        android:scrollbars="none"
50
        app:layout_constraintBottom_toTopOf="@+id/submit_btn"
51
        app:layout_constraintTop_toBottomOf="@+id/nav_bar">
52
53
        <androidx.constraintlayout.widget.ConstraintLayout
54
            android:layout_width="match_parent"
55
            android:layout_height="wrap_content"
56
            android:paddingLeft="15dp"
57
            android:paddingRight="15dp">
58
59
            <!-- 车型 -->
60
            <androidx.constraintlayout.widget.ConstraintLayout
61
                android:id="@+id/car_model_constraint_layout"
62
                android:layout_width="match_parent"
63
                android:layout_height="0dp"
64
                android:layout_marginTop="15dp"
65
                app:layout_constraintDimensionRatio="h,518:95"
66
                app:layout_constraintTop_toTopOf="parent">
67
68
                <ImageView
69
                    android:id="@+id/add_car_model_icon"
70
                    android:layout_width="match_parent"
71
                    android:layout_height="match_parent"
72
                    android:scaleType="fitXY"
73
                    android:src="@drawable/icon_car_model"
74
                    app:layout_constraintBottom_toBottomOf="parent"
75
                    app:layout_constraintTop_toTopOf="parent" />
76
77
                <TextView
78
                    android:id="@+id/add_car_model_btn"
79
                    android:layout_width="80dp"
80
                    android:layout_height="32dp"
81
                    android:layout_marginRight="15dp"
82
                    android:background="@drawable/bg_add_car_model_shape"
83
                    android:gravity="center"
84
                    android:text="添加车型"
85
                    android:textColor="#506857"
86
                    android:textSize="14sp"
87
                    app:layout_constraintBottom_toBottomOf="parent"
88
                    app:layout_constraintRight_toRightOf="parent"
89
                    app:layout_constraintTop_toTopOf="parent" />
90
            </androidx.constraintlayout.widget.ConstraintLayout>
91
92
            <androidx.constraintlayout.widget.ConstraintLayout
93
                android:id="@+id/car_model_selected_constraint_layout"
94
                android:layout_width="match_parent"
95
                android:layout_height="wrap_content"
96
                android:layout_marginTop="15dp"
97
                android:background="@color/white"
98
                android:visibility="gone"
99
                app:layout_constraintTop_toBottomOf="@+id/car_model_constraint_layout"
100
                tools:background="#cccccc"
101
                tools:visibility="visible">
102
103
                <ImageView
104
                    android:id="@+id/car_icon"
105
                    android:layout_width="95dp"
106
                    android:layout_height="63dp"
107
                    android:scaleType="fitCenter"
108
                    app:layout_constraintBottom_toBottomOf="parent"
109
                    app:layout_constraintLeft_toLeftOf="parent"
110
                    app:layout_constraintTop_toTopOf="parent"
111
                    tools:background="#00ff00" />
112
113
                <TextView
114
                    android:id="@+id/car_name"
115
                    android:layout_width="wrap_content"
116
                    android:layout_height="wrap_content"
117
                    android:layout_marginLeft="10dp"
118
                    android:layout_marginTop="12dp"
119
                    android:textColor="#FF222222"
120
                    android:textSize="14sp"
121
                    app:layout_constraintLeft_toRightOf="@+id/car_icon"
122
                    app:layout_constraintTop_toTopOf="parent"
123
                    tools:text="蔚来ES6" />
124
125
                <TextView
126
                    android:id="@+id/car_series"
127
                    android:layout_width="wrap_content"
128
                    android:layout_height="wrap_content"
129
                    android:layout_marginBottom="10dp"
130
                    android:textColor="#FF0D1120"
131
                    android:textSize="14sp"
132
                    app:layout_constraintBottom_toBottomOf="parent"
133
                    app:layout_constraintLeft_toLeftOf="@+id/car_name"
134
135
                    tools:text="2020款 420KM 运动版" />
136
137
                <ImageView
138
                    android:layout_width="wrap_content"
139
                    android:layout_height="wrap_content"
140
                    android:src="@drawable/icon_right_cursor"
141
                    app:layout_constraintBottom_toBottomOf="parent"
142
                    app:layout_constraintRight_toRightOf="parent"
143
                    app:layout_constraintTop_toTopOf="parent" />
144
145
146
            </androidx.constraintlayout.widget.ConstraintLayout>
147
148
149
            <!-- 行驶证图片 -->
150
            <androidx.constraintlayout.widget.ConstraintLayout
151
                android:id="@+id/driving_license"
152
                android:layout_width="match_parent"
153
                android:layout_height="0dp"
154
                android:layout_marginTop="10dp"
155
                app:layout_constraintDimensionRatio="h,518:315"
156
                app:layout_constraintTop_toBottomOf="@+id/car_model_selected_constraint_layout">
157
158
                <ImageView
159
                    android:id="@+id/driving_license_icon"
160
                    android:layout_width="match_parent"
161
                    android:layout_height="match_parent"
162
                    android:src="@drawable/icon_driving_license" />
163
164
                <TextView
165
                    android:id="@+id/driving_license_text_view"
166
                    android:layout_width="wrap_content"
167
                    android:layout_height="wrap_content"
168
                    android:text="上传行驶证首页(选填)"
169
                    android:textColor="#3D5545"
170
                    android:textSize="14sp"
171
                    app:layout_constraintBottom_toBottomOf="parent"
172
                    app:layout_constraintLeft_toLeftOf="parent"
173
                    app:layout_constraintRight_toRightOf="parent"
174
                    app:layout_constraintTop_toTopOf="parent" />
175
176
                <ImageView
177
                    android:id="@+id/driving_license_upload_icon"
178
                    android:layout_width="wrap_content"
179
                    android:layout_height="wrap_content"
180
                    android:layout_marginBottom="5dp"
181
                    android:src="@drawable/icon_upload"
182
                    app:layout_constraintBottom_toTopOf="@+id/driving_license_text_view"
183
                    app:layout_constraintLeft_toLeftOf="parent"
184
                    app:layout_constraintRight_toRightOf="parent" />
185
186
            </androidx.constraintlayout.widget.ConstraintLayout>
187
188
            <!-- 行驶证信息 -->
189
            <LinearLayout
190
                android:id="@+id/driving_license_info"
191
                android:layout_width="match_parent"
192
                android:layout_height="wrap_content"
193
                android:layout_marginTop="5dp"
194
                android:layout_marginBottom="50dp"
195
                android:orientation="vertical"
196
                app:layout_constraintTop_toBottomOf="@+id/driving_license">
197
198
                <LinearLayout
199
                    android:layout_width="match_parent"
200
                    android:layout_height="50dp"
201
                    android:gravity="center_vertical"
202
                    android:orientation="horizontal">
203
204
                    <TextView
205
                        android:layout_width="90dp"
206
                        android:layout_height="wrap_content"
207
                        android:text="* 车牌号"
208
                        android:textColor="#0D1120"
209
                        android:textSize="14sp"
210
                        android:textStyle="bold" />
211
212
                    <EditText
213
                        android:layout_width="0dp"
214
                        android:layout_height="match_parent"
215
                        android:layout_weight="1"
216
                        android:background="@null"
217
                        android:hint="请输入正确的车牌号"
218
                        android:inputType="text"
219
                        android:textColor="#0D1120"
220
                        android:textColorHint="#CBCBCB"
221
                        android:textSize="14sp" />
222
                </LinearLayout>
223
224
                <View
225
                    android:layout_width="match_parent"
226
                    android:layout_height="1dp"
227
                    android:background="#F8F8F8" />
228
229
                <LinearLayout
230
                    android:layout_width="match_parent"
231
                    android:layout_height="50dp"
232
                    android:gravity="center_vertical"
233
                    android:orientation="horizontal">
234
235
                    <TextView
236
                        android:layout_width="90dp"
237
                        android:layout_height="wrap_content"
238
                        android:text="* 发动机号"
239
                        android:textColor="#0D1120"
240
                        android:textSize="14sp"
241
                        android:textStyle="bold" />
242
243
                    <EditText
244
                        android:layout_width="0dp"
245
                        android:layout_height="match_parent"
246
                        android:layout_weight="1"
247
                        android:background="@null"
248
                        android:hint="请输入发动机号"
249
                        android:inputType="text"
250
                        android:textColor="#0D1120"
251
                        android:textColorHint="#CBCBCB"
252
                        android:textSize="14sp" />
253
                </LinearLayout>
254
255
                <View
256
                    android:layout_width="match_parent"
257
                    android:layout_height="1dp"
258
                    android:background="#F8F8F8" />
259
260
                <LinearLayout
261
                    android:layout_width="match_parent"
262
                    android:layout_height="50dp"
263
                    android:gravity="center_vertical"
264
                    android:orientation="horizontal">
265
266
                    <TextView
267
                        android:layout_width="90dp"
268
                        android:layout_height="wrap_content"
269
                        android:text="注册时间"
270
                        android:textColor="#0D1120"
271
                        android:textSize="14sp"
272
                        android:textStyle="bold" />
273
274
                    <EditText
275
                        android:layout_width="0dp"
276
                        android:layout_height="match_parent"
277
                        android:layout_weight="1"
278
                        android:background="@null"
279
                        android:hint="请输入有效日期"
280
                        android:inputType="text"
281
                        android:textColor="#0D1120"
282
                        android:textColorHint="#CBCBCB"
283
                        android:textSize="14sp" />
284
                </LinearLayout>
285
286
                <View
287
                    android:layout_width="match_parent"
288
                    android:layout_height="1dp"
289
                    android:background="#F8F8F8" />
290
            </LinearLayout>
291
            <!-- 行驶证类型 -->
292
            <LinearLayout
293
                android:id="@+id/driving_license_type"
294
                android:layout_width="match_parent"
295
                android:layout_height="50dp"
296
                android:layout_marginTop="10dp"
297
                android:gravity="center_vertical"
298
                android:orientation="horizontal"
299
                app:layout_constraintTop_toBottomOf="@+id/driving_license_info">
300
301
                <com.electric.chargingpile.view.TextImageView
302
                    android:id="@+id/driving_license_type_first"
303
                    android:layout_width="wrap_content"
304
                    android:layout_height="match_parent"
305
                    android:drawableLeft="@drawable/icon_radio_selected"
306
                    android:drawablePadding="10dp"
307
                    android:gravity="center_vertical"
308
                    android:paddingRight="40dp"
309
                    android:text="自用"
310
                    app:drawableLeftHeight="17dp"
311
                    app:drawableLeftWidth="17dp" />
312
313
                <com.electric.chargingpile.view.TextImageView
314
                    android:id="@+id/driving_license_type_second"
315
                    android:layout_width="wrap_content"
316
                    android:layout_height="match_parent"
317
                    android:drawableLeft="@drawable/icon_radio_normal"
318
                    android:drawablePadding="10dp"
319
                    android:gravity="center_vertical"
320
                    android:paddingRight="40dp"
321
                    android:text="营运"
322
                    app:drawableLeftHeight="17dp"
323
                    app:drawableLeftWidth="17dp" />
324
325
326
                <com.electric.chargingpile.view.TextImageView
327
                    android:id="@+id/driving_license_type_third"
328
                    android:layout_width="wrap_content"
329
                    android:layout_height="match_parent"
330
                    android:drawableLeft="@drawable/icon_radio_normal"
331
                    android:drawablePadding="10dp"
332
                    android:gravity="center_vertical"
333
                    android:paddingRight="40dp"
334
                    android:text="公务"
335
                    app:drawableLeftHeight="17dp"
336
                    app:drawableLeftWidth="17dp" />
337
338
            </LinearLayout>
339
            <!-- 认证说明信息 -->
340
            <TextView
341
                android:layout_width="match_parent"
342
                android:layout_height="wrap_content"
343
                android:layout_marginTop="10dp"
344
                android:layout_marginBottom="30dp"
345
                android:text="认证说明\n\n1.车型信息和行驶证主页为必填项;\n2.最多可认证三款车型;\n3.默认首款认证车型为主车型;\n4.上传行驶证详细页面,并保证所有信息清晰;\n5.认证成功的首个车型可获得50元充电红包。"
346
                android:textColor="#0D1120"
347
                android:textSize="14sp"
348
                app:layout_constraintBottom_toBottomOf="parent"
349
                app:layout_constraintTop_toBottomOf="@+id/driving_license_type" />
350
        </androidx.constraintlayout.widget.ConstraintLayout>
351
    </ScrollView>
352
353
    <Button
354
        android:id="@+id/submit_btn"
355
        android:layout_width="match_parent"
356
        android:layout_height="44dp"
357
        android:background="#00CA42"
358
        android:text="确认提交"
359
        android:textColor="#ffffff"
360
        android:textSize="16sp"
361
        app:layout_constraintBottom_toBottomOf="parent" />
362
363
</androidx.constraintlayout.widget.ConstraintLayout>

+ 81 - 0
app/src/main/res/layout/activity_user_center.xml

@ -479,6 +479,87 @@
479 479
                        android:layout_width="match_parent"
480 480
                        android:layout_height="0.5dp"
481 481
                        android:background="@color/ui_line" />
482
                    <RelativeLayout
483
                        android:id="@+id/rl_car_owner_certificate"
484
                        android:layout_width="fill_parent"
485
                        android:layout_height="44dp"
486
                        android:background="@drawable/item_selector">
487
488
                        <TextView
489
                            android:layout_width="wrap_content"
490
                            android:layout_height="wrap_content"
491
                            android:layout_alignParentStart="true"
492
                            android:layout_alignParentLeft="true"
493
                            android:layout_alignParentTop="true"
494
                            android:layout_alignParentBottom="true"
495
                            android:layout_marginLeft="15dp"
496
                            android:drawableLeft="@drawable/icon_car_user_certificate"
497
                            android:drawablePadding="15dp"
498
                            android:gravity="center_vertical"
499
                            android:text="车主认证"
500
                            android:textColor="@color/ui_62"
501
                            android:textSize="15sp" />
502
503
                        <TextView
504
                            android:layout_width="wrap_content"
505
                            android:layout_height="wrap_content"
506
                            android:layout_alignParentTop="true"
507
                            android:layout_alignParentRight="true"
508
                            android:layout_alignParentBottom="true"
509
                            android:layout_marginRight="15dp"
510
                            android:drawableRight="@drawable/icon_more2_0"
511
                            android:drawablePadding="30px"
512
                            android:gravity="center_vertical"
513
                            android:text=""
514
                            android:textColor="@color/ui_68"
515
                            android:textSize="14sp" />
516
                    </RelativeLayout>
517
                    <View
518
                        android:layout_width="match_parent"
519
                        android:layout_height="0.5dp"
520
                        android:layout_marginLeft="16dp"
521
                        android:background="@color/ui_line" />
522
523
                    <RelativeLayout
524
                        android:id="@+id/rl_publish_price"
525
                        android:layout_width="fill_parent"
526
                        android:layout_height="44dp"
527
                        android:background="@drawable/item_selector">
528
529
                        <TextView
530
                            android:layout_width="wrap_content"
531
                            android:layout_height="wrap_content"
532
                            android:layout_alignParentStart="true"
533
                            android:layout_alignParentLeft="true"
534
                            android:layout_alignParentTop="true"
535
                            android:layout_alignParentBottom="true"
536
                            android:layout_marginLeft="15dp"
537
                            android:drawableLeft="@drawable/icon_publish_price"
538
                            android:drawablePadding="15dp"
539
                            android:gravity="center_vertical"
540
                            android:text="发表成交价"
541
                            android:textColor="@color/ui_62"
542
                            android:textSize="15sp" />
543
544
                        <TextView
545
                            android:layout_width="wrap_content"
546
                            android:layout_height="wrap_content"
547
                            android:layout_alignParentTop="true"
548
                            android:layout_alignParentRight="true"
549
                            android:layout_alignParentBottom="true"
550
                            android:layout_marginRight="15dp"
551
                            android:drawableRight="@drawable/icon_more2_0"
552
                            android:drawablePadding="30px"
553
                            android:gravity="center_vertical"
554
                            android:text=""
555
                            android:textColor="@color/ui_68"
556
                            android:textSize="14sp" />
557
                    </RelativeLayout>
558
                    <View
559
                        android:layout_width="match_parent"
560
                        android:layout_height="0.5dp"
561
                        android:layout_marginLeft="16dp"
562
                        android:background="@color/ui_line" />
482 563
483 564
                    <RelativeLayout
484 565
                        android:id="@+id/rl_chongzhi"

+ 42 - 0
app/src/main/res/layout/adapter_child_car_brand.xml

@ -0,0 +1,42 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="55dp"
7
    android:orientation="vertical"
8
    android:paddingLeft="15dp"
9
    android:background="@color/white"
10
    tools:background="#cccccc">
11
12
    <View
13
        android:id="@+id/line"
14
        android:layout_width="match_parent"
15
        android:layout_height="1dp"
16
        android:background="#E6E6E6"
17
        app:layout_constraintTop_toTopOf="parent" />
18
19
    <ImageView
20
        android:id="@+id/icon"
21
        android:layout_width="40dp"
22
        android:layout_height="40dp"
23
        android:scaleType="fitCenter"
24
        app:layout_constraintBottom_toBottomOf="parent"
25
        app:layout_constraintLeft_toLeftOf="parent"
26
        app:layout_constraintTop_toTopOf="parent"
27
        tools:background="#00ff00" />
28
29
    <TextView
30
        android:id="@+id/title"
31
        android:layout_width="wrap_content"
32
        android:layout_height="wrap_content"
33
        android:layout_gravity="center_vertical"
34
        android:layout_marginLeft="10dp"
35
        android:textColor="#FF222222"
36
        android:textSize="14sp"
37
        app:layout_constraintBottom_toBottomOf="parent"
38
        app:layout_constraintLeft_toRightOf="@+id/icon"
39
        app:layout_constraintTop_toTopOf="parent"
40
        tools:text="奥迪" />
41
42
</androidx.constraintlayout.widget.ConstraintLayout>

+ 77 - 0
app/src/main/res/layout/adapter_child_car_model.xml

@ -0,0 +1,77 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="100dp"
7
    android:paddingLeft="15dp"
8
    android:background="@color/white"
9
    tools:background="#cccccc">
10
11
    <View
12
        android:id="@+id/line"
13
        android:layout_width="match_parent"
14
        android:layout_height="1dp"
15
        android:background="#E6E6E6"
16
        app:layout_constraintTop_toTopOf="parent" />
17
18
    <ImageView
19
        android:id="@+id/icon"
20
        android:layout_width="120dp"
21
        android:layout_height="80dp"
22
        android:scaleType="fitCenter"
23
        app:layout_constraintBottom_toBottomOf="parent"
24
        app:layout_constraintLeft_toLeftOf="parent"
25
        app:layout_constraintTop_toTopOf="parent"
26
        tools:background="#00ff00" />
27
28
    <TextView
29
        android:id="@+id/title"
30
        android:layout_width="wrap_content"
31
        android:layout_height="wrap_content"
32
        android:layout_gravity="center_vertical"
33
        android:layout_marginLeft="10dp"
34
        android:layout_marginTop="27dp"
35
        android:textColor="#FF222222"
36
        android:textSize="14sp"
37
        app:layout_constraintLeft_toRightOf="@+id/icon"
38
        app:layout_constraintTop_toTopOf="parent"
39
        tools:text="奥迪" />
40
41
    <LinearLayout
42
        android:layout_width="wrap_content"
43
        android:layout_height="wrap_content"
44
        android:layout_marginLeft="10dp"
45
        android:layout_marginBottom="28dp"
46
        android:orientation="horizontal"
47
        app:layout_constraintBottom_toBottomOf="parent"
48
        app:layout_constraintLeft_toRightOf="@+id/icon">
49
50
        <TextView
51
            android:layout_width="wrap_content"
52
            android:layout_height="wrap_content"
53
            android:textColor="#FFE02020"
54
            android:textSize="14sp"
55
            tools:text="33.8-52.3" />
56
57
        <TextView
58
            android:id="@+id/price"
59
            android:layout_width="wrap_content"
60
            android:layout_height="wrap_content"
61
            android:layout_gravity="center_vertical"
62
            android:layout_marginLeft="5dp"
63
            android:text="万"
64
            android:textColor="#FF222222"
65
            android:textSize="12sp" />
66
67
        <TextView
68
            android:id="@+id/endurance"
69
            android:layout_width="wrap_content"
70
            android:layout_height="wrap_content"
71
            android:layout_marginLeft="20dp"
72
            android:textColor="#FF222222"
73
            android:textSize="12sp"
74
            tools:text="续航:300km" />
75
    </LinearLayout>
76
77
</androidx.constraintlayout.widget.ConstraintLayout>

+ 19 - 0
app/src/main/res/layout/adapter_header_car_brand.xml

@ -0,0 +1,19 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:tools="http://schemas.android.com/tools"
4
    android:layout_width="match_parent"
5
    android:layout_height="25dp"
6
    android:background="#FFF2F6F9"
7
    android:paddingLeft="15dp"
8
    android:paddingRight="15dp">
9
    
10
    <TextView
11
        android:id="@+id/title"
12
        android:layout_width="match_parent"
13
        android:layout_height="match_parent"
14
        android:gravity="center_vertical"
15
        android:lines="1"
16
        android:textColor="#FF6F6F7D"
17
        android:textSize="12sp"
18
        tools:text="A" />
19
</LinearLayout>

+ 19 - 0
app/src/main/res/layout/adapter_header_car_model.xml

@ -0,0 +1,19 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:tools="http://schemas.android.com/tools"
4
    android:layout_width="match_parent"
5
    android:layout_height="25dp"
6
    android:background="#FFF2F6F9"
7
    android:paddingLeft="15dp"
8
    android:paddingRight="15dp">
9
    
10
    <TextView
11
        android:id="@+id/title"
12
        android:layout_width="match_parent"
13
        android:layout_height="match_parent"
14
        android:gravity="center_vertical"
15
        android:lines="1"
16
        android:textColor="#FF6F6F7D"
17
        android:textSize="12sp"
18
        tools:text="A" />
19
</LinearLayout>

+ 13 - 0
app/src/main/res/layout/group_adapter_default_empty_view.xml

@ -0,0 +1,13 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent"
5
    android:orientation="vertical">
6
7
    <ImageView
8
        android:layout_width="wrap_content"
9
        android:layout_height="wrap_content"
10
        android:layout_gravity="center"
11
        android:src="@drawable/group_adapter_empty_view_image"/>
12
13
</FrameLayout>

+ 5 - 0
app/src/main/res/values/strings.xml

@ -208,4 +208,9 @@
208 208
    <string name="personal_shar_info_content">快来分享吧\n小主大家都很期待你的精彩内容哦</string>
209 209
    <string name="query_all_addresses"><u>查看全部目的地</u></string>
210 210
    <string name="query_all_points"><u>查看全部站点</u></string>
211
212
    <item name="type_header" type="integer" />
213
    <item name="type_footer" type="integer" />
214
    <item name="type_child" type="integer" />
215
    <item name="type_empty" type="integer" />
211 216
</resources>

+ 11 - 0
app/src/main/res/values/styles.xml

@ -355,4 +355,15 @@
355 355
        <!--相册文件夹列表选中图标-->
356 356
        <item name="picture.folder_checked_dot">@drawable/picture_orange_oval</item>
357 357
    </style>
358

359
    <declare-styleable name="TextImageView">
360
        <attr name="drawableLeftWidth" format="dimension" />
361
        <attr name="drawableLeftHeight" format="dimension" />
362
        <attr name="drawableTopWidth" format="dimension" />
363
        <attr name="drawableTopHeight" format="dimension" />
364
        <attr name="drawableRightWidth" format="dimension" />
365
        <attr name="drawableRightHeight" format="dimension" />
366
        <attr name="drawableBottomWidth" format="dimension" />
367
        <attr name="drawableBottomHeight" format="dimension" />
368
    </declare-styleable>
358 369
</resources>

cdzApp - Gogs: Go Git Service

充电桩app代码

hy 86c28bdcb9 更换高德地图SDK以及so文件 %!s(int64=4) %!d(string=hace) años
..
AMap3DMap_8.1.0_AMapNavi_8.1.0_AMapSearch_8.1.0_AMapLocation_5.6.0_20211029.jar 86c28bdcb9 更换高德地图SDK以及so文件 %!s(int64=4) %!d(string=hace) años
Msc.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
ZBarDecoder.jar 06bd894653 init %!s(int64=7) %!d(string=hace) años
alipaySdk-15.6.8-20191021122514.aar 3f53132d2f 支付宝sdk更新 %!s(int64=6) %!d(string=hace) años
badgeview.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
bugly_crash_release_3.2.2.jar a90ec777b5 视频功能完成 %!s(int64=6) %!d(string=hace) años
commons-codec-1.6.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
commons-logging-1.1.3.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
fluent-hc-4.3.5.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
httpmime-4.3.5.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
mframework.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
picasso-2.5.2.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
pinyin4android1.0.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
pinyin4j-2.5.0.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
so注意事项.txt e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
universal-image-loader-1.9.1.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
wup-1.0.0.E-SNAPSHOT.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años
xUtils-2.6.14.jar e1cf244fe0 remove Useless dependence %!s(int64=7) %!d(string=hace) años