de class="language-java">import android.content.Context; 4 4
import android.view.View;
5 5
import android.widget.ImageView;
6
import android.widget.TextView;
6 7
7 8
import com.bumptech.glide.Glide;
8 9
import com.bumptech.glide.load.engine.DiskCacheStrategy;
@ -88,8 +89,10 @@ public class CarModelGroupedListAdapter extends GroupedRecyclerViewAdapter {
88 89
        } else {
89 90
            holder.setVisible(R.id.line, View.VISIBLE);
90 91
        }
91
        ImageView ster_picon = holder.getImageView(R.id.ster_picon);
92
        Glide.with(mContext).load(entity.getIcon()).placeholder(android.R.color.white).diskCacheStrategy(DiskCacheStrategy.RESOURCE).fitCenter().into(icon);
92
        ImageView master_pster_pic = holder.getImageView(R.id.master_pster_pic);
93
        final float scale = mContext.getResources().getDisplayMetrics().density;
94
        Glide.with(mContext).load(entity.getMasterPic()).placeholder(android.R.color.white).dontAnimate().override((int)(scale*120), (int)(scale*80)).diskCacheStrategy(DiskCacheStrategy.RESOURCE).fitCenter().into(master_pic);
95
        holder.setText(R.id.sale_price, entity.getSalePrice());
93 96
    }
94 97
95 98
}

+ 218 - 0
app/src/main/java/com/electric/chargingpile/adapter/CarOwnerCertificateListAdapter.java

@ -0,0 +1,218 @@
1
package com.electric.chargingpile.adapter;
2
3
import android.content.Context;
4
import android.graphics.Color;
5
import android.text.TextUtils;
6
import android.view.LayoutInflater;
7
import android.view.View;
8
import android.view.ViewGroup;
9
import android.widget.ImageView;
10
import android.widget.TextView;
11
import android.widget.Toast;
12
13
import androidx.annotation.NonNull;
14
import androidx.recyclerview.widget.RecyclerView;
15
16
import com.bumptech.glide.Glide;
17
import com.electric.chargingpile.R;
18
import com.electric.chargingpile.data.CarOwnerCertificateBean;
19
import com.electric.chargingpile.entity.CarSeriesEntity;
20
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
21
import com.electric.chargingpile.util.DateUtils;
22
import com.electric.chargingpile.util.ToastUtil;
23
import com.electric.chargingpile.view.AlertDialogTwo;
24
import com.google.gson.Gson;
25
26
import java.text.SimpleDateFormat;
27
import java.util.ArrayList;
28
import java.util.Date;
29
import java.util.List;
30
31
public class CarOwnerCertificateListAdapter extends RecyclerView.Adapter<CarOwnerCertificateListAdapter.CarOwnerCertificateListHolder> {
32
    private Context mContext;
33
    private List<CarOwnerCertificateBean> mList = new ArrayList<>();
34
35
    public CarOwnerCertificateListAdapter(Context c, List<CarOwnerCertificateBean> list) {
36
        mContext = c;
37
        mList.addAll(list);
38
    }
39
40
    @NonNull
41
    @Override
42
    public CarOwnerCertificateListHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
43
        View view = LayoutInflater.from(mContext).inflate(R.layout.item_car_owner_certificate, null);
44
        return new CarOwnerCertificateListAdapter.CarOwnerCertificateListHolder(view);
45
    }
46
47
    @Override
48
    public void onBindViewHolder(@NonNull CarOwnerCertificateListHolder holder, int position) {
49
        CarOwnerCertificateBean bean = mList.get(position);
50
        Gson gson = new Gson();
51
        CarSeriesEntity carSeriesEntity = gson.fromJson(bean.getChexing(), CarSeriesEntity.class);
52
//        Glide.with(mContext).load(carSeriesEntity.getIcon()).into(holder.master_pic);
53
//        Picasso.with(mContext).load(carSeriesEntity.getMasterPic()).into(holder.master_pic);
54
        holder.name.setText(carSeriesEntity.getCompanyName());
55
        holder.detail_name.setText(carSeriesEntity.getSeriesName());
56
57
        holder.main.setVisibility(View.GONE);
58
        holder.set_main.setVisibility(View.GONE);
59
        holder.left_line.setVisibility(View.GONE);
60
        holder.right_line.setVisibility(View.GONE);
61
        holder.delete.setVisibility(View.GONE);
62
        holder.edit.setVisibility(View.GONE);
63
64
        if (bean.getStatus() == 0) {
65
            holder.status.setText("审核中");
66
            holder.status.setTextColor(Color.parseColor("#9393A5"));
67
            holder.failure_reason.setVisibility(View.GONE);
68
69
        } else if (bean.getStatus() == 1) {
70
            holder.status.setText("认证成功");
71
            holder.status.setTextColor(Color.parseColor("#08A73C"));
72
            if (bean.getMain() == 1) {
73
                holder.main.setVisibility(View.VISIBLE);
74
            } else {
75
                holder.set_main.setVisibility(View.VISIBLE);
76
                holder.delete.setVisibility(View.VISIBLE);
77
                holder.edit.setVisibility(View.VISIBLE);
78
                holder.left_line.setVisibility(View.VISIBLE);
79
                holder.right_line.setVisibility(View.VISIBLE);
80
            }
81
            holder.failure_reason.setVisibility(View.GONE);
82
        } else if (bean.getStatus() == -1) {
83
            holder.status.setText("认证失败");
84
            holder.status.setTextColor(Color.parseColor("#E02020"));
85
            if (TextUtils.isEmpty(bean.getErrmsg())) {
86
                holder.failure_reason.setVisibility(View.GONE);
87
            } else {
88
                holder.failure_reason.setVisibility(View.VISIBLE);
89
                holder.failure_reason.setText("失败原因:" + bean.getErrmsg());
90
            }
91
            holder.delete.setVisibility(View.VISIBLE);
92
            holder.edit.setVisibility(View.VISIBLE);
93
            holder.left_line.setVisibility(View.VISIBLE);
94
        } else {
95
            holder.status.setText("");
96
            holder.failure_reason.setVisibility(View.GONE);
97
        }
98
99
        long addTime = DateUtils.getStringToDate(bean.getAddTime());
100
        Date d = new Date(addTime);
101
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM.dd");
102
        holder.add_time.setText(simpleDateFormat.format(d));
103
104
        holder.set_main.setOnClickListener(new View.OnClickListener() {
105
            @Override
106
            public void onClick(View v) {
107
                new AlertDialogTwo(mContext).builder()
108
                        .setMsg("是否设置为主车型" + carSeriesEntity.getSeriesName() + "?")
109
                        .setPositiveButton("是", new View.OnClickListener() {
110
                            @Override
111
                            public void onClick(View v) {
112
                                recyclerItemTypeClickListener.onItemClickListener(position, 3);
113
                            }
114
                        }).setNegativeButton("否", new View.OnClickListener() {
115
                    @Override
116
                    public void onClick(View v) {
117
                    }
118
                }).show();
119
            }
120
        });
121
122
        holder.delete.setOnClickListener(new View.OnClickListener() {
123
            @Override
124
            public void onClick(View v) {
125
                new AlertDialogTwo(mContext).builder()
126
                        .setMsg("是否删除" + carSeriesEntity.getSeriesName() + "?")
127
                        .setPositiveButton("是", new View.OnClickListener() {
128
                            @Override
129
                            public void onClick(View v) {
130
                                recyclerItemTypeClickListener.onItemClickListener(position, 1);
131
                            }
132
                        }).setNegativeButton("否", new View.OnClickListener() {
133
                    @Override
134
                    public void onClick(View v) {
135
                    }
136
                }).show();
137
            }
138
        });
139
140
        holder.edit.setOnClickListener(new View.OnClickListener() {
141
            @Override
142
            public void onClick(View v) {
143
                new AlertDialogTwo(mContext).builder()
144
                        .setMsg("是否编辑" + carSeriesEntity.getSeriesName() + "?")
145
                        .setPositiveButton("是", new View.OnClickListener() {
146
                            @Override
147
                            public void onClick(View v) {
148
                                recyclerItemTypeClickListener.onItemClickListener(position, 2);
149
                            }
150
                        }).setNegativeButton("否", new View.OnClickListener() {
151
                    @Override
152
                    public void onClick(View v) {
153
154
                    }
155
                }).show();
156
            }
157
        });
158
    }
159
160
    @Override
161
    public int getItemCount() {
162
        return mList.size();
163
    }
164
165
    public void setData(List<CarOwnerCertificateBean> list) {
166
        mList.clear();
167
        mList.addAll(list);
168
        notifyDataSetChanged();
169
    }
170
171
    public class CarOwnerCertificateListHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
172
173
        private final ImageView master_pic;
174
        private final TextView name;
175
        private final TextView detail_name;
176
        private final TextView add_time;
177
        private final TextView status;
178
        private final TextView main;
179
        private final TextView set_main;
180
        private final TextView failure_reason;
181
        private final TextView delete;
182
        private final TextView edit;
183
        private final View left_line;
184
        private final View right_line;
185
186
        public CarOwnerCertificateListHolder(View itemView) {
187
            super(itemView);
188
            master_pic = itemView.findViewById(R.id.master_pic);
189
            name = itemView.findViewById(R.id.name);
190
            detail_name = itemView.findViewById(R.id.detail_name);
191
            status = itemView.findViewById(R.id.status);
192
            add_time = itemView.findViewById(R.id.add_time);
193
            main = itemView.findViewById(R.id.main);
194
            set_main = itemView.findViewById(R.id.set_main);
195
            failure_reason = itemView.findViewById(R.id.failure_reason);
196
            delete = itemView.findViewById(R.id.delete);
197
            edit = itemView.findViewById(R.id.edit);
198
            left_line = itemView.findViewById(R.id.left_line);
199
            right_line = itemView.findViewById(R.id.right_line);
200
        }
201
202
        @Override
203
        public void onClick(View view) {
204
            if (recyclerItemTypeClickListener != null) {
205
                recyclerItemTypeClickListener.onItemClickListener(getLayoutPosition(), 1);
206
            }
207
        }
208
    }
209
210
    RecyclerItemTypeClickListener recyclerItemTypeClickListener;
211
212
    public void setRecyclerItemTypeClickListener(RecyclerItemTypeClickListener recyclerItemTypeClickListener) {
213
        this.recyclerItemTypeClickListener = recyclerItemTypeClickListener;
214
    }
215
}
216
217
218

+ 0 - 1
app/src/main/java/com/electric/chargingpile/adapter/TopicAdapter.java

@ -100,7 +100,6 @@ public class TopicAdapter extends RecyclerView.Adapter<TopicAdapter.ItemViewHold
100 100
            mItemTopicName = (TextView) itemView.findViewById(R.id.item_topic_name);
101 101
            mItemTopicRl = (RelativeLayout) itemView.findViewById(R.id.item_topic_rl);
102 102
            mItemTopicRl.setOnClickListener(this);
103
104 103
        }
105 104
106 105
        @Override

+ 122 - 0
app/src/main/java/com/electric/chargingpile/data/CarOwnerCertificateBean.java

@ -0,0 +1,122 @@
1
package com.electric.chargingpile.data;
2
3
import java.io.Serializable;
4
5
public class CarOwnerCertificateBean implements Serializable {
6
    private int id;
7
    private String plate_number;
8
    private String engine_number;
9
    private String license_img1;
10
    private String chexing;
11
    private String regdate;
12
    private String cartype;
13
    private int status;
14
    private int main;
15
    private String addTime;
16
    private String errmsg;
17
18
    public int getId() {
19
        return id;
20
    }
21
22
    public void setId(int id) {
23
        this.id = id;
24
    }
25
26
    public String getPlate_number() {
27
        return plate_number;
28
    }
29
30
    public void setPlate_number(String plate_number) {
31
        this.plate_number = plate_number;
32
    }
33
34
    public String getEngine_number() {
35
        return engine_number;
36
    }
37
38
    public void setEngine_number(String engine_number) {
39
        this.engine_number = engine_number;
40
    }
41
42
    public String getLicense_img1() {
43
        return license_img1;
44
    }
45
46
    public void setLicense_img1(String license_img1) {
47
        this.license_img1 = license_img1;
48
    }
49
50
    public String getChexing() {
51
        return chexing;
52
    }
53
54
    public void setChexing(String chexing) {
55
        this.chexing = chexing;
56
    }
57
58
    public String getRegdate() {
59
        return regdate;
60
    }
61
62
    public void setRegdate(String regdate) {
63
        this.regdate = regdate;
64
    }
65
66
    public String getCartype() {
67
        return cartype;
68
    }
69
70
    public void setCartype(String cartype) {
71
        this.cartype = cartype;
72
    }
73
74
    public int getStatus() {
75
        return status;
76
    }
77
78
    public void setStatus(int status) {
79
        this.status = status;
80
    }
81
82
    public int getMain() {
83
        return main;
84
    }
85
86
    public void setMain(int main) {
87
        this.main = main;
88
    }
89
90
    public String getAddTime() {
91
        return addTime;
92
    }
93
94
    public void setAddTime(String addTime) {
95
        this.addTime = addTime;
96
    }
97
98
    public String getErrmsg() {
99
        return errmsg;
100
    }
101
102
    public void setErrmsg(String errmsg) {
103
        this.errmsg = errmsg;
104
    }
105
106
    @Override
107
    public String toString() {
108
        return "CarOwnerCertificateBean{" +
109
                "id=" + id +
110
                ", plate_number='" + plate_number + '\'' +
111
                ", engine_number='" + engine_number + '\'' +
112
                ", license_img1='" + license_img1 + '\'' +
113
                ", chexing='" + chexing + '\'' +
114
                ", regdate='" + regdate + '\'' +
115
                ", cartype='" + cartype + '\'' +
116
                ", status=" + status +
117
                ", main=" + main +
118
                ", addTime='" + addTime + '\'' +
119
                ", errmsg='" + errmsg + '\'' +
120
                '}';
121
    }
122
}

+ 55 - 8
app/src/main/java/com/electric/chargingpile/entity/CarSeriesEntity.java

@ -4,18 +4,25 @@ public class CarSeriesEntity {
4 4
    private String brandId;
5 5
    private String brandName;
6 6
    private String companyId;
7
    private String companyName;
7 8
    private String seriesId;
8 9
    private String seriesName;
10
    private String salePrice;
9 11
    private String icon;
12
    private String masterPic;
13
    private String maxSalePrice;
14
    private String minSalePrice;
10 15
11
    public CarSeriesEntity(String brandId, String brandName, String companyId, String 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
    }
16
//    public CarSeriesEntity(String brandId, String brandName, String companyId, String companyName, String seriesId, String seriesName, String salePrice, String icon) {
17
//        this.brandId = brandId;
18
//        this.brandName = brandName;
19
//        this.companyId = companyId;
20
//        this.companyName = companyName;
21
//        this.seriesId = seriesId;
22
//        this.seriesName = seriesName;
23
//        this.salePrice = salePrice;
24
//        this.icon = icon;
25
//    }
19 26
20 27
    public String getBrandId() {
21 28
        return brandId;
@ -41,6 +48,14 @@ public class CarSeriesEntity {
41 48
        this.companyId = companyId;
42 49
    }
43 50
51
    public String getCompanyName() {
52
        return companyName;
53
    }
54
55
    public void setCompanyName(String companyName) {
56
        this.companyName = companyName;
57
    }
58
44 59
    public String getSeriesId() {
45 60
        return seriesId;
46 61
    }
@ -57,6 +72,14 @@ public class CarSeriesEntity {
57 72
        this.seriesName = seriesName;
58 73
    }
59 74
75
    public String getSalePrice() {
76
        return salePrice;
77
    }
78
79
    public void setSalePrice(String salePrice) {
80
        this.salePrice = salePrice;
81
    }
82
60 83
    public String getIcon() {
61 84
        return icon;
62 85
    }
@ -64,4 +87,28 @@ public class CarSeriesEntity {
64 87
    public void setIcon(String icon) {
65 88
        this.icon = icon;
66 89
    }
90
91
    public String getMasterPic() {
92
        return masterPic;
93
    }
94
95
    public void setMasterPic(String masterPic) {
96
        this.masterPic = masterPic;
97
    }
98
99
    public String getMaxSalePrice() {
100
        return maxSalePrice;
101
    }
102
103
    public void setMaxSalePrice(String maxSalePrice) {
104
        this.maxSalePrice = maxSalePrice;
105
    }
106
107
    public String getMinSalePrice() {
108
        return minSalePrice;
109
    }
110
111
    public void setMinSalePrice(String minSalePrice) {
112
        this.minSalePrice = minSalePrice;
113
    }
67 114
}

+ 74 - 0
app/src/main/res/layout/activity_car_owner_certificate_list.xml

@ -0,0 +1,74 @@
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="#F2F6F9"
8
    tools:context=".activity.CarOwnerCertificateListActivity">
9
10
    <androidx.constraintlayout.widget.ConstraintLayout
11
        android:id="@+id/nav_bar"
12
        android:layout_width="match_parent"
13
        android:layout_height="44dp"
14
        android:background="@color/white"
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="16sp" />
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
        <TextView
39
            android:id="@+id/add"
40
            android:layout_width="60dp"
41
            android:layout_height="match_parent"
42
            android:gravity="center"
43
            android:text="添加"
44
            android:textColor="#030303"
45
            android:textSize="15sp"
46
            app:layout_constraintRight_toRightOf="parent" />
47
48
        <View
49
            android:layout_width="match_parent"
50
            android:layout_height="0.5dp"
51
            android:background="@color/ui_titleline"
52
            app:layout_constraintBottom_toBottomOf="parent" />
53
54
    </androidx.constraintlayout.widget.ConstraintLayout>
55
56
    <androidx.recyclerview.widget.RecyclerView
57
        android:id="@+id/recycler_view"
58
        android:layout_width="match_parent"
59
        android:layout_height="0dp"
60
        app:layout_constraintBottom_toBottomOf="parent"
61
        app:layout_constraintTop_toBottomOf="@+id/nav_bar" />
62
63
    <TextView
64
        android:id="@+id/no_data"
65
        android:layout_width="match_parent"
66
        android:layout_height="match_parent"
67
        android:gravity="center"
68
        android:text="暂无认证信息"
69
        android:textColor="#cccccc"
70
        android:textSize="15sp"
71
        android:visibility="gone"
72
        tools:visibility="visible" />
73
74
</androidx.constraintlayout.widget.ConstraintLayout>

+ 4 - 3
app/src/main/res/layout/adapter_child_car_model.xml

@ -16,7 +16,7 @@
16 16
        app:layout_constraintTop_toTopOf="parent" />
17 17
18 18
    <ImageView
19
        android:id="@+id/ster_picon"
19
        android:id="@+id/master_pster_pic"
20 20
        android:layout_width="120dp"
21 21
        android:layout_height="80dp"
22 22
        android:scaleType="fitCenter"
@ -34,7 +34,7 @@
34 34
        android:layout_marginTop="27dp"
35 35
        android:textColor="#FF222222"
36 36
        android:textSize="14sp"
37
        app:layout_constraintLeft_toRightOf="@+id/ster_picon"
37
        app:layout_constraintLeft_toRightOf="@+id/master_pster_pic"
38 38
        app:layout_constraintTop_toTopOf="parent"
39 39
        tools:text="奥迪" />
40 40
@ -45,9 +45,10 @@
45 45
        android:layout_marginBottom="28dp"
46 46
        android:orientation="horizontal"
47 47
        app:layout_constraintBottom_toBottomOf="parent"
48
        app:layout_constraintLeft_toRightOf="@+id/ster_picon">
48
        app:layout_constraintLeft_toRightOf="@+id/master_pster_pic">
49 49
50 50
        <TextView
51
            android:id="@+id/sale_price"
51 52
            android:layout_width="wrap_content"
52 53
            android:layout_height="wrap_content"
53 54
            android:textColor="#FFE02020"

+ 167 - 0
app/src/main/res/layout/item_car_owner_certificate.xml

@ -0,0 +1,167 @@
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="wrap_content"
6
    android:background="@color/white"
7
    android:orientation="vertical">
8
9
    <LinearLayout
10
        android:layout_width="match_parent"
11
        android:layout_height="wrap_content"
12
        android:paddingLeft="10dp"
13
        android:paddingTop="20dp"
14
        android:paddingRight="15dp"
15
        android:paddingBottom="5dp">
16
17
        <ImageView
18
            android:id="@+id/master_pic"
19
            android:layout_width="120dp"
20
            android:layout_height="80dp"
21
            android:layout_marginBottom="15dp"
22
            tools:background="@color/red" />
23
24
        <LinearLayout
25
            android:layout_width="match_parent"
26
            android:layout_height="wrap_content"
27
            android:orientation="vertical">
28
29
            <LinearLayout
30
                android:layout_width="match_parent"
31
                android:layout_height="wrap_content">
32
33
                <TextView
34
                    android:id="@+id/name"
35
                    android:layout_width="wrap_content"
36
                    android:layout_height="wrap_content"
37
                    android:textColor="#222222"
38
                    android:textSize="14sp"
39
                    tools:text="阿尔法·罗密欧" />
40
41
                <TextView
42
                    android:layout_width="wrap_content"
43
                    android:layout_height="wrap_content"
44
                    android:layout_weight="1" />
45
46
                <TextView
47
                    android:id="@+id/status"
48
                    android:layout_width="wrap_content"
49
                    android:layout_height="match_parent"
50
                    android:gravity="center"
51
                    android:textSize="12sp"
52
                    tools:text="审核中" />
53
            </LinearLayout>
54
55
            <TextView
56
                android:id="@+id/detail_name"
57
                android:layout_width="match_parent"
58
                android:layout_height="match_parent"
59
                android:layout_marginTop="5dp"
60
                android:textColor="#0D1120"
61
                android:textSize="14sp"
62
                tools:text="2020款 420KM 运动版" />
63
64
            <LinearLayout
65
                android:layout_width="match_parent"
66
                android:layout_height="37dp"
67
                android:orientation="horizontal"
68
                tools:background="#ff0099">
69
70
                <TextView
71
                    android:id="@+id/add_time"
72
                    android:layout_width="wrap_content"
73
                    android:layout_height="match_parent"
74
                    android:gravity="center_vertical"
75
                    android:textColor="#9393A5"
76
                    android:textSize="12sp"
77
                    tools:text="2020.10.20" />
78
79
                <TextView
80
                    android:layout_width="wrap_content"
81
                    android:layout_height="wrap_content"
82
                    android:layout_weight="1" />
83
84
                <TextView
85
                    android:id="@+id/main"
86
                    android:layout_width="wrap_content"
87
                    android:layout_height="match_parent"
88
                    android:gravity="center_vertical"
89
                    android:text="主车型"
90
                    android:textColor="#0D1120"
91
                    android:textSize="12sp"
92
                    android:visibility="gone"
93
                    tools:visibility="visible" />
94
95
                <TextView
96
                    android:id="@+id/delete"
97
                    android:layout_width="wrap_content"
98
                    android:layout_height="match_parent"
99
                    android:gravity="center_vertical"
100
                    android:paddingRight="5dp"
101
                    android:text="删除"
102
                    android:textColor="#0D1120"
103
                    android:textSize="12sp"
104
                    android:visibility="gone"
105
                    tools:visibility="visible" />
106
107
                <View
108
                    android:id="@+id/left_line"
109
                    android:layout_width="1dp"
110
                    android:layout_height="match_parent"
111
                    android:layout_marginTop="12dp"
112
                    android:layout_marginBottom="12dp"
113
                    android:background="#979797" />
114
115
                <TextView
116
                    android:id="@+id/edit"
117
                    android:layout_width="wrap_content"
118
                    android:layout_height="match_parent"
119
                    android:gravity="center_vertical"
120
                    android:paddingRight="5dp"
121
                    android:paddingLeft="5dp"
122
                    android:text="编辑"
123
                    android:textColor="#0D1120"
124
                    android:textSize="12sp"
125
                    android:visibility="gone"
126
                    tools:visibility="visible" />
127
128
                <View
129
                    android:id="@+id/right_line"
130
                    android:layout_width="1dp"
131
                    android:layout_height="match_parent"
132
                    android:layout_marginTop="12dp"
133
                    android:layout_marginBottom="12dp"
134
                    android:background="#979797" />
135
136
                <TextView
137
                    android:id="@+id/set_main"
138
                    android:layout_width="wrap_content"
139
                    android:layout_height="match_parent"
140
                    android:gravity="center_vertical"
141
                    android:paddingLeft="5dp"
142
                    android:text="设为主车型"
143
                    android:textColor="#0D1120"
144
                    android:textSize="12sp"
145
                    android:visibility="gone"
146
                    tools:visibility="visible" />
147
148
            </LinearLayout>
149
150
            <TextView
151
                android:id="@+id/failure_reason"
152
                android:layout_width="match_parent"
153
                android:layout_height="wrap_content"
154
                android:layout_marginBottom="5dp"
155
                android:text="失败原因:不拉不拉"
156
                android:textColor="#E02020"
157
                android:textSize="12sp"
158
                android:visibility="gone"
159
                tools:visibility="visible" />
160
        </LinearLayout>
161
    </LinearLayout>
162
163
    <View
164
        android:layout_width="match_parent"
165
        android:layout_height="1dp"
166
        android:background="@color/lineColor" />
167
</LinearLayout>

信息错误 · 6e451e46ec - Gogs: Go Git Service
huyuguo %!s(int64=5) %!d(string=hace) años
padre
commit
6e451e46ec

+ 11 - 252
app/src/main/java/com/electric/chargingpile/activity/AlterOneActivity.java

@ -177,8 +177,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
177 177
                    }
178 178
                    break;
179 179
                case StatusConstants.REQUEST_WHAT_SUCCESS:
180

181

182 180
                    break;
183 181
            }
184 182
            super.handleMessage(msg);
@ -239,17 +237,13 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
239 237

240 238

241 239
        final RelativeLayout parent = (RelativeLayout) view.findViewById(R.id.parent);
242
        Button bt1 = (Button) view
243
                .findViewById(R.id.item_popupwindows_camera);
244
        Button bt2 = (Button) view
245
                .findViewById(R.id.item_popupwindows_Photo);
246
        Button bt3 = (Button) view
247
                .findViewById(R.id.item_popupwindows_cancel);
240
        Button bt1 = (Button) view.findViewById(R.id.item_popupwindows_camera);
241
        Button bt2 = (Button) view.findViewById(R.id.item_popupwindows_Photo);
242
        Button bt3 = (Button) view.findViewById(R.id.item_popupwindows_cancel);
248 243
        parent.setOnClickListener(new View.OnClickListener() {
249 244

250 245
            @Override
251 246
            public void onClick(View v) {
252
                // TODO Auto-generated method stub
253 247
                pop.dismiss();
254 248
                ll_popup.clearAnimation();
255 249
            }
@ -264,7 +258,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
264 258
                } else {
265 259
                    ToastUtil.showToast(getApplicationContext(), "您当前关闭了调用摄像头权限", Toast.LENGTH_SHORT);
266 260
                }
267

268 261
            }
269 262
        });
270 263
        bt2.setOnClickListener(new View.OnClickListener() {
@ -293,13 +286,11 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
293 286
        noScrollgridview.setAdapter(adapter);
294 287
        noScrollgridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
295 288

296
            public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
297
                                    long arg3) {
289
            public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
298 290
                if (arg2 == Bimp.tempSelectBitmap.size()) {
299 291
                    permissionTask();
300 292
                } else {
301
                    Intent intent = new Intent(AlterOneActivity.this,
302
                            GalleryActivityAlter.class);
293
                    Intent intent = new Intent(AlterOneActivity.this, GalleryActivityAlter.class);
303 294
                    intent.putExtra("position", "1");
304 295
                    intent.putExtra("ID", arg2);
305 296
                    startActivity(intent);
@ -353,7 +344,7 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
353 344
                        try {
354 345

355 346
                            List<Uri> uriList = Matisse.obtainResult(data);
356
                            for (Uri uri: uriList) {
347
                            for (Uri uri : uriList) {
357 348
                                Bitmap bitmap = BitmapFactory.decodeStream(getContentResolver().openInputStream(uri));
358 349
                                File file = FileUtils.from(AlterOneActivity.this, uri);
359 350

@ -700,9 +691,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
700 691
            }
701 692

702 693
        }
703
//        par.put("user_id", MainApplication.userId);
704
//        par.put("zhan_name", zhan_name);
705
//        par.put("zhan_id", zhan_id);
706 694
        par.put("user_id", MainApplication.userId);
707 695
        par.put("stop_cost", "");
708 696
        par.put("server_cost", "");
@ -730,180 +718,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
730 718
        }
731 719
    }
732 720

733
//    private void alterOne() {
734
//        new Thread(new Runnable() {
735
//            @Override
736
//            public void run() {
737
//                String url = "http://123.57.6.131/zhannew/basic/web/index.php/zhanalterpoi/add?stop_cost="+parkCost.getText().toString()+"&server_cost="+serviceCost.getText().toString()+"&user_id="+ MainApplication.userPhone+"&zhan_id="+zhan_id+"&contact="+remark.getText().toString()+"&other="+parkType+"&zhan_name="+zhan.getZhan_name();
738
//                submit(url);
739
//            }
740
//        }).start();
741
//    }
742
//
743
//    private void submit( String sms) {
744
//
745
//        Log.e("url", sms);
746
//        Request request = new Request.Builder().url(sms).build();
747
//        Response response = null;
748
//        try{
749
//            if(request==null){
750
//                Message msg = new Message();
751
//                msg.what=3;
752
//                handler.sendMessage(msg);
753
//                return;
754
//            }
755
//            response = OkHttpUtil.execute(request);
756
//            if (response.code() == 200) {
757
//                String json = "";
758
//                try {
759
//                    json = response.body().string();
760
//                    Message msg = new Message();
761
//                    msg.obj = json;
762
//                    msg.what=2;
763
//                    handler.sendMessage(msg);
764
//                    Log.e("url", json);
765
//                }catch (Exception e){
766
//                    e.printStackTrace();
767
//                    Message msg = new Message();
768
//                    msg.what=3;
769
//                    handler.sendMessage(msg);
770
//                }
771
//            }
772
//        }catch (Exception e){
773
//            e.printStackTrace();
774
//            Message msg = new Message();
775
//            msg.what=3;
776
//            handler.sendMessage(msg);
777
//        }
778
//    }
779

780
//    private void addPHoto(final String s) {
781
//        if (!NetUtil.CheckNetwork(this)) {
782
//            Toast.makeText(this, "请检查网络", Toast.LENGTH_SHORT).show();
783
//            return;
784
//        }
785
//        new Thread(new Runnable() {
786
//            @Override
787
//            public void run() {
788
////
789
//                try {
790
//                    Map<String, String> par = new HashMap<String, String>();
791
//                    par.put("file", s);
792
////                    par.put("file1", s);
793
////                    par.put("file2", s);
794
//
795
//                    par.put("filename","head.jpg");
796
//                    par.put("zhan_id",zhan_id);
797
//                    par.put("user_id",MainApplication.userPhone);
798
//                    par.put("ishot","2");
799
//                    //如果是热点标注部分图片ishot为1
800
//                    Log.i("++++++++@","filename:"+s+",zhan_id:"+zhan_id+",user_id:"+MainApplication.userPhone);
801
//                    String u = UploadUtil.post("http://123.57.6.131/zhan/index.php?m=content&c=upfile",par, null);
802
//                    Message msg = new Message();
803
//                    msg.obj = u;
804
//                    msg.what=5;
805
//                    handler.sendMessage(msg);
806
//                    Log.e("url", u);
807
//                } catch (Exception e) {
808
//                    e.printStackTrace();
809
//                    Message msg = new Message();
810
//                    msg.what=3;
811
//                    handler.sendMessage(msg);
812
//                }
813
//            }
814
//        }).start();
815
//
816
//    }
817

818

819
//    private static boolean isTrueDate(String date1, String date2) {
820
//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
821
//        try {
822
//            Date dt1 = df.parse(date1);
823
//            Date dt2 = df.parse(date2);
824
//
825
//            System.err.println(dt1.getTime() - dt2.getTime());
826
//            long cha = dt1.getTime() - dt2.getTime();
827
//            if (cha >= 0 && cha <= 259200000) {
828
//                return true;
829
//            } else {
830
//                return false;
831
//            }
832
//        } catch (Exception exception) {
833
//            exception.printStackTrace();
834
//        }
835
//        return false;
836
//
837
//    }
838
//
839
//    /**
840
//     * 裁剪图片方法实现 @param uri   
841
//     */
842
//    public void startPhotoZoom(Uri uri) {
843
//		/*
844
//		 *   * 至于下面这个Intent的ACTION是怎么知道的,大家可以看下自己路径下的如下网页   *
845
//		 * yourself_sdk_path/docs/reference/android/content/Intent.html   *
846
//		 * 直接在里面Ctrl+F搜:CROP ,之前小马没仔细看过,其实安卓系统早已经有自带图片裁剪功能,   * 是直接调本地库的,不懂C C++
847
//		 * 这个不做详细了解去了,有轮子就用轮子,不再研究轮子是怎么   * 制做的了...吼吼   
848
//		 */
849
//        Intent intent = new Intent("com.android.camera.action.CROP");
850
//        intent.setDataAndType(uri, "image/*");
851
//        // 下面这个crop=true是设置在开启的Intent中设置显示的VIEW可裁剪
852
//        intent.putExtra("crop", "true");
853
//        // aspectX aspectY 是宽高的比例
854
//        intent.putExtra("aspectX", 16);
855
//        intent.putExtra("aspectY", 9);
856
//        // outputX outputY 是裁剪图片宽高
857
//        intent.putExtra("outputX", 480);
858
//        intent.putExtra("outputY", 270);
859
//        intent.putExtra("return-data", true);
860
//        startActivityForResult(intent, 3);
861
//    }
862
//
863
//
864
//
865
//    /** 保存裁剪之后的图片数据 **/
866
//    private void setPicToView(Intent picdata) {
867
//        Bundle extras = picdata.getExtras();
868
//        if (extras != null) {
869
//            photo = extras.getParcelable("data");
870
//            if (photo != null) {
871
//                // m_imageUser.setImageBitmap((Bitmap) photo);
872
////				给image设置图片
873
////                alterImage1.setImageBitmap(photo);
874
////                uploadPhoto.setImageBitmap(photo);
875
////                addPhoto.setVisibility(View.GONE);
876
////                ll_uploadPhoto.setVisibility(View.VISIBLE);
877
//                String fileName = String.valueOf(System.currentTimeMillis());
878
////                Bitmap bm = (Bitmap) photo.getExtras().get("data");
879
//                FileUtils.saveBitmap(bm, fileName);
880
////
881
//                ImageItem takePhoto = new ImageItem();
882
//                takePhoto.setBitmap(photo);
883
//                takePhoto.setImagePath(FileUtils.SDPATH + fileName + ".JPEG");
884
//                Bimp.tempSelectBitmap.add(takePhoto);
885
//            }
886
//
887
//            }
888
//        }
889
//        if (extras != null) {
890
//            photo2 = extras.getParcelable("data");
891
//            if (photo2 != null) {
892
//                // m_imageUser.setImageBitmap((Bitmap) photo);
893
////				给image设置图片
894
//                alterImage2.setImageBitmap(photo2);
895
//
896
//            }
897
//        }
898
//        if (extras != null) {
899
//            photo3 = extras.getParcelable("data");
900
//            if (photo3 != null) {
901
//                // m_imageUser.setImageBitmap((Bitmap) photo);
902
////				给image设置图片
903
//                alterImage3.setImageBitmap(photo2);
904
//
905
//            }
906
//        }
907 721

908 722
    private Bitmap imageZoom(Bitmap bm) {
909 723
        // 图片允许最大空间 单位:KB
@ -940,8 +754,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
940 754
        matrix.postScale(scaleWidth, scaleHeight);
941 755
        Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, (int) width,
942 756
                (int) height, matrix, true);
943
//        iv_2.setImageBitmap(bitmap);
944
//        tv_2.setText(bitmap.getRowBytes() * bitmap.getHeight() + "");
945 757
        return bitmap;
946 758
    }
947 759

@ -977,52 +789,11 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
977 789

978 790
    @Override
979 791
    protected void onDestroy() {
980
//        Bimp.tempSelectBitmap.clear();
981
//        adapter.update();
982 792
        Bimp.tempSelectBitmap.clear();
983 793
        Bimp.max = 0;
984 794
        super.onDestroy();
985 795
    }
986 796

987

988
//    public Bitmap zoomImage(Bitmap bgimage, double newWidth, double newHeight) {
989
//        // 获取这个图片的宽和高
990
//        float width = bgimage.getWidth();
991
//        float height = bgimage.getHeight();
992
//        // 创建操作图片用的matrix对象
993
//        Matrix matrix = new Matrix();
994
//        // 计算宽高缩放率
995
//        float scaleWidth = ((float) newWidth) / width;
996
//        float scaleHeight = ((float) newHeight) / height;
997
//        // 缩放图片动作
998
//        matrix.postScale(scaleWidth, scaleHeight);
999
//        Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, (int) width,
1000
//                (int) height, matrix, true);
1001
////        iv_2.setImageBitmap(bitmap);
1002
////        tv_2.setText(bitmap.getRowBytes() * bitmap.getHeight() + "");
1003
//        return bitmap;
1004
//    }
1005

1006
//    private void imageZoom(Bitmap bm) {
1007
//        // 图片允许最大空间 单位:KB
1008
//        double maxSize = 400.00;
1009
//        // 将bitmap放至数组中,意在bitmap的大小(与实际读取的原文件要大)
1010
//        ByteArrayOutputStream baos = new ByteArrayOutputStream();
1011
//        bm.compress(Bitmap.CompressFormat.JPEG, 100, baos);
1012
//        byte[] b = baos.toByteArray();
1013
//        // 将字节换成KB
1014
//        double mid = b.length / 1024;
1015
//        // 判断bitmap占用空间是否大于允许最大空间 如果大于则压缩 小于则不压缩
1016
//        if (mid > maxSize) {
1017
//            // 获取bitmap大小 是允许最大大小的多少倍
1018
//            double i = mid / maxSize;
1019
//            // 开始压缩 此处用到平方根 将宽带和高度压缩掉对应的平方根倍
1020
//            // (1.保持刻度和高度和原bitmap比率一致,压缩后也达到了最大大小占用空间的大小)
1021
//            bm = zoomImage(bm, bm.getWidth() / Math.sqrt(i), bm.getHeight()
1022
//                    / Math.sqrt(i));
1023
//        }
1024
//    }
1025

1026 797
    public void compress(Bitmap bitmap) {
1027 798
        DisplayMetrics dm = new DisplayMetrics();
1028 799
        getWindowManager().getDefaultDisplay().getMetrics(dm);
@ -1045,7 +816,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
1045 816
            size = (int) Math.pow(2, logCeil);
1046 817
        }
1047 818
        opts.inSampleSize = size;
1048
        // bitmap = BitmapFactory.decodeFile(srcPath, opts);
1049 819
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
1050 820
        int quality = 100;
1051 821
        bitmap.compress(Bitmap.CompressFormat.JPEG, quality, baos);
@ -1057,9 +827,6 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
1057 827
            System.out.println(baos.toByteArray().length);
1058 828
        }
1059 829
        try {
1060
//            BitmapFactory.decodeByteArray(baos, 0, baos.toByteArray());
1061
            // baos.writeTo(new FileOutputStream(
1062
            // "/mnt/sdcard/Servyou/photo/buffer/22.jpg"));
1063 830
        } catch (Exception e) {
1064 831
            e.printStackTrace();
1065 832
        } finally {
@ -1073,23 +840,13 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
1073 840
    }
1074 841

1075 842
    private void crop(Uri uri, Uri cutImgUri) {
1076
        // �ü�ͼƬ��ͼ
1077 843
        Intent intent = new Intent("com.android.camera.action.CROP");
1078 844
        intent.setDataAndType(getImageContentUri(this, tempFile), "image/*");
1079

1080 845
        intent.putExtra("crop", "true");
1081
        // �ü���ı�����1��1
1082
//        intent.putExtra("aspectX", 16);
1083
//        intent.putExtra("aspectY", 9);
1084
//        // �ü������ͼƬ�ijߴ��С
1085
//        intent.putExtra("outputX", 640);
1086
//        intent.putExtra("outputY", 360);
1087

1088
        // ͼƬ��ʽ
1089 846
        intent.putExtra("outputFormat", "JPEG");
1090
        intent.putExtra("noFaceDetection", true);// ȡ������ʶ��
1091
        intent.putExtra("return-data", false);// true:������uri��false������uri
1092
        intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));//д���ȡ��ͼƬ
847
        intent.putExtra("noFaceDetection", true);
848
        intent.putExtra("return-data", false);
849
        intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));
1093 850
        startActivityForResult(intent, PHOTO_REQUEST_CUT);
1094 851
    }
1095 852

@ -1204,6 +961,7 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
1204 961
            EasyPermissions.requestPermissions(
1205 962
                    this, "充电桩想要获取您的图片读取权限,是否允许?",
1206 963
                    RC_ALBUM_PERM,
964
                    Manifest.permission.CAMERA,
1207 965
                    Manifest.permission.WRITE_EXTERNAL_STORAGE,
1208 966
                    Manifest.permission.READ_EXTERNAL_STORAGE);
1209 967
        }
@ -1211,6 +969,7 @@ public class AlterOneActivity extends Activity implements View.OnClickListener,
1211 969

1212 970
    private boolean isPermissionOK() {
1213 971
        return EasyPermissions.hasPermissions(this,
972
                Manifest.permission.CAMERA,
1214 973
                Manifest.permission.WRITE_EXTERNAL_STORAGE,
1215 974
                Manifest.permission.READ_EXTERNAL_STORAGE
1216 975
        );

+ 43 - 356
app/src/main/res/layout/activity_alter_one.xml

@ -2,16 +2,16 @@
2 2
    xmlns:tools="http://schemas.android.com/tools"
3 3
    android:layout_width="match_parent"
4 4
    android:layout_height="match_parent"
5
    android:background="@color/activity_bgcolor"
5 6
    android:focusable="true"
6 7
    android:focusableInTouchMode="true"
7
    android:orientation="vertical"
8
    android:background="@color/activity_bgcolor">
8
    android:orientation="vertical">
9 9

10 10
    <com.zhy.autolayout.AutoRelativeLayout
11
        android:id="@+id/relativeLayout"
11 12
        android:layout_width="fill_parent"
12 13
        android:layout_height="130px"
13
        android:background="@color/white"
14
        android:id="@+id/relativeLayout">
14
        android:background="@color/white">
15 15

16 16
        <TextView
17 17
            android:id="@+id/textview"
@ -29,20 +29,18 @@
29 29
            android:layout_alignParentLeft="true"
30 30
            android:layout_centerVertical="true"
31 31
            android:contentDescription="@null"
32
            android:paddingBottom="4dp"
33 32
            android:paddingLeft="16dp"
34
            android:paddingRight="16dp"
35 33
            android:paddingTop="4dp"
34
            android:paddingRight="16dp"
35
            android:paddingBottom="4dp"
36 36
            android:src="@drawable/icon_lvback1119" />
37

38

39 37
    </com.zhy.autolayout.AutoRelativeLayout>
38

40 39
    <View
41 40
        android:layout_width="fill_parent"
42 41
        android:layout_height="0.5dp"
43 42
        android:background="@color/ui_line" />
44 43

45

46 44
    <ScrollView
47 45
        android:layout_width="match_parent"
48 46
        android:layout_height="wrap_content"
@ -53,355 +51,54 @@
53 51
            android:layout_height="match_parent"
54 52
            android:orientation="vertical">
55 53

56

57
            <!--<LinearLayout-->
58
                <!--android:id="@+id/ll_alter_photo"-->
59
                <!--android:layout_width="match_parent"-->
60
                <!--android:layout_height="50dp"-->
61
                <!--android:visibility="gone"-->
62
                <!--android:background="@color/bg_row"-->
63
                <!--android:orientation="horizontal">-->
64

65
                <!--<TextView-->
66
                    <!--android:layout_width="wrap_content"-->
67
                    <!--android:layout_height="match_parent"-->
68
                    <!--android:layout_centerVertical="true"-->
69
                    <!--android:layout_marginLeft="10dp"-->
70
                    <!--android:gravity="center_vertical"-->
71
                    <!--android:text="+"-->
72
                    <!--android:textColor="#39C663"-->
73
                    <!--android:textSize="30sp" />-->
74

75
                <!--<TextView-->
76
                    <!--android:layout_width="wrap_content"-->
77
                    <!--android:layout_height="match_parent"-->
78
                    <!--android:layout_marginLeft="5dp"-->
79
                    <!--android:gravity="center"-->
80
                    <!--android:padding="5dp"-->
81
                    <!--android:text="补 充 完 善 图 片 信 息"-->
82
                    <!--android:textColor="@color/add_photo"-->
83
                    <!--android:textSize="17sp" />-->
84
            <!--</LinearLayout>-->
85

86
            <!--<LinearLayout-->
87
                <!--android:id="@+id/ll_add_photo"-->
88
                <!--android:layout_width="match_parent"-->
89
                <!--android:layout_height="100dp"-->
90
                <!--android:orientation="horizontal"-->
91
                <!--android:background="@color/bg_row">-->
92

93
                <!--<ImageView-->
94
                    <!--android:id="@+id/iv_photo1"-->
95
                    <!--android:layout_width="100dp"-->
96
                    <!--android:layout_height="match_parent"-->
97
                    <!--android:padding="15dp"-->
98
                    <!--android:src="@drawable/addpic65"/>-->
99
                <!--<TextView-->
100
                    <!--android:id="@+id/tv_add"-->
101
                    <!--android:layout_width="wrap_content"-->
102
                    <!--android:layout_height="match_parent"-->
103
                    <!--android:layout_marginLeft="5dp"-->
104
                    <!--android:gravity="center"-->
105
                    <!--android:padding="5dp"-->
106
                    <!--android:text="补 充 完 善 图 片 信 息"-->
107
                    <!--android:textColor="@color/add_photo"-->
108
                    <!--android:textSize="17sp"-->
109
                    <!--android:visibility="visible"/>-->
110

111
                <!--<ImageView-->
112
                    <!--android:id="@+id/iv_photo2"-->
113
                    <!--android:layout_width="100dp"-->
114
                    <!--android:layout_height="match_parent"-->
115
                    <!--android:padding="15dp"-->
116
                    <!--android:src="@drawable/addpic65"-->
117
                    <!--android:visibility="gone"/>-->
118

119
                <!--<ImageView-->
120
                    <!--android:id="@+id/iv_photo3"-->
121
                    <!--android:layout_width="100dp"-->
122
                    <!--android:layout_height="match_parent"-->
123
                    <!--android:padding="15dp"-->
124
                    <!--android:src="@drawable/addpic65"-->
125
                    <!--android:visibility="gone"/>-->
126
            <!--</LinearLayout>-->
127

128
            <!--<LinearLayout-->
129
                <!--android:id="@+id/ll_uploadPhoto"-->
130
                <!--android:layout_width="match_parent"-->
131
                <!--android:layout_height="100dp"-->
132
                <!--android:gravity="center"-->
133
                <!--android:background="@color/bg_row"-->
134
                <!--android:orientation="horizontal"-->
135
                <!--android:visibility="gone">-->
136

137
                <!--<ImageView-->
138
                    <!--android:id="@+id/uploadPhoto"-->
139
                    <!--android:layout_width="100dp"-->
140
                    <!--android:layout_height="match_parent"-->
141
                    <!--android:src="@drawable/addpic65" />-->
142
            <!--</LinearLayout>-->
143

144
        <LinearLayout
145
            android:id="@+id/ll_add_photo"
146
            android:layout_width="match_parent"
147
            android:layout_height="100dp"
148
            android:orientation="horizontal"
149
            android:background="@color/bg_row">
150

151
            <!--<ImageView-->
152
            <!--android:id="@+id/iv_photo1"-->
153
            <!--android:layout_width="100dp"-->
154
            <!--android:padding="16dp"-->
155
            <!--android:layout_height="match_parent"-->
156
            <!--android:src="@drawable/addpic65"/>-->
157
            <GridView
158
                android:id="@+id/noScrollgridview"
54
            <LinearLayout
55
                android:id="@+id/ll_add_photo"
159 56
                android:layout_width="match_parent"
160
                android:layout_height="wrap_content"
161
                android:layout_marginLeft="16dp"
162
                android:layout_marginTop="16dp"
163
                android:layout_marginRight="16dp"
164
                android:horizontalSpacing="3dp"
165
                android:numColumns="3"
166
                android:scrollbars="none"
167
                android:verticalSpacing="5dp" >
168
            </GridView>
169

170
        </LinearLayout>
57
                android:layout_height="100dp"
58
                android:background="@color/bg_row"
59
                android:orientation="horizontal">
60

61
                <GridView
62
                    android:id="@+id/noScrollgridview"
63
                    android:layout_width="match_parent"
64
                    android:layout_height="wrap_content"
65
                    android:layout_marginLeft="16dp"
66
                    android:layout_marginTop="16dp"
67
                    android:layout_marginRight="16dp"
68
                    android:horizontalSpacing="3dp"
69
                    android:numColumns="3"
70
                    android:scrollbars="none"
71
                    android:verticalSpacing="5dp"></GridView>
72

73
            </LinearLayout>
171 74

172 75
            <TextView
173 76
                android:layout_width="match_parent"
174 77
                android:layout_height="wrap_content"
175 78
                android:background="@color/white"
176
                android:text="(可选填,最多可上传三张)"
177 79
                android:paddingLeft="16dp"
178 80
                android:paddingRight="16dp"
179 81
                android:paddingBottom="8dp"
82
                android:text="(可选填,最多可上传三张)"
180 83
                android:textColor="@color/hintColor"
181 84
                android:textSize="16sp"
182
                android:visibility="gone"/>
85
                android:visibility="gone" />
183 86

184 87
            <View
185 88
                android:layout_width="match_parent"
186 89
                android:layout_height="0.5dp"
187
                android:background="@color/Line"/>
90
                android:background="@color/Line" />
91

188 92
            <View
189 93
                android:layout_width="fill_parent"
190 94
                android:layout_height="15dp"
191 95
                android:background="@color/activity_bgcolor" />
192 96

193
            <!--<View-->
194
                <!--android:layout_width="fill_parent"-->
195
                <!--android:layout_height="0.5dp"-->
196
                <!--android:layout_marginLeft="8dp"-->
197
                <!--android:layout_marginRight="8dp"-->
198
                <!--android:background="@color/in_line" />-->
199

200
            <!--<RelativeLayout-->
201
                <!--android:id="@+id/rl_name"-->
202
                <!--android:layout_marginLeft="8dp"-->
203
                <!--android:layout_marginRight="8dp"-->
204
                <!--android:layout_width="match_parent"-->
205
                <!--android:background="@color/bg_row"-->
206
                <!--android:layout_height="50dp">-->
207

208
                <!--<TextView-->
209
                    <!--android:id="@+id/tv_name"-->
210
                    <!--android:layout_width="wrap_content"-->
211
                    <!--android:layout_height="wrap_content"-->
212
                    <!--android:layout_alignParentLeft="true"-->
213
                    <!--android:layout_centerVertical="true"-->
214
                    <!--android:paddingBottom="5dp"-->
215
                    <!--android:paddingLeft="10dp"-->
216
                    <!--android:paddingRight="15dp"-->
217
                    <!--android:text="名称"-->
218
                    <!--android:textColor="@color/title_row"-->
219
                    <!--android:textSize="16sp" />-->
220

221
                <!--<EditText-->
222
                    <!--android:id="@+id/et_name"-->
223
                    <!--style="?android:attr/textViewStyle"-->
224
                    <!--android:layout_width="wrap_content"-->
225
                    <!--android:layout_height="wrap_content"-->
226
                    <!--android:layout_alignParentEnd="true"-->
227
                    <!--android:layout_alignParentRight="true"-->
228
                    <!--android:layout_centerVertical="true"-->
229
                    <!--android:layout_marginRight="15dp"-->
230
                    <!--android:background="@null"-->
231
                    <!--android:contentDescription="@null"-->
232
                    <!--android:paddingBottom="5dp"-->
233
                    <!--android:paddingRight="10dp"-->
234
                    <!--android:text="充电桩"-->
235
                    <!--android:textColor="@color/black"-->
236
                    <!--android:textColorHint="@color/hintColor"-->
237
                    <!--android:textSize="15sp" />-->
238

239
            <!--</RelativeLayout>-->
240

241

242

243

244
            <!--<View-->
245
                <!--android:layout_width="fill_parent"-->
246
                <!--android:layout_height="0.5dp"-->
247
                <!--android:layout_marginLeft="8dp"-->
248
                <!--android:layout_marginRight="8dp"-->
249
                <!--android:background="@color/in_line" />-->
250

251
            <!--<RelativeLayout-->
252
                <!--android:id="@+id/rl_suit_car"-->
253
                <!--android:layout_width="match_parent"-->
254
                <!--android:layout_marginLeft="8dp"-->
255
                <!--android:layout_marginRight="8dp"-->
256
                <!--android:layout_height="50dp"-->
257
                <!--android:background="@drawable/click_effect">-->
258

259
                <!--<TextView-->
260
                    <!--android:id="@+id/tv_service"-->
261
                    <!--android:layout_width="wrap_content"-->
262
                    <!--android:layout_height="wrap_content"-->
263
                    <!--android:layout_alignParentLeft="true"-->
264
                    <!--android:layout_centerVertical="true"-->
265
                    <!--android:paddingBottom="5dp"-->
266
                    <!--android:paddingLeft="10dp"-->
267
                    <!--android:paddingRight="15dp"-->
268
                    <!--android:text="服务费"-->
269
                    <!--android:textColor="@color/title_row"-->
270
                    <!--android:textSize="16sp" />-->
271

272
                <!--<EditText-->
273
                    <!--android:id="@+id/et_serviceCost"-->
274
                    <!--android:layout_width="wrap_content"-->
275
                    <!--android:layout_height="wrap_content"-->
276
                    <!--android:layout_alignParentEnd="true"-->
277
                    <!--android:layout_alignParentRight="true"-->
278
                    <!--android:layout_centerVertical="true"-->
279
                    <!--android:layout_marginRight="15dp"-->
280
                    <!--android:contentDescription="@null"-->
281
                    <!--android:background="@color/bg_row"-->
282
                    <!--android:gravity="center|right"-->
283
                    <!--android:hint="请您填写服务费"-->
284
                    <!--android:paddingBottom="5dp"-->
285
                    <!--android:paddingRight="10dp"-->
286
                    <!--android:text=""-->
287
                    <!--android:textColor="@color/black"-->
288
                    <!--android:textColorHint="@color/hintColor"-->
289
                    <!--android:textSize="15sp" />-->
290

291
                <!--&lt;!&ndash;<ImageView&ndash;&gt;-->
292
                    <!--&lt;!&ndash;android:id="@+id/iv_change_suit"&ndash;&gt;-->
293
                    <!--&lt;!&ndash;android:layout_width="20dp"&ndash;&gt;-->
294
                    <!--&lt;!&ndash;android:layout_height="match_parent"&ndash;&gt;-->
295
                    <!--&lt;!&ndash;android:layout_alignParentEnd="true"&ndash;&gt;-->
296
                    <!--&lt;!&ndash;android:layout_alignParentRight="true"&ndash;&gt;-->
297
                    <!--&lt;!&ndash;android:layout_centerVertical="true"&ndash;&gt;-->
298
                    <!--&lt;!&ndash;android:contentDescription="@null"&ndash;&gt;-->
299
                    <!--&lt;!&ndash;android:src="@drawable/grey_right" />&ndash;&gt;-->
300

301
            <!--</RelativeLayout>-->
302

303
            <!--<View-->
304
                <!--android:layout_width="fill_parent"-->
305
                <!--android:layout_height="0.5dp"-->
306
                <!--android:layout_marginLeft="8dp"-->
307
                <!--android:layout_marginRight="8dp"-->
308
                <!--android:background="@color/in_line" />-->
309

310
            <!--<RelativeLayout-->
311
                <!--android:id="@+id/rl_open"-->
312
                <!--android:layout_width="match_parent"-->
313
                <!--android:layout_marginLeft="8dp"-->
314
                <!--android:layout_marginRight="8dp"-->
315
                <!--android:background="@color/bg_row"-->
316
                <!--android:layout_height="50dp">-->
317

318
                <!--<TextView-->
319
                    <!--android:id="@+id/tv_open_title"-->
320
                    <!--android:layout_width="wrap_content"-->
321
                    <!--android:layout_height="wrap_content"-->
322
                    <!--android:layout_alignParentLeft="true"-->
323
                    <!--android:layout_centerVertical="true"-->
324
                    <!--android:paddingBottom="5dp"-->
325
                    <!--android:paddingLeft="10dp"-->
326
                    <!--android:paddingRight="15dp"-->
327
                    <!--android:text="停车场类型"-->
328
                    <!--android:textColor="@color/title_row"-->
329
                    <!--android:textSize="16sp" />-->
330

331
                <!--<Switch-->
332
                    <!--android:id="@+id/sw_parkLocation"-->
333
                    <!--android:layout_width="wrap_content"-->
334
                    <!--android:layout_height="wrap_content"-->
335
                    <!--android:layout_marginRight="25dp"-->
336
                    <!--android:textOn="地下"-->
337
                    <!--android:textOff="地上"-->
338
                    <!--android:layout_centerVertical="true"-->
339
                    <!--android:layout_alignParentRight="true"-->
340
                    <!--android:layout_alignParentEnd="true" />-->
341

342
            <!--</RelativeLayout>-->
343
            <!--<View-->
344
                <!--android:layout_width="fill_parent"-->
345
                <!--android:layout_height="0.5dp"-->
346
                <!--android:layout_marginLeft="8dp"-->
347
                <!--android:layout_marginRight="8dp"-->
348
                <!--android:background="@color/in_line" />-->
349

350
            <!--<RelativeLayout-->
351
                <!--android:id="@+id/rl_zhuanyou"-->
352
                <!--android:layout_width="match_parent"-->
353
                <!--android:layout_marginLeft="8dp"-->
354
                <!--android:layout_marginRight="8dp"-->
355
                <!--android:background="@color/bg_row"-->
356
                <!--android:layout_height="50dp">-->
357

358
                <!--<TextView-->
359
                    <!--android:id="@+id/tv_parkCost"-->
360
                    <!--android:layout_width="wrap_content"-->
361
                    <!--android:layout_height="wrap_content"-->
362
                    <!--android:layout_alignParentLeft="true"-->
363
                    <!--android:layout_centerVertical="true"-->
364
                    <!--android:paddingBottom="5dp"-->
365
                    <!--android:paddingLeft="10dp"-->
366
                    <!--android:paddingRight="15dp"-->
367
                    <!--android:text="停车费"-->
368
                    <!--android:textColor="@color/title_row"-->
369
                    <!--android:textSize="16sp" />-->
370

371
                <!--<EditText-->
372
                    <!--android:id="@+id/et_parkCost"-->
373
                    <!--style="?android:attr/textViewStyle"-->
374
                    <!--android:layout_width="245dp"-->
375
                    <!--android:layout_height="match_parent"-->
376
                    <!--android:layout_alignParentEnd="true"-->
377
                    <!--android:layout_alignParentRight="true"-->
378
                    <!--android:layout_centerVertical="true"-->
379
                    <!--android:layout_marginRight="15dp"-->
380
                    <!--android:gravity="center|right"-->
381
                    <!--android:background="@null"-->
382
                    <!--android:contentDescription="@null"-->
383
                    <!--android:paddingBottom="5dp"-->
384
                    <!--android:paddingRight="10dp"-->
385
                    <!--android:hint="请您填写停车费"-->
386
                    <!--android:textColor="@color/hintColor"-->
387
                    <!--android:textSize="15sp" />-->
388

389
            <!--</RelativeLayout>-->
390
            <!--<View-->
391
                <!--android:layout_width="fill_parent"-->
392
                <!--android:layout_height="0.5dp"-->
393
                <!--android:layout_marginLeft="8dp"-->
394
                <!--android:layout_marginRight="8dp"-->
395
                <!--android:background="@color/in_line" />-->
396
            <!--<View-->
397
                <!--android:layout_width="fill_parent"-->
398
                <!--android:layout_height="wrap_content"-->
399
                <!--android:background="@drawable/share_line" />-->
400 97

401 98
            <View
402 99
                android:layout_width="match_parent"
403 100
                android:layout_height="0.5dp"
404
                android:background="@color/Line"/>
101
                android:background="@color/Line" />
405 102

406 103
            <EditText
407 104
                android:id="@+id/et_alterinfo"
@ -409,39 +106,33 @@
409 106
                android:layout_height="150dp"
410 107
                android:background="@color/white"
411 108

109
                android:gravity="top|left"
412 110
                android:hint="请输入正确的站点信息..."
413
                android:textColorHint="@color/hintColor"
414 111
                android:paddingLeft="16dp"
415
                android:paddingRight="16dp"
416 112
                android:paddingTop="8dp"
113
                android:paddingRight="16dp"
417 114
                android:paddingBottom="8dp"
418
                android:textSize="15sp"
419
                android:gravity="top|left"
420 115
                android:text=""
421
                android:textColor="@color/title_row"/>
116
                android:textColor="@color/title_row"
117
                android:textColorHint="@color/hintColor"
118
                android:textSize="15sp" />
422 119

423 120
            <View
424 121
                android:layout_width="match_parent"
425 122
                android:layout_height="0.5dp"
426
                android:background="@color/Line"/>
427

428

429

430

431

123
                android:background="@color/Line" />
432 124

433 125
            <ImageView
434 126
                android:id="@+id/tv_one"
435 127
                android:layout_width="wrap_content"
436 128
                android:layout_height="wrap_content"
437 129
                android:layout_gravity="center"
438

439 130
                android:layout_marginTop="45dp"
440 131
                android:gravity="center"
441
                android:text="2分"
442 132
                android:padding="5dp"
443 133
                android:scaleType="fitXY"
444 134
                android:src="@drawable/icon_pointt"
135
                android:text="2分"
445 136
                android:textColor="#fff"
446 137
                android:visibility="gone" />
447 138
        </LinearLayout>
@ -450,21 +141,17 @@
450 141
    <RelativeLayout
451 142
        android:layout_width="match_parent"
452 143
        android:layout_height="match_parent">
144

453 145
        <TextView
454 146
            android:id="@+id/tv_submit"
455 147
            android:layout_width="match_parent"
456 148
            android:layout_height="45dp"
149
            android:layout_alignParentBottom="true"
150
            android:layout_centerHorizontal="true"
457 151
            android:background="@color/lvse"
152
            android:gravity="center"
458 153
            android:text="提 交"
459 154
            android:textColor="@color/white"
460
            android:textSize="17sp"
461
            android:gravity="center"
462
            android:layout_alignParentBottom="true"
463
            android:layout_centerHorizontal="true" />
155
            android:textSize="17sp" />
464 156
    </RelativeLayout>
465

466

467

468

469

470 157
</LinearLayout>

+ 1 - 1
app/src/main/res/layout/activity_main_map.xml

@ -933,7 +933,7 @@
933 933
        android:layout_alignParentBottom="true"
934 934
        android:background="@color/white"
935 935
        android:visibility="gone"
936
        tools:visibility="visible">
936
        tools:visibility="gone">
937 937
938 938
        <LinearLayout
939 939
            android:layout_width="match_parent"