2c2fcd6b71575732dc120900cdeR863">863
            return new DecimalFormat("0").format(v);
864
        }
865
        String formatStr = "0.";
866
        for (int i = 0; i < scale; i++) {
867
            formatStr = formatStr + "0";
868
        }
869
        return new DecimalFormat(formatStr).format(v);
870
    }
871
872
873
    public void shite(String s) throws Exception {
874
875
876
        Map<String, String> par = new HashMap<String, String>();
877
        String file;
878
        long appTime1 = System.currentTimeMillis() / 1000;
879
        Log.i("appTime(long)---", appTime1 + "");
880
        long updatetime = appTime1 - MainMapActivity.cha;
881
        Log.i("updatetime(long)---", updatetime + "");
882
        Log.i("cha---", MainMapActivity.cha + "");
883
        String token = String.valueOf(updatetime);
884
        Log.i("token---", token);
885
886
        if (selectBitmap[0] == null || selectBitmap[1] == null || selectBitmap[2] == null) {
887
            isTakePhoto = true;
888
        }
889
890
        if (isTakePhoto) {
891
            for (int i = 0; i < selectBitmap.length; i++) {
892
                if (selectBitmap[i] != null) {
893
                    try {
894
                        bm = imageZoom(selectBitmap[i].getBitmap());
895
                        file = bitmapToBase64(bm);
896
                        par.put("file" + (i + 1), file);
897
                        par.put("filename" + (i + 1), "androidapp.jpg");
898
                    } catch (Exception e) {
899
                        e.printStackTrace();
900
                    }
901
                }
902
            }
903
        }
904
905
        par.put("id", recordId);
906
        par.put("zhan_name", zhanName.getText().toString());
907
        par.put("zhan_id", zhanId);
908
        par.put("user_id", MainApplication.userId);
909
        par.put("zhan_address", et_share_address.getText().toString());
910
911
        String jingg = roundByScale(Double.parseDouble(jing), 16);
912
        String weii = roundByScale(Double.parseDouble(wei), 16);
913
        par.put("poi_jing", jingg);
914
        par.put("poi_wei", weii);
915
        par.put("total_num", "");
916
        par.put("fast_num", fastNum.getText().toString());
917
        par.put("slow_num", slowNum.getText().toString());
918
        par.put("open_object", "");
919
        par.put("charges", "");
920
        par.put("stop_cost", parkCost.getText().toString());
921
        par.put("stop_cost_way", "");
922
        par.put("charge_cost", chargeCost.getText().toString());
923
        par.put("charge_cost_way", "");
924
        par.put("telephone", telephone.getText().toString());
925
        par.put("charge_cost_way", chargeCostWay.getText().toString());
926
        par.put("other_cost", et_serviceCost.getText().toString());
927
        par.put("zhuang_produce", "");
928
        par.put("remarks", et_remark.getText().toString());
929
        Log.e("remarks", et_remark.getText().toString());
930
        par.put("city", "");
931
        par.put("supplier", costWay.getText().toString());
932
        par.put("facilities_classify", "");
933
        par.put("belong_attribute", "");
934
        par.put("operation_state", "");
935
        par.put("work_open", open_time.getText().toString());
936
        par.put("work_close", close_time.getText().toString());
937
        par.put("holiday_open", "");
938
        par.put("holiday_close", "");
939
        par.put("company_name", "");
940
        par.put("person_name", "");
941
        par.put("zhuang_num", "");
942
        par.put("zy_num", "");
943
        par.put("suit_car", suit_car2);
944
        par.put("park_location", park);
945
        par.put("token", DES3.encode(token));
946
        try {
947
            String u = UploadUtil.post(MainApplication.url + "/zhannew/basic/web/index.php/zhanlist/add", par, null);
948
            Message msg = new Message();
949
            msg.obj = u;
950
            msg.what = 2;
951
            handler.sendMessage(msg);
952
        } catch (IOException e) {
953
            e.printStackTrace();
954
        }
955
    }
956
957
    @Override
958
    public void onRequestPermissionsResult(int requestCode,
959
                                           @NonNull String[] permissions,
960
                                           @NonNull int[] grantResults) {
961
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
962
963
        // EasyPermissions handles the request result.
964
        EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
965
    }
966
967
    @Override
968
    public void onPermissionsGranted(int requestCode, List<String> perms) {
969
970
    }
971
972
    @Override
973
    public void onPermissionsDenied(int requestCode, List<String> perms) {
974
975
    }
976
977
    @AfterPermissionGranted(RC_ALBUM_PERM)
978
    public void permissionTask() {
979
        if (isPermissionOK()) {
980
            callGallery();
981
        } else {
982
            // Ask for one permission
983
            EasyPermissions.requestPermissions(
984
                    this, "充电桩想要获取您的图片读取权限,是否允许?",
985
                    RC_ALBUM_PERM,
986
                    Manifest.permission.WRITE_EXTERNAL_STORAGE,
987
                    Manifest.permission.READ_EXTERNAL_STORAGE);
988
        }
989
    }
990
991
    private boolean isPermissionOK() {
992
        return EasyPermissions.hasPermissions(this,
993
                Manifest.permission.WRITE_EXTERNAL_STORAGE,
994
                Manifest.permission.READ_EXTERNAL_STORAGE
995
        );
996
    }
997
998
999
    public String getString(String s) {
1000
        String path = null;
1001
        if (s == null)
1002
            return "";
1003
        for (int i = s.length() - 1; i > 0; i++) {
1004
            s.charAt(i);
1005
        }
1006
        return path;
1007
    }
1008
1009
    protected void onRestart() {
1010
        super.onRestart();
1011
    }
1012
1013
    private static final int TAKE_PICTURE = 0x000001;
1014
1015
    public void photo() {
1016
        if (hasSdcard()) {
1017
            Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
1018
            Uri photoURI = FileProvider.getUriForFile(getApplicationContext(), getApplicationContext().getPackageName() + ".provider", tempFile);
1019
            intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);
1020
            startActivityForResult(intent, PHOTO_REQUEST_CAMERA);
1021
        }
1022
    }
1023
1024
1025
    @Override
1026
    protected void onDestroy() {
1027
        super.onDestroy();
1028
    }
1029
1030
1031
    private Bitmap compressBmpFromBmp(Bitmap image) {
1032
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
1033
        int options = 100;
1034
        image.compress(Bitmap.CompressFormat.JPEG, 60, baos);
1035
        while (baos.toByteArray().length / 1024 > 200) {
1036
            baos.reset();
1037
            options -= 10;
1038
            image.compress(Bitmap.CompressFormat.JPEG, options, baos);
1039
        }
1040
        ByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());
1041
        Bitmap bitmap = BitmapFactory.decodeStream(isBm, null, null);
1042
        return bitmap;
1043
    }
1044
1045
1046
    private void crop(Uri uri, Uri cutImgUri) {
1047
        Intent intent = new Intent("com.android.camera.action.CROP");
1048
        intent.setDataAndType(uri, "image/*");
1049
        intent.putExtra("crop", "true");
1050
        intent.putExtra("outputFormat", "JPEG");
1051
        intent.putExtra("noFaceDetection", true);
1052
        intent.putExtra("return-data", false);
1053
        intent.putExtra(MediaStore.EXTRA_OUTPUT, cutImgUri);
1054
        startActivityForResult(intent, PHOTO_REQUEST_CUT);
1055
    }
1056
1057
    private boolean hasSdcard() {
1058
        if (Environment.getExternalStorageState().equals(
1059
                Environment.MEDIA_MOUNTED)) {
1060
            return true;
1061
        } else {
1062
            return false;
1063
        }
1064
    }
1065
1066
    private static String getPath(String path) {
1067
        File f = new File(path);
1068
        if (!f.exists()) {
1069
            f.mkdirs();
1070
        }
1071
        return f.getAbsolutePath();
1072
    }
1073
1074
    private File getFile(String path) {
1075
        File f = new File(path);
1076
        if (!f.exists()) {
1077
            try {
1078
                f.createNewFile();
1079
            } catch (IOException e) {
1080
                e.printStackTrace();
1081
            }
1082
        }
1083
        return f;
1084
    }
1085
1086
1087
    private Bitmap compressImage(Bitmap image) {
1088
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
1089
        image.compress(Bitmap.CompressFormat.JPEG, 80, baos);//质量压缩方法,这里100表示不压缩,把压缩后的数据存放到baos中
1090
        int options = 70;
1091
        while (baos.toByteArray().length / 1024 > 300) {    //循环判断如果压缩后图片是否大于100kb,大于继续压缩
1092
            baos.reset();//重置baos即清空baos
1093
            options -= 10;//每次都减少10
1094
            image.compress(Bitmap.CompressFormat.JPEG, options, baos);//这里压缩options%,把压缩后的数据存放到baos中
1095
1096
        }
1097
        ByteArrayInputStream isBm = new ByteArrayInputStream(baos.toByteArray());//把压缩后的数据baos存放到ByteArrayInputStream中
1098
        Bitmap bitmap = BitmapFactory.decodeStream(isBm, null, null);//把ByteArrayInputStream数据生成图片
1099
        return bitmap;
1100
    }
1101
1102
    private Bitmap imageZoom(Bitmap bm) {
1103
        // 图片允许最大空间 单位:KB
1104
        double maxSize = 200.00;
1105
        // 将bitmap放至数组中,意在bitmap的大小(与实际读取的原文件要大)
1106
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
1107
        bm.compress(Bitmap.CompressFormat.JPEG, 100, baos);
1108
        byte[] b = baos.toByteArray();
1109
        // 将字节换成KB
1110
        double mid = b.length / 1024;
1111
        // 判断bitmap占用空间是否大于允许最大空间 如果大于则压缩 小于则不压缩
1112
        if (mid > maxSize) {
1113
            // 获取bitmap大小 是允许最大大小的多少倍
1114
            double i = mid / maxSize;
1115
            // 开始压缩 此处用到平方根 将宽带和高度压缩掉对应的平方根倍
1116
            // (1.保持刻度和高度和原bitmap比率一致,压缩后也达到了最大大小占用空间的大小)
1117
            bm = zoomImage(bm, bm.getWidth() / Math.sqrt(i), bm.getHeight()
1118
                    / Math.sqrt(i));
1119
        }
1120
1121
1122
        return bm;
1123
    }
1124
1125
    public Bitmap zoomImage(Bitmap bgimage, double newWidth, double newHeight) {
1126
        // 获取这个图片的宽和高
1127
        float width = bgimage.getWidth();
1128
        float height = bgimage.getHeight();
1129
        // 创建操作图片用的matrix对象
1130
        Matrix matrix = new Matrix();
1131
        // 计算宽高缩放率
1132
        float scaleWidth = ((float) newWidth) / width;
1133
        float scaleHeight = ((float) newHeight) / height;
1134
        // 缩放图片动作
1135
        matrix.postScale(scaleWidth, scaleHeight);
1136
        Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, (int) width,
1137
                (int) height, matrix, true);
1138
        return bitmap;
1139
    }
1140
1141
    @Override
1142
    protected void onResume() {
1143
        super.onResume();
1144
        SharedPreferencesUtil sharedPreferencesUtil = new SharedPreferencesUtil(getApplication());
1145
        sharedPreferencesUtil.setFileName("shareInfo");
1146
        jing = sharedPreferencesUtil.getString("poi_jing", "");
1147
        wei = sharedPreferencesUtil.getString("poi_wei", "");
1148
1149
        for (int i = 0; i < selectBitmap.length; i++) {
1150
            ImageItem imageItem = selectBitmap[i];
1151
            if (imageItem == null) {
1152
                takeImageCameraList.get(i).setVisibility(View.VISIBLE);
1153
                ImageView takeImageView = takeImageViewList.get(i);
1154
                takeImageView.setImageResource(Res.getDrawableID("add_picture_" + (i + 1)));
1155
                takeImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
1156
1157
                ConstraintLayout.LayoutParams lp = (ConstraintLayout.LayoutParams) takeImageView.getLayoutParams();
1158
                lp.width = ViewGroup.LayoutParams.WRAP_CONTENT;
1159
                lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
1160
                takeImageView.setLayoutParams(lp);
1161
1162
            } else {
1163
                takeImageCameraList.get(i).setVisibility(View.GONE);
1164
            }
1165
        }
1166
1167
    }
1168
1169
    private void getZhanInfo() {
1170
        try {
1171
            long appTime1 = System.currentTimeMillis() / 1000;
1172
            long updatetime = appTime1 - MainMapActivity.cha - 3;
1173
            String token = String.valueOf(updatetime);
1174
            final String replace = URLEncoder.encode(DES3.encode(token));
1175
            String url = MainApplication.url + "/zhannew/basic/web/index.php/zhanlist/getdeny?zhan_id=" + zhanId
1176
                    + "&token=" + replace;
1177
            OkHttpUtils.get().url(url).build().execute(new StringCallback() {
1178
                @Override
1179
                public void onError(Call call, Exception e) {
1180
                    dismissDialog();
1181
                    ToastUtil.showToast(getApplicationContext(), "网络异常,请检查您的网络连接", Toast.LENGTH_SHORT);
1182
                    CrashReport.postCatchedException(e);
1183
                    finish();
1184
                }
1185
1186
                @Override
1187
                public void onResponse(String response) {
1188
                    dismissDialog();
1189
                    String info = JsonUtils.getKeyResult(response, "info");
1190
                    String pic = JsonUtils.getKeyResult(response, "pic");
1191
                    if (info != null && !info.equals("")) {
1192
                        initZhanInfo(info, pic);
1193
                    } else {
1194
                        showTextToast("获取站点信息错误");
1195
                        finish();
1196
                    }
1197
                }
1198
            });
1199
        } catch (Exception e) {
1200
            e.printStackTrace();
1201
        }
1202
    }
1203
1204
    private void initZhanInfo(String info, String pic) {
1205
        try {
1206
            JSONObject jsonObject = new JSONObject(info);
1207
            recordId = jsonObject.getString("id");
1208
            zhanName.setText(jsonObject.getString("zhan_name"));
1209
            et_share_address.setText(jsonObject.getString("zhan_address"));
1210
            suit_car2 = jsonObject.getString("suit_car");
1211
            if ("特斯拉".equals(suit_car2)) {
1212
                rb_guo.setBackgroundResource(R.drawable.icon_guonormal1105);
1213
                rb_te.setBackgroundResource(R.drawable.icon_teselected1105);
1214
            } else {
1215
                rb_guo.setBackgroundResource(R.drawable.icon_guoselected1105);
1216
                rb_te.setBackgroundResource(R.drawable.icon_tenormal1105);
1217
            }
1218
1219
            fastNum.setText(jsonObject.getString("fast_num"));
1220
            slowNum.setText(jsonObject.getString("slow_num"));
1221
            chargeCost.setText(jsonObject.getString("charge_cost"));
1222
            et_serviceCost.setText(jsonObject.getString("other_cost"));
1223
            chargeCostWay.setText(jsonObject.getString("charge_cost_way"));
1224
            parkCost.setText(jsonObject.getString("stop_cost"));
1225
            costWay.setText(jsonObject.getString("supplier"));
1226
            telephone.setText(jsonObject.getString("telephone"));
1227
1228
            park = jsonObject.getString("park_location");
1229
            if ("1".equals(park)) {
1230
                rb_shang.setBackgroundResource(R.drawable.icon_shangselected1105);
1231
                rb_xia.setBackgroundResource(R.drawable.icon_xianormal1105);
1232
            } else {
1233
                rb_shang.setBackgroundResource(R.drawable.icon_shangnormal1105);
1234
                rb_xia.setBackgroundResource(R.drawable.icon_xiaselected1105);
1235
            }
1236
1237
            open_time.setText(jsonObject.getString("work_open"));
1238
            close_time.setText(jsonObject.getString("work_close"));
1239
1240
            SharedPreferences mSharedPreferences = getSharedPreferences("shareInfo", Activity.MODE_PRIVATE);
1241
            SharedPreferences.Editor editor = mSharedPreferences.edit();
1242
            editor.putString("poi_jing", jsonObject.getString("poi_jing"));
1243
            editor.putString("poi_wei", jsonObject.getString("poi_wei"));
1244
            editor.commit();
1245
1246
            jing = jsonObject.getString("poi_jing");
1247
            wei = jsonObject.getString("poi_wei");
1248
1249
            et_remark.setText(jsonObject.getString("remarks"));
1250
1251
1252
        } catch (Exception e) {
1253
            e.printStackTrace();
1254
            showTextToast("获取站点信息错误");
1255
        }
1256
1257
        try {
1258
            JSONArray jsonArray = new JSONArray(pic);
1259
            for (int i = 0; i < jsonArray.length(); i++) {
1260
                JSONObject jo = new JSONObject(jsonArray.get(i).toString());
1261
                String url = jo.get("url").toString();
1262
                int finalI = i;
1263
                Glide.with(this).load(MainApplication.url + "/zhannew/uploadfile/" + url).listener(new RequestListener<Drawable>() {
1264
                    @Override
1265
                    public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
1266
                        return false;
1267
                    }
1268
1269
                    @Override
1270
                    public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
1271
                        takeImageCameraList.get(finalI).setVisibility(View.GONE);
1272
                        ImageView iv = takeImageViewList.get(finalI);
1273
                        iv.setScaleType(ImageView.ScaleType.CENTER_CROP);
1274
                        ConstraintLayout.LayoutParams lp = (ConstraintLayout.LayoutParams) iv.getLayoutParams();
1275
                        lp.width = DensityUtil.dip2px(ShareTwoEditActivity.this, 82);
1276
                        lp.height = DensityUtil.dip2px(ShareTwoEditActivity.this, 70);
1277
                        iv.setLayoutParams(lp);
1278
                        new Handler().postDelayed(new Runnable() {
1279
                            @Override
1280
                            public void run() {
1281
                                BitmapDrawable drawable = (BitmapDrawable) iv.getDrawable();
1282
                                Bitmap bitmap = drawable.getBitmap();
1283
                                ImageItem takePhoto = new ImageItem();
1284
                                takePhoto.setBitmap(bitmap);
1285
                                selectBitmap[finalI] = takePhoto;
1286
                            }
1287
                        }, 500);// 0.5秒后,执行
1288
                        return false;
1289
                    }
1290
                }).into(takeImageViewList.get(i));
1291
            }
1292
1293
1294
        } catch (Exception e) {
1295
            e.printStackTrace();
1296
        }
1297
    }
1298
}

+ 14 - 2
app/src/main/java/com/electric/chargingpile/activity/ShareTwoPictureActivity.java

@ -14,6 +14,7 @@ public class ShareTwoPictureActivity extends AppCompatActivity {
14 14
    private TextView gallery_del;
15 15
    private int selectIndex;
16 16
    private ImageView picture;
17
    private String from;
17 18
18 19
    @Override
19 20
    protected void onCreate(Bundle savedInstanceState) {
@ -24,9 +25,15 @@ public class ShareTwoPictureActivity extends AppCompatActivity {
24 25
25 26
    private void initView() {
26 27
        selectIndex = getIntent().getIntExtra("selectIndex", 0);
28
        from = getIntent().getStringExtra("from");
27 29
        picture = findViewById(R.id.picture);
28 30
29
        picture.setImageBitmap(ShareTwoActivity.selectBitmap[selectIndex].getBitmap());
31
        if ("edit".equals(from)) {
32
            picture.setImageBitmap(ShareTwoEditActivity.selectBitmap[selectIndex].getBitmap());
33
        } else {
34
            picture.setImageBitmap(ShareTwoActivity.selectBitmap[selectIndex].getBitmap());
35
        }
36
30 37
        gallery_icon = findViewById(R.id.gallery_icon);
31 38
        gallery_icon.setOnClickListener(new View.OnClickListener() {
32 39
            @Override
@ -38,7 +45,12 @@ public class ShareTwoPictureActivity extends AppCompatActivity {
38 45
        gallery_del.setOnClickListener(new View.OnClickListener() {
39 46
            @Override
40 47
            public void onClick(View v) {
41
                ShareTwoActivity.selectBitmap[selectIndex] = null;
48
                if ("edit".equals(from)) {
49
                    ShareTwoEditActivity.selectBitmap[selectIndex] = null;
50
                } else {
51
                    ShareTwoActivity.selectBitmap[selectIndex] = null;
52
                }
53
42 54
                finish();
43 55
            }
44 56
        });

+ 41 - 62
app/src/main/java/com/electric/chargingpile/adapter/ShareListAdapter.java

@ -1,10 +1,10 @@
1 1
package com.electric.chargingpile.adapter;
2 2
3
import android.util.Log;
4 3
import android.view.LayoutInflater;
5 4
import android.view.View;
6 5
import android.view.ViewGroup;
7 6
import android.widget.BaseAdapter;
7
import android.widget.LinearLayout;
8 8
import android.widget.TextView;
9 9
10 10
import com.electric.chargingpile.R;
@ -21,8 +21,13 @@ import java.util.Date;
21 21
 */
22 22
public class ShareListAdapter extends BaseAdapter {
23 23
    private ArrayList<JSONObject> datas;
24
    private OnEditListener editListener;
24 25
25 26
27
    public void setEditListener(OnEditListener editListener) {
28
        this.editListener = editListener;
29
    }
30
26 31
    public ShareListAdapter(ArrayList<JSONObject> datas) {
27 32
        setData(datas);
28 33
    }
@ -68,20 +73,26 @@ public class ShareListAdapter extends BaseAdapter {
68 73
        if (holder == null) {
69 74
            holder = new ViewHolder();
70 75
71
            holder.tv_shareName = (TextView) convertView
72
                    .findViewById(R.id.tv_shareName);
73
            holder.tv_shareAddress = (TextView) convertView
74
                    .findViewById(R.id.tv_shareAddress);
75
            holder.tv_shareTime = (TextView) convertView
76
                    .findViewById(R.id.tv_shareTime);
77
//            holder.tv_id = (TextView) convertView.findViewById(R.id.tv_id);
76
            holder.tv_shareName = (TextView) convertView.findViewById(R.id.tv_shareName);
77
            holder.tv_shareAddress = (TextView) convertView.findViewById(R.id.tv_shareAddress);
78
            holder.tv_shareTime = (TextView) convertView.findViewById(R.id.tv_shareTime);
78 79
            holder.tv_shareState = (TextView) convertView.findViewById(R.id.tv_shareState);
80
            holder.tv_reason = convertView.findViewById(R.id.tv_reason);
81
            holder.tv_edit = convertView.findViewById(R.id.tv_edit);
82
            holder.tv_edit.setOnClickListener(new View.OnClickListener() {
83
                @Override
84
                public void onClick(View v) {
85
                    if (editListener != null) {
86
                        try {
87
                            editListener.edit(datas.get(position).getString("zhan_id"));
88
                        } catch (Exception e) {
89
                            e.printStackTrace();
90
                        }
91
                    }
92
                }
93
            });
79 94
80 95
81
//            holder.tv_write = (TextView) convertView
82
//                    .findViewById(R.id.tv_write);
83
//            holder.tv_claimState = (TextView) convertView
84
//                    .findViewById(R.id.tv_claimState);
85 96
        }
86 97
87 98
        if (holder != null && convertView != null) {
@ -90,17 +101,10 @@ public class ShareListAdapter extends BaseAdapter {
90 101
91 102
        {
92 103
            try {
93
                Log.i("zhan_name", datas.get(position).getString(
94
                        "zhan_name"));
95
                holder.tv_shareName.setText(datas.get(position).getString(
96
                        "zhan_name"));
97
//                holder.tv_id.setText(datas.get(position).getString(
98
//                        "zhan_id"));
99
                holder.tv_shareAddress.setText(datas.get(position).getString(
100
                        "zhan_address"));
104
                holder.tv_shareName.setText(datas.get(position).getString("zhan_name"));
105
                holder.tv_shareAddress.setText(datas.get(position).getString("zhan_address"));
101 106
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
102
                String date = sdf.format(new Date(Long.parseLong(datas.get(
103
                        position).getLong("inputtime") + "000")));
107
                String date = sdf.format(new Date(Long.parseLong(datas.get(position).getLong("inputtime") + "000")));
104 108
                holder.tv_shareTime.setText(date);
105 109
                if ((datas.get(position).getString("status")).equals("1")) {
106 110
                    holder.tv_shareState.setText("正在审核中");
@ -113,50 +117,19 @@ public class ShareListAdapter extends BaseAdapter {
113 117
                if ((datas.get(position).getString("status")).equals("3")) {
114 118
                    holder.tv_shareState.setText("信息不完善");
115 119
                    holder.tv_shareState.setTextColor(convertView.getResources().getColor(R.color.juhuang));
120
                    holder.tv_reason.setText("原因:" + datas.get(position).getString("deny_inf"));
121
                    holder.tv_reason.setVisibility(View.VISIBLE);
122
                    holder.tv_edit.setVisibility(View.VISIBLE);
123
                } else {
124
                    holder.tv_reason.setVisibility(View.GONE);
125
                    holder.tv_edit.setVisibility(View.GONE);
116 126
                }
127
117 128
                if ((datas.get(position).getString("status")).equals("0")) {
118 129
                    holder.tv_shareState.setText("添加未通过");
119 130
                    holder.tv_shareState.setTextColor(convertView.getResources().getColor(R.color.hongse));
120 131
                }
121 132
122
//                holder.tv_write.setTag((datas.get(
123
//                        position).getString("record_time")));
124
//                final String poi_jing = datas.get(position).getString("poi_jing");
125
//                final String poi_wei = datas.get(position).getString("poi_wei");
126
////                String zhan_id = datas.get(position).getString("zhan_id");
127
//                Log.i("!!!!!!!",poi_jing+"---"+poi_wei);
128
//                holder.tv_write.setOnClickListener(new View.OnClickListener() {
129
//                    @Override
130
//                    public void onClick(View view) {
131
//
132
//                            Intent intent = new Intent(view.getContext(), ClaimSurveyOneActivity.class);
133
//                            try {
134
//                                intent.putExtra("zhan_id", datas.get(position).getString("zhan_id"));
135
//                                Log.i("--------",datas.get(position).getString("zhan_id"));
136
//                                intent.putExtra("poi_jing",datas.get(position).getString("poi_jing"));
137
//                                Log.i("--------",datas.get(position).getString("poi_jing"));
138
//                                intent.putExtra("poi_wei",datas.get(position).getString("poi_wei"));
139
//                                Log.i("--------",datas.get(position).getString("poi_wei"));
140
//                            } catch (JSONException e) {
141
//                                e.printStackTrace();
142
//                            }
143
//                            view.getContext().startActivity(intent);
144
//                        }
145
//
146
//
147
//                });
148
//                taskStage = datas.get(position).getString("taskStage");
149
//                holder.tv_claimState.setTag((datas.get(
150
//                        position).getString("record_time")));
151
//                holder.tv_claimState.setOnClickListener(new View.OnClickListener() {
152
//                    @Override
153
//                    public void onClick(View view) {
154
////                        Toast.makeText(view.getContext(),"请等待后台审核您提交的数据",Toast.LENGTH_SHORT).show();
155
//                        Intent intent = new Intent(view.getContext(), ClaimStateActivity.class);
156
//                        intent.putExtra("taskStage",taskStage);
157
//                        view.getContext().startActivity(intent);
158
//                    }
159
//                });
160 133
            } catch (JSONException e) {
161 134
                e.printStackTrace();
162 135
            }
@ -166,8 +139,14 @@ public class ShareListAdapter extends BaseAdapter {
166 139
    }
167 140
168 141
    private class ViewHolder {
169
        TextView tv_shareName, tv_shareAddress, tv_shareTime, tv_shareState, tv_write, tv_claimState,
170
                tv_taskStage, tv_id, poi_jing, poi_wei;
142
        TextView tv_shareName, tv_shareAddress, tv_shareTime, tv_shareState, tv_reason;
143
        LinearLayout tv_edit;
171 144
    }
172 145
146
147
    public interface OnEditListener {
148
        void edit(String zhanId);
149
    }
150
151
173 152
}

+ 8 - 0
app/src/main/res/drawable/btn_edit_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
5
    <corners android:radius="2dp" /> <!-- 圆角大小 -->
6
    <stroke android:width="0.5dp" android:color="#AEAEAE"/> <!-- 边框颜色 -->
7
8
</shape>

+ 3 - 3
app/src/main/res/layout/activity_share_two.xml

@ -23,7 +23,7 @@
23 23
            android:layout_centerVertical="true"
24 24
            android:contentDescription="@null"
25 25
            android:paddingLeft="44px"
26

26
            android:paddingRight="44px"
27 27
            android:src="@drawable/icon_lvback1119" />
28 28

29 29
        <TextView
@ -770,7 +770,7 @@
770 770
                    android:layout_weight="5"
771 771
                    android:background="@color/white"
772 772
                    android:gravity="center|right"
773
                    android:hint="特来电APP"
773
                    android:hint="请填写充电收费方式"
774 774
                    android:inputType="text"
775 775
                    android:text=""
776 776
                    android:textColor="@color/ui_62"
@ -937,7 +937,7 @@
937 937
                    android:layout_weight="5"
938 938
                    android:background="@color/white"
939 939
                    android:gravity="center|right"
940
                    android:hint="请输入电话号码"
940
                    android:hint="请填写运营商电话"
941 941
                    android:inputType="text"
942 942
                    android:text=""
943 943
                    android:textColor="@color/ui_62"

+ 1126 - 0
app/src/main/res/layout/activity_share_two_edit.xml

@ -0,0 +1,1126 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    android:id="@+id/claim"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="@color/activity_bgcolor"
8
    android:focusable="true"
9
    android:focusableInTouchMode="true">
10

11
    <com.zhy.autolayout.AutoRelativeLayout
12
        android:id="@+id/rl_title"
13
        android:layout_width="fill_parent"
14
        android:layout_height="130px"
15
        android:layout_alignParentTop="true"
16
        android:background="@color/title_background">
17

18
        <ImageView
19
            android:id="@+id/iv_back"
20
            android:layout_width="wrap_content"
21
            android:layout_height="match_parent"
22
            android:layout_alignParentLeft="true"
23
            android:layout_centerVertical="true"
24
            android:contentDescription="@null"
25
            android:paddingLeft="44px"
26
            android:paddingRight="44px"
27
            android:src="@drawable/icon_lvback1119" />
28

29
        <TextView
30
            android:id="@+id/textview"
31
            android:layout_width="wrap_content"
32
            android:layout_height="wrap_content"
33
            android:layout_centerInParent="true"
34
            android:text="编辑站点"
35
            android:textColor="@color/ui_62"
36
            android:textSize="16sp" />
37
    </com.zhy.autolayout.AutoRelativeLayout>
38

39
    <View
40
        android:layout_width="match_parent"
41
        android:layout_height="0.5dp"
42
        android:background="@color/ui_titleline"
43
        android:visibility="gone" />
44

45
    <RelativeLayout
46
        android:id="@+id/tv_notice"
47
        android:layout_width="match_parent"
48
        android:layout_height="38dp"
49
        android:background="@drawable/bg_notice1105"
50
        android:orientation="horizontal"
51
        android:visibility="gone">
52

53
        <TextView
54
            android:layout_width="wrap_content"
55
            android:layout_height="wrap_content"
56
            android:layout_centerHorizontal="true"
57
            android:layout_centerVertical="true"
58
            android:layout_gravity="center_horizontal"
59
            android:drawableRight="@drawable/icon_close1105"
60
            android:drawablePadding="16dp"
61
            android:text="轻点地图即可选取位置,添加未被收录的站点"
62
            android:textColor="#099234"
63
            android:textSize="14sp" />
64
    </RelativeLayout>
65

66

67
    <RelativeLayout
68
        android:layout_width="match_parent"
69
        android:layout_height="300dp"
70
        android:visibility="gone">
71

72

73
        <ImageView
74
            android:id="@+id/ib_location"
75
            android:layout_width="wrap_content"
76
            android:layout_height="wrap_content"
77
            android:layout_alignParentStart="true"
78
            android:layout_alignParentLeft="true"
79
            android:layout_alignParentBottom="true"
80
            android:layout_marginStart="8dp"
81
            android:layout_marginLeft="8dp"
82
            android:layout_marginBottom="32dp"
83
            android:background="@drawable/icon_location2_0" />
84

85
        <LinearLayout
86
            android:id="@+id/zoom_in_out"
87
            android:layout_width="wrap_content"
88
            android:layout_height="wrap_content"
89
            android:layout_alignBottom="@+id/iv_point_again"
90
            android:layout_alignParentEnd="true"
91
            android:layout_alignParentRight="true"
92
            android:layout_alignParentBottom="true"
93
            android:layout_marginEnd="8dp"
94
            android:layout_marginRight="8dp"
95
            android:layout_marginBottom="32dp"
96
            android:background="@color/transparent"
97
            android:orientation="vertical">
98

99
            <ImageView
100
                android:id="@+id/zoomin1"
101
                android:layout_width="wrap_content"
102
                android:layout_height="wrap_content"
103
                android:contentDescription="@null"
104
                android:src="@drawable/icon_jia2_0" />
105

106

107
            <ImageView
108
                android:id="@+id/zoomout1"
109
                android:layout_width="wrap_content"
110
                android:layout_height="wrap_content"
111
                android:contentDescription="@null"
112
                android:src="@drawable/icon_jian2_0" />
113
        </LinearLayout>
114

115

116
    </RelativeLayout>
117

118
    <View
119
        android:id="@+id/view_title"
120
        android:layout_width="match_parent"
121
        android:layout_height="0.5dp"
122
        android:layout_below="@+id/rl_title"
123
        android:background="@color/ui_titleline" />
124

125

126
    <ScrollView
127
        android:layout_width="match_parent"
128
        android:layout_height="match_parent"
129
        android:layout_above="@+id/share_next"
130
        android:layout_below="@+id/view_title">
131

132
        <com.zhy.autolayout.AutoLinearLayout
133
            android:layout_width="match_parent"
134
            android:layout_height="match_parent"
135
            android:background="@color/white"
136
            android:orientation="vertical">
137

138
            <com.zhy.autolayout.AutoLinearLayout
139
                android:id="@+id/ll_add_photo"
140
                android:layout_width="match_parent"
141
                android:layout_height="wrap_content"
142
                android:background="@color/bg_row"
143
                android:orientation="vertical"
144
                android:visibility="visible">
145

146
                <GridView
147
                    android:id="@+id/noScrollgridview"
148
                    android:layout_width="match_parent"
149
                    android:layout_height="wrap_content"
150
                    android:layout_marginLeft="16dp"
151
                    android:layout_marginTop="14dp"
152
                    android:layout_marginRight="16dp"
153
                    android:horizontalSpacing="3dp"
154
                    android:numColumns="4"
155
                    android:scrollbars="none"
156
                    android:verticalSpacing="5dp"
157
                    android:visibility="gone"></GridView>
158

159
                <LinearLayout
160
                    android:layout_width="match_parent"
161
                    android:layout_height="wrap_content"
162
                    android:layout_marginLeft="15dp"
163
                    android:layout_marginTop="10dp"
164
                    android:layout_marginRight="15dp"
165
                    android:orientation="horizontal">
166

167
                    <android.support.constraint.ConstraintLayout
168
                        android:id="@+id/take_image_0"
169
                        android:layout_width="0dp"
170
                        android:layout_height="wrap_content"
171
                        android:layout_marginLeft="2.5dp"
172
                        android:layout_marginRight="2.5dp"
173
                        android:layout_weight="1">
174

175
                        <ImageView
176
                            android:id="@+id/take_image_view_0"
177
                            android:layout_width="wrap_content"
178
                            android:layout_height="wrap_content"
179
                            android:src="@drawable/add_picture_1"
180
                            app:layout_constraintBottom_toBottomOf="parent"
181
                            app:layout_constraintLeft_toLeftOf="parent"
182
                            app:layout_constraintRight_toRightOf="parent"
183
                            app:layout_constraintTop_toTopOf="parent" />
184

185
                        <ImageView
186
                            android:id="@+id/take_image_camera_0"
187
                            android:layout_width="wrap_content"
188
                            android:layout_height="wrap_content"
189
                            android:layout_marginTop="5dp"
190
                            android:layout_marginRight="5dp"
191
                            android:src="@drawable/camera_icon"
192
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_0"
193
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_0" />
194

195

196
                    </android.support.constraint.ConstraintLayout>
197

198
                    <android.support.constraint.ConstraintLayout
199
                        android:id="@+id/take_image_1"
200
                        android:layout_width="0dp"
201
                        android:layout_height="wrap_content"
202
                        android:layout_marginLeft="2.5dp"
203
                        android:layout_marginRight="2.5dp"
204
                        android:layout_weight="1">
205

206
                        <ImageView
207
                            android:id="@+id/take_image_view_1"
208
                            android:layout_width="wrap_content"
209
                            android:layout_height="wrap_content"
210
                            android:src="@drawable/add_picture_2"
211
                            app:layout_constraintBottom_toBottomOf="parent"
212
                            app:layout_constraintLeft_toLeftOf="parent"
213
                            app:layout_constraintRight_toRightOf="parent"
214
                            app:layout_constraintTop_toTopOf="parent" />
215

216
                        <ImageView
217
                            android:id="@+id/take_image_camera_1"
218
                            android:layout_width="wrap_content"
219
                            android:layout_height="wrap_content"
220
                            android:layout_marginTop="5dp"
221
                            android:layout_marginRight="5dp"
222
                            android:src="@drawable/camera_icon"
223
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_1"
224
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_1" />
225
                    </android.support.constraint.ConstraintLayout>
226

227
                    <android.support.constraint.ConstraintLayout
228
                        android:id="@+id/take_image_2"
229
                        android:layout_width="0dp"
230
                        android:layout_height="wrap_content"
231
                        android:layout_marginLeft="2.5dp"
232
                        android:layout_marginRight="2.5dp"
233
                        android:layout_weight="1">
234

235
                        <ImageView
236
                            android:id="@+id/take_image_view_2"
237
                            android:layout_width="wrap_content"
238
                            android:layout_height="wrap_content"
239
                            android:src="@drawable/add_picture_3"
240
                            app:layout_constraintBottom_toBottomOf="parent"
241
                            app:layout_constraintLeft_toLeftOf="parent"
242
                            app:layout_constraintRight_toRightOf="parent"
243
                            app:layout_constraintTop_toTopOf="parent" />
244

245
                        <ImageView
246
                            android:id="@+id/take_image_camera_2"
247
                            android:layout_width="wrap_content"
248
                            android:layout_height="wrap_content"
249
                            android:layout_marginTop="5dp"
250
                            android:layout_marginRight="5dp"
251
                            android:src="@drawable/camera_icon"
252
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_2"
253
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_2" />
254
                    </android.support.constraint.ConstraintLayout>
255

256
                    <android.support.constraint.ConstraintLayout
257
                        android:id="@+id/take_image_3"
258
                        android:layout_width="0dp"
259
                        android:layout_height="wrap_content"
260
                        android:layout_marginLeft="2.5dp"
261
                        android:layout_marginRight="2.5dp"
262
                        android:layout_weight="1">
263

264
                        <ImageView
265
                            android:id="@+id/take_image_view_3"
266
                            android:layout_width="wrap_content"
267
                            android:layout_height="wrap_content"
268
                            android:src="@drawable/add_picture_4"
269
                            app:layout_constraintBottom_toBottomOf="parent"
270
                            app:layout_constraintLeft_toLeftOf="parent"
271
                            app:layout_constraintRight_toRightOf="parent"
272
                            app:layout_constraintTop_toTopOf="parent" />
273

274
                        <ImageView
275
                            android:id="@+id/take_image_camera_3"
276
                            android:layout_width="wrap_content"
277
                            android:layout_height="wrap_content"
278
                            android:layout_marginTop="5dp"
279
                            android:layout_marginRight="5dp"
280
                            android:src="@drawable/camera_icon"
281
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_3"
282
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_3" />
283

284
                    </android.support.constraint.ConstraintLayout>
285

286
                </LinearLayout>
287

288
                <RelativeLayout
289
                    android:layout_width="match_parent"
290
                    android:layout_height="wrap_content"
291
                    android:layout_marginLeft="44px"
292
                    android:layout_marginTop="8dp"
293
                    android:layout_marginRight="44px"
294
                    android:layout_marginBottom="8dp">
295

296
                    <TextView
297
                        android:layout_width="wrap_content"
298
                        android:layout_height="wrap_content"
299
                        android:layout_alignParentLeft="true"
300
                        android:layout_centerVertical="true"
301
                        android:text="照片规范:增加通过几率哦~"
302
                        android:textColor="@color/ui_68"
303
                        android:textSize="12sp" />
304

305
                    <ImageView
306
                        android:id="@+id/iv_chakan"
307
                        android:layout_width="wrap_content"
308
                        android:layout_height="wrap_content"
309
                        android:layout_alignParentRight="true"
310
                        android:layout_gravity="center"
311
                        android:src="@drawable/icon_chakan" />
312

313
                </RelativeLayout>
314

315

316
            </com.zhy.autolayout.AutoLinearLayout>
317

318
            <View
319
                android:layout_width="match_parent"
320
                android:layout_height="0.5dp"
321
                android:layout_marginLeft="44px"
322
                android:background="@color/ui_line" />
323

324
            <com.zhy.autolayout.AutoLinearLayout
325
                android:layout_width="match_parent"
326
                android:layout_height="139px"
327
                android:background="@color/bg_row"
328
                android:orientation="horizontal">
329

330
                <TextView
331
                    android:layout_width="wrap_content"
332
                    android:layout_height="wrap_content"
333
                    android:layout_centerInParent="true"
334
                    android:layout_marginLeft="44px"
335
                    android:layout_marginRight="8px"
336
                    android:text="*"
337
                    android:textColor="@color/xinghao"
338
                    android:textSize="15sp" />
339

340
                <TextView
341
                    android:layout_width="wrap_content"
342
                    android:layout_height="wrap_content"
343
                    android:text="站名称"
344
                    android:textColor="@color/ui_65"
345
                    android:textSize="15sp" />
346

347
                <EditText
348
                    android:id="@+id/et_zhanName"
349
                    android:layout_width="0dp"
350
                    android:layout_height="match_parent"
351
                    android:layout_marginLeft="10dp"
352
                    android:layout_marginRight="44px"
353
                    android:layout_weight="5"
354
                    android:background="@color/white"
355
                    android:editable="true"
356
                    android:gravity="center|right"
357
                    android:hint="请以地名或建筑命名"
358
                    android:singleLine="true"
359
                    android:text=""
360
                    android:textColor="@color/ui_62"
361
                    android:textColorHint="@color/ui_68"
362
                    android:textSize="15sp" />
363

364

365
            </com.zhy.autolayout.AutoLinearLayout>
366

367
            <View
368
                android:layout_width="match_parent"
369
                android:layout_height="0.5dp"
370
                android:layout_marginLeft="44px"
371
                android:background="@color/ui_line" />
372

373
            <com.zhy.autolayout.AutoRelativeLayout
374
                android:id="@+id/ll_address"
375
                android:layout_width="match_parent"
376
                android:layout_height="139px"
377
                android:background="@color/bg_row"
378
                android:orientation="horizontal">
379

380
                <TextView
381
                    android:id="@+id/textView25"
382
                    android:layout_width="wrap_content"
383
                    android:layout_height="wrap_content"
384
                    android:layout_alignParentStart="true"
385
                    android:layout_alignParentLeft="true"
386
                    android:layout_centerInParent="true"
387
                    android:layout_marginLeft="44px"
388
                    android:layout_marginRight="8px"
389
                    android:text="*"
390
                    android:textColor="@color/xinghao"
391
                    android:textSize="15sp" />
392

393
                <TextView
394
                    android:id="@+id/address"
395
                    android:layout_width="wrap_content"
396
                    android:layout_height="match_parent"
397
                    android:layout_alignParentTop="true"
398
                    android:layout_toEndOf="@+id/textView25"
399
                    android:layout_toRightOf="@+id/textView25"
400
                    android:gravity="center"
401
                    android:text="站地址"
402
                    android:textColor="@color/ui_65"
403
                    android:textSize="15sp" />
404

405

406
                <TextView
407
                    android:id="@+id/et_share_address"
408
                    style="?android:attr/textViewStyle"
409
                    android:layout_width="match_parent"
410
                    android:layout_height="match_parent"
411
                    android:layout_alignParentTop="true"
412
                    android:layout_alignParentEnd="true"
413
                    android:layout_alignParentRight="true"
414
                    android:layout_marginLeft="30px"
415
                    android:layout_marginEnd="16dp"
416
                    android:layout_marginRight="44px"
417
                    android:layout_toRightOf="@+id/address"
418
                    android:background="@null"
419
                    android:drawableRight="@drawable/icon_select"
420
                    android:drawablePadding="20px"
421
                    android:ellipsize="end"
422
                    android:gravity="center|right"
423
                    android:hint="请选择"
424
                    android:singleLine="true"
425
                    android:text=""
426
                    android:textColor="@color/ui_62"
427
                    android:textColorHint="@color/ui_68"
428
                    android:textSize="15sp" />
429

430

431
            </com.zhy.autolayout.AutoRelativeLayout>
432

433
            <View
434
                android:layout_width="match_parent"
435
                android:layout_height="0.5dp"
436
                android:layout_marginLeft="16dp"
437
                android:background="@color/Line" />
438

439
            <com.zhy.autolayout.AutoRelativeLayout
440
                android:id="@+id/ll_type"
441
                android:layout_width="match_parent"
442
                android:layout_height="139px"
443
                android:background="@drawable/click_effect">
444

445
                <TextView
446
                    android:id="@+id/textView18"
447
                    android:layout_width="wrap_content"
448
                    android:layout_height="wrap_content"
449
                    android:layout_alignTop="@+id/textView19"
450
                    android:layout_alignParentStart="true"
451
                    android:layout_alignParentLeft="true"
452
                    android:layout_centerInParent="true"
453
                    android:layout_marginLeft="44px"
454
                    android:layout_marginRight="8px"
455
                    android:text="*"
456
                    android:textColor="@color/xinghao"
457
                    android:textSize="15sp" />
458

459
                <TextView
460
                    android:id="@+id/textView19"
461
                    android:layout_width="wrap_content"
462
                    android:layout_height="wrap_content"
463
                    android:layout_centerVertical="true"
464
                    android:layout_gravity="center"
465
                    android:layout_toEndOf="@+id/textView18"
466
                    android:layout_toRightOf="@+id/textView18"
467
                    android:text="电桩类型"
468
                    android:textColor="@color/ui_65"
469
                    android:textSize="15sp" />
470

471
                <RadioGroup
472
                    android:id="@+id/rg_claimtype"
473
                    android:layout_width="wrap_content"
474
                    android:layout_height="wrap_content"
475
                    android:layout_alignParentEnd="true"
476
                    android:layout_alignParentRight="true"
477
                    android:layout_centerVertical="true"
478
                    android:layout_marginEnd="16dp"
479
                    android:layout_marginRight="16dp"
480
                    android:orientation="horizontal">
481

482
                    <RadioButton
483
                        android:id="@+id/rb_guo"
484
                        android:layout_width="wrap_content"
485
                        android:layout_height="wrap_content"
486
                        android:layout_marginLeft="44px"
487
                        android:background="@drawable/icon_guoselected1105"
488
                        android:button="@null" />
489

490
                    <RadioButton
491
                        android:id="@+id/rb_te"
492
                        android:layout_width="wrap_content"
493
                        android:layout_height="wrap_content"
494
                        android:layout_marginLeft="44px"
495
                        android:background="@drawable/icon_tenormal1105"
496
                        android:button="@null" />
497
                </RadioGroup>
498

499
            </com.zhy.autolayout.AutoRelativeLayout>
500

501
            <View
502
                android:layout_width="match_parent"
503
                android:layout_height="0.5dp"
504
                android:layout_marginLeft="16dp"
505
                android:background="@color/ui_line" />
506

507
            <com.zhy.autolayout.AutoRelativeLayout
508
                android:layout_width="match_parent"
509
                android:layout_height="139px"
510
                android:background="@color/bg_row">
511

512
                <TextView
513
                    android:id="@+id/textView21"
514
                    android:layout_width="wrap_content"
515
                    android:layout_height="wrap_content"
516
                    android:layout_alignTop="@+id/textView22"
517
                    android:layout_alignParentStart="true"
518
                    android:layout_alignParentLeft="true"
519
                    android:layout_centerInParent="true"
520
                    android:layout_marginLeft="44px"
521
                    android:layout_marginRight="8px"
522
                    android:text="*"
523
                    android:textColor="@color/xinghao"
524
                    android:textSize="15sp" />
525

526
                <TextView
527
                    android:id="@+id/textView22"
528
                    android:layout_width="wrap_content"
529
                    android:layout_height="wrap_content"
530
                    android:layout_alignTop="@+id/imageView3"
531
                    android:layout_toEndOf="@+id/textView21"
532
                    android:layout_toRightOf="@+id/textView21"
533
                    android:text="数量"
534
                    android:textColor="@color/ui_65"
535
                    android:textSize="15sp" />
536

537
                <ImageView
538
                    android:id="@+id/imageView3"
539
                    android:layout_width="wrap_content"
540
                    android:layout_height="wrap_content"
541
                    android:layout_alignTop="@+id/imageView2"
542
                    android:layout_gravity="center"
543
                    android:layout_marginRight="20px"
544
                    android:layout_toStartOf="@+id/et_fastNum"
545
                    android:layout_toLeftOf="@+id/et_fastNum"
546
                    android:src="@drawable/icon_kuai1105" />
547

548
                <EditText
549
                    android:id="@+id/et_fastNum"
550
                    android:layout_width="wrap_content"
551
                    android:layout_height="match_parent"
552
                    android:layout_alignParentTop="true"
553
                    android:layout_marginRight="44px"
554
                    android:layout_toStartOf="@+id/imageView2"
555
                    android:layout_toLeftOf="@+id/imageView2"
556
                    android:layout_weight="1"
557
                    android:background="@color/white"
558
                    android:editable="true"
559
                    android:gravity="center"
560
                    android:hint="桩数"
561
                    android:inputType="number"
562
                    android:text=""
563
                    android:textColor="@color/ui_62"
564
                    android:textColorHint="@color/ui_68"
565
                    android:textSize="15sp" />
566

567
                <ImageView
568
                    android:id="@+id/imageView2"
569
                    android:layout_width="wrap_content"
570
                    android:layout_height="wrap_content"
571
                    android:layout_centerVertical="true"
572
                    android:layout_gravity="center"
573
                    android:layout_marginRight="20px"
574
                    android:layout_toLeftOf="@+id/et_slowNum"
575
                    android:src="@drawable/icon_man1105" />
576

577
                <EditText
578
                    android:id="@+id/et_slowNum"
579
                    android:layout_width="wrap_content"
580
                    android:layout_height="match_parent"
581
                    android:layout_alignParentTop="true"
582
                    android:layout_alignParentEnd="true"
583
                    android:layout_alignParentRight="true"
584
                    android:layout_marginRight="44px"
585
                    android:layout_weight="1"
586
                    android:background="@color/white"
587
                    android:editable="true"
588
                    android:gravity="center"
589
                    android:hint="桩数"
590
                    android:inputType="number"
591
                    android:text=""
592
                    android:textColor="@color/ui_62"
593
                    android:textColorHint="@color/ui_68"
594
                    android:textSize="15sp" />
595

596
            </com.zhy.autolayout.AutoRelativeLayout>
597

598
            <View
599
                android:layout_width="match_parent"
600
                android:layout_height="0.5dp"
601
                android:background="@color/ui_line" />
602

603
            <View
604
                android:layout_width="match_parent"
605
                android:layout_height="44px"
606
                android:background="@color/activity_bgcolor" />
607

608
            <View
609
                android:layout_width="match_parent"
610
                android:layout_height="0.5dp"
611
                android:background="@color/ui_line" />
612

613
            <com.zhy.autolayout.AutoLinearLayout
614
                android:layout_width="match_parent"
615
                android:layout_height="120px"
616
                android:background="@color/bg_row"
617
                android:gravity="center">
618

619
                <TextView
620
                    android:layout_width="wrap_content"
621
                    android:layout_height="wrap_content"
622
                    android:layout_centerInParent="true"
623
                    android:layout_marginLeft="44px"
624
                    android:layout_marginRight="8px"
625
                    android:text="*"
626
                    android:textColor="@color/xinghao"
627
                    android:textSize="15sp" />
628

629
                <TextView
630
                    android:layout_width="wrap_content"
631
                    android:layout_height="wrap_content"
632
                    android:text="充电费"
633
                    android:textColor="@color/ui_65"
634
                    android:textSize="15sp" />
635

636

637
                <EditText
638
                    android:id="@+id/et_chargeCost"
639
                    android:layout_width="0dp"
640
                    android:layout_height="match_parent"
641
                    android:layout_marginLeft="20px"
642
                    android:layout_marginRight="44px"
643
                    android:layout_weight="5"
644
                    android:background="@color/white"
645
                    android:gravity="center|right"
646
                    android:hint="如:0.87元/度"
647
                    android:inputType="text"
648
                    android:text=""
649
                    android:textColor="@color/ui_62"
650
                    android:textColorHint="@color/ui_68"
651
                    android:textSize="15sp" />
652

653

654
            </com.zhy.autolayout.AutoLinearLayout>
655

656
            <TextView
657
                android:layout_width="match_parent"
658
                android:layout_height="wrap_content"
659
                android:layout_marginLeft="44px"
660
                android:layout_marginRight="44px"
661
                android:text="如存在分时电价,请在照片中上传包含电价信息的照片或截图"
662
                android:textColor="@color/ui_68"
663
                android:textSize="12sp" />
664

665
            <View
666
                android:layout_width="match_parent"
667
                android:layout_height="0.5dp"
668
                android:layout_marginLeft="44px"
669
                android:layout_marginTop="12dp"
670
                android:background="@color/ui_line" />
671

672
            <com.zhy.autolayout.AutoRelativeLayout
673
                android:id="@+id/rl_zyNum"
674
                android:layout_width="match_parent"
675
                android:layout_height="139px"
676
                android:background="@color/bg_row">
677

678
                <TextView
679
                    android:id="@+id/textView23"
680
                    android:layout_width="wrap_content"
681
                    android:layout_height="wrap_content"
682
                    android:layout_alignParentStart="true"
683
                    android:layout_alignParentLeft="true"
684
                    android:layout_centerInParent="true"
685
                    android:layout_marginLeft="44px"
686
                    android:layout_marginRight="8px"
687
                    android:text="*"
688
                    android:textColor="@color/xinghao"
689
                    android:textSize="15sp" />
690

691
                <TextView
692
                    android:layout_width="wrap_content"
693
                    android:layout_height="wrap_content"
694
                    android:layout_alignTop="@+id/textView23"
695
                    android:layout_toEndOf="@+id/textView23"
696
                    android:layout_toRightOf="@+id/textView23"
697
                    android:text="服务费"
698
                    android:textColor="@color/ui_65"
699
                    android:textSize="15sp" />
700

701
                <EditText
702
                    android:id="@+id/et_serviceCost"
703
                    style="?android:attr/textViewStyle"
704
                    android:layout_width="wrap_content"
705
                    android:layout_height="match_parent"
706
                    android:layout_alignParentEnd="true"
707
                    android:layout_alignParentRight="true"
708
                    android:layout_centerVertical="true"
709
                    android:layout_marginRight="44px"
710
                    android:background="@null"
711
                    android:contentDescription="@null"
712
                    android:gravity="center|right"
713
                    android:hint="如:0.8元/度"
714
                    android:inputType="text"
715
                    android:text=""
716
                    android:textColor="@color/ui_62"
717
                    android:textColorHint="@color/ui_68"
718
                    android:textSize="15sp" />
719
            </com.zhy.autolayout.AutoRelativeLayout>
720

721
            <View
722
                android:layout_width="match_parent"
723
                android:layout_height="0.5dp"
724
                android:layout_marginLeft="44px"
725
                android:background="@color/ui_line" />
726

727
            <com.zhy.autolayout.AutoLinearLayout
728
                android:layout_width="match_parent"
729
                android:layout_height="139px"
730
                android:background="@color/bg_row"
731
                android:gravity="center">
732

733
                <TextView
734
                    android:layout_width="wrap_content"
735
                    android:layout_height="wrap_content"
736
                    android:layout_centerInParent="true"
737
                    android:layout_marginLeft="44px"
738
                    android:layout_marginRight="8px"
739
                    android:text="*"
740
                    android:textColor="@color/xinghao"
741
                    android:textSize="15sp" />
742

743
                <TextView
744
                    android:layout_width="wrap_content"
745
                    android:layout_height="wrap_content"
746
                    android:text="收费方式"
747
                    android:textColor="@color/ui_65"
748
                    android:textSize="15sp" />
749

750

751
                <EditText
752
                    android:id="@+id/et_charge_cost_way"
753
                    android:layout_width="0dp"
754
                    android:layout_height="match_parent"
755
                    android:layout_marginLeft="20px"
756
                    android:layout_marginRight="44px"
757
                    android:layout_weight="5"
758
                    android:background="@color/white"
759
                    android:gravity="center|right"
760
                    android:hint="请填写充电收费方式"
761
                    android:inputType="text"
762
                    android:text=""
763
                    android:textColor="@color/ui_62"
764
                    android:textColorHint="@color/ui_68"
765
                    android:textSize="15sp" />
766

767

768
            </com.zhy.autolayout.AutoLinearLayout>
769

770
            <View
771
                android:layout_width="match_parent"
772
                android:layout_height="0.5dp"
773
                android:layout_marginLeft="44px"
774
                android:background="@color/ui_line" />
775

776
            <com.zhy.autolayout.AutoLinearLayout
777
                android:layout_width="match_parent"
778
                android:layout_height="139px"
779
                android:background="@color/bg_row"
780
                android:gravity="center">
781

782
                <TextView
783
                    android:layout_width="wrap_content"
784
                    android:layout_height="wrap_content"
785
                    android:layout_centerInParent="true"
786
                    android:layout_marginLeft="44px"
787
                    android:layout_marginRight="8px"
788
                    android:text="*"
789
                    android:textColor="@color/xinghao"
790
                    android:textSize="15sp" />
791

792
                <TextView
793
                    android:layout_width="wrap_content"
794
                    android:layout_height="wrap_content"
795
                    android:text="停车费"
796
                    android:textColor="@color/ui_65"
797
                    android:textSize="15sp" />
798

799

800
                <EditText
801
                    android:id="@+id/et_parkCost"
802
                    android:layout_width="0dp"
803
                    android:layout_height="match_parent"
804
                    android:layout_marginLeft="20px"
805
                    android:layout_marginRight="44px"
806
                    android:layout_weight="5"
807
                    android:background="@color/white"
808
                    android:gravity="center|right"
809
                    android:hint="如:5元/时"
810
                    android:inputType="text"
811
                    android:text=""
812
                    android:textColor="@color/ui_62"
813
                    android:textColorHint="@color/ui_68"
814
                    android:textSize="15sp" />
815

816

817
            </com.zhy.autolayout.AutoLinearLayout>
818

819
            <View
820
                android:layout_width="match_parent"
821
                android:layout_height="0.5dp"
822
                android:layout_marginLeft="44px"
823
                android:background="@color/ui_line" />
824

825

826
            <com.zhy.autolayout.AutoRelativeLayout
827
                android:id="@+id/ll_select_cost_type"
828
                android:layout_width="match_parent"
829
                android:layout_height="139px"
830
                android:background="@color/bg_row">
831

832
                <TextView
833
                    android:id="@+id/textView20"
834
                    android:layout_width="wrap_content"
835
                    android:layout_height="wrap_content"
836
                    android:layout_alignTop="@+id/textView17"
837
                    android:layout_alignParentStart="true"
838
                    android:layout_alignParentLeft="true"
839
                    android:layout_centerInParent="true"
840
                    android:layout_marginLeft="44px"
841
                    android:layout_marginRight="8px"
842
                    android:text="*"
843
                    android:textColor="@color/xinghao"
844
                    android:textSize="15sp" />
845

846
                <TextView
847
                    android:id="@+id/textView17"
848
                    android:layout_width="wrap_content"
849
                    android:layout_height="wrap_content"
850
                    android:layout_centerVertical="true"
851
                    android:layout_toEndOf="@+id/textView20"
852
                    android:layout_toRightOf="@+id/textView20"
853
                    android:text="运营商"
854
                    android:textColor="@color/ui_65"
855
                    android:textSize="15sp" />
856

857

858
                <TextView
859
                    android:id="@+id/tv_costtype"
860
                    android:layout_width="wrap_content"
861
                    android:layout_height="match_parent"
862
                    android:layout_centerVertical="true"
863
                    android:layout_marginRight="20px"
864
                    android:layout_toLeftOf="@+id/imageView4"
865
                    android:background="@color/white"
866
                    android:gravity="center|right"
867
                    android:hint="请选择运营商"
868
                    android:paddingLeft="300px"
869
                    android:text=""
870
                    android:textColor="@color/ui_62"
871
                    android:textColorHint="@color/ui_68"
872
                    android:textSize="15sp" />
873

874
                <ImageView
875
                    android:id="@+id/imageView4"
876
                    android:layout_width="wrap_content"
877
                    android:layout_height="wrap_content"
878
                    android:layout_alignParentEnd="true"
879
                    android:layout_alignParentRight="true"
880
                    android:layout_centerVertical="true"
881
                    android:layout_marginRight="44px"
882
                    android:src="@drawable/icon_select" />
883

884

885
            </com.zhy.autolayout.AutoRelativeLayout>
886

887
            <!-- 运营商电话 -->
888
            <View
889
                android:layout_width="match_parent"
890
                android:layout_height="0.5dp"
891
                android:layout_marginLeft="44px"
892
                android:background="@color/ui_line" />
893

894
            <com.zhy.autolayout.AutoLinearLayout
895
                android:layout_width="match_parent"
896
                android:layout_height="139px"
897
                android:background="@color/bg_row"
898
                android:gravity="center">
899

900
                <TextView
901
                    android:layout_width="wrap_content"
902
                    android:layout_height="wrap_content"
903
                    android:layout_centerInParent="true"
904
                    android:layout_marginLeft="44px"
905
                    android:layout_marginRight="8px"
906
                    android:text="*"
907
                    android:textColor="@color/xinghao"
908
                    android:textSize="15sp" />
909

910
                <TextView
911
                    android:layout_width="wrap_content"
912
                    android:layout_height="wrap_content"
913
                    android:text="运营商电话"
914
                    android:textColor="@color/ui_65"
915
                    android:textSize="15sp" />
916

917

918
                <EditText
919
                    android:id="@+id/et_telephone"
920
                    android:layout_width="0dp"
921
                    android:layout_height="match_parent"
922
                    android:layout_marginLeft="20px"
923
                    android:layout_marginRight="44px"
924
                    android:layout_weight="5"
925
                    android:background="@color/white"
926
                    android:gravity="center|right"
927
                    android:hint="请填写运营商电话"
928
                    android:inputType="text"
929
                    android:text=""
930
                    android:textColor="@color/ui_62"
931
                    android:textColorHint="@color/ui_68"
932
                    android:textSize="15sp" />
933

934

935
            </com.zhy.autolayout.AutoLinearLayout>
936

937
            <View
938
                android:layout_width="match_parent"
939
                android:layout_height="0.5dp"
940
                android:background="@color/ui_line" />
941

942
            <View
943
                android:layout_width="match_parent"
944
                android:layout_height="44px"
945
                android:background="@color/activity_bgcolor" />
946

947
            <View
948
                android:layout_width="match_parent"
949
                android:layout_height="0.5dp"
950
                android:background="@color/ui_line" />
951

952
            <com.zhy.autolayout.AutoRelativeLayout
953
                android:id="@+id/rl_parkLocation"
954
                android:layout_width="match_parent"
955
                android:layout_height="139px"
956
                android:background="@color/white">
957

958
                <TextView
959
                    android:id="@+id/textView24"
960
                    android:layout_width="wrap_content"
961
                    android:layout_height="wrap_content"
962
                    android:layout_alignParentStart="true"
963
                    android:layout_alignParentLeft="true"
964
                    android:layout_centerInParent="true"
965
                    android:layout_marginLeft="44px"
966
                    android:layout_marginRight="8px"
967
                    android:text="*"
968
                    android:textColor="@color/xinghao"
969
                    android:textSize="15sp" />
970

971
                <TextView
972
                    android:id="@+id/textView13"
973
                    android:layout_width="wrap_content"
974
                    android:layout_height="wrap_content"
975
                    android:layout_alignTop="@+id/textView24"
976
                    android:layout_toEndOf="@+id/textView24"
977
                    android:layout_toRightOf="@+id/textView24"
978
                    android:text="停车场地"
979
                    android:textColor="@color/ui_65"
980
                    android:textSize="15sp" />
981

982
                <RadioGroup
983
                    android:id="@+id/rg_park"
984
                    android:layout_width="wrap_content"
985
                    android:layout_height="wrap_content"
986
                    android:layout_alignParentEnd="true"
987
                    android:layout_alignParentRight="true"
988
                    android:layout_centerVertical="true"
989
                    android:layout_marginEnd="44px"
990
                    android:layout_marginRight="44px"
991
                    android:orientation="horizontal">
992

993
                    <RadioButton
994
                        android:id="@+id/rb_shang"
995
                        android:layout_width="wrap_content"
996
                        android:layout_height="wrap_content"
997
                        android:layout_marginLeft="44px"
998
                        android:background="@drawable/icon_shangselected1105"
999
                        android:button="@null" />
1000

1001
                    <RadioButton
1002
                        android:id="@+id/rb_xia"
1003
                        android:layout_width="wrap_content"
1004
                        android:layout_height="wrap_content"
1005
                        android:layout_marginLeft="44px"
1006
                        android:background="@drawable/icon_xianormal1105"
1007
                        android:button="@null" />
1008
                </RadioGroup>
1009

1010
            </com.zhy.autolayout.AutoRelativeLayout>
1011

1012
            <View
1013
                android:layout_width="fill_parent"
1014
                android:layout_height="0.5dp"
1015
                android:layout_marginLeft="44px"
1016
                android:background="@color/ui_line" />
1017

1018
            <com.zhy.autolayout.AutoLinearLayout
1019
                android:id="@+id/rl_prefect_time"
1020
                android:layout_width="match_parent"
1021
                android:layout_height="139px"
1022
                android:background="@color/bg_row">
1023

1024
                <TextView
1025
                    android:id="@+id/tv_prefect_time"
1026
                    android:layout_width="0dp"
1027
                    android:layout_height="wrap_content"
1028
                    android:layout_alignParentLeft="true"
1029
                    android:layout_centerVertical="true"
1030
                    android:layout_weight="1.5"
1031
                    android:paddingLeft="44px"
1032
                    android:text="开放时间"
1033
                    android:textColor="@color/ui_65"
1034
                    android:textSize="15sp" />
1035

1036
                <TextView
1037
                    android:id="@+id/tv_prefect_start_time"
1038
                    android:layout_width="wrap_content"
1039
                    android:layout_height="match_parent"
1040
                    android:layout_centerVertical="true"
1041
                    android:layout_toEndOf="@+id/tv_prefect_time"
1042
                    android:layout_toRightOf="@+id/tv_prefect_time"
1043
                    android:gravity="center"
1044
                    android:hint="00:00"
1045
                    android:paddingLeft="44px"
1046
                    android:paddingRight="20px"
1047
                    android:text=""
1048
                    android:textColor="@color/ui_62"
1049
                    android:textColorHint="@color/ui_68"
1050
                    android:textSize="15sp" />
1051

1052
                <ImageView
1053
                    android:layout_width="wrap_content"
1054
                    android:layout_height="match_parent"
1055
                    android:layout_centerVertical="true"
1056
                    android:layout_toEndOf="@id/tv_prefect_time"
1057
                    android:layout_toRightOf="@id/tv_prefect_start_time"
1058
                    android:src="@drawable/icon_zhi2_0" />
1059

1060
                <TextView
1061
                    android:id="@+id/tv_ferfect_time"
1062
                    android:layout_width="wrap_content"
1063
                    android:layout_height="match_parent"
1064
                    android:layout_alignParentEnd="true"
1065
                    android:layout_alignParentRight="true"
1066
                    android:layout_centerVertical="true"
1067
                    android:contentDescription="@null"
1068
                    android:gravity="center"
1069
                    android:hint="24:00"
1070
                    android:paddingLeft="20px"
1071
                    android:paddingRight="44px"
1072
                    android:text=""
1073
                    android:textColor="@color/ui_62"
1074
                    android:textColorHint="@color/ui_68"
1075

1076
                    android:textSize="15sp" />
1077
            </com.zhy.autolayout.AutoLinearLayout>
1078

1079
            <View
1080
                android:layout_width="fill_parent"
1081
                android:layout_height="0.5dp"
1082
                android:layout_marginLeft="44px"
1083
                android:background="@color/ui_line" />
1084

1085
            <EditText
1086
                android:id="@+id/et_remarkclaim"
1087
                android:layout_width="match_parent"
1088
                android:layout_height="wrap_content"
1089
                android:background="@color/white"
1090
                android:gravity="left|top"
1091
                android:hint="备注说明"
1092
                android:paddingLeft="44px"
1093
                android:paddingTop="48px"
1094
                android:paddingRight="44px"
1095
                android:paddingBottom="50px"
1096
                android:textColor="@color/ui_62"
1097
                android:textColorHint="@color/ui_68"
1098
                android:textSize="15sp" />
1099

1100
            <View
1101
                android:layout_width="fill_parent"
1102
                android:layout_height="0.5dp"
1103
                android:background="@color/ui_line" />
1104

1105
            <View
1106
                android:layout_width="match_parent"
1107
                android:layout_height="44px"
1108
                android:background="@color/activity_bgcolor" />
1109
        </com.zhy.autolayout.AutoLinearLayout>
1110

1111
    </ScrollView>
1112

1113
    <TextView
1114
        android:id="@+id/share_next"
1115
        android:layout_width="match_parent"
1116
        android:layout_height="127px"
1117
        android:layout_alignParentBottom="true"
1118
        android:layout_gravity="center"
1119
        android:background="@color/lvse"
1120
        android:gravity="center"
1121
        android:text="立即提交"
1122
        android:textColor="@color/white"
1123
        android:textSize="15sp" />
1124

1125

1126
</com.zhy.autolayout.AutoRelativeLayout>

+ 2 - 2
app/src/main/res/layout/activity_share_two_picture.xml

@ -37,9 +37,9 @@
37 37
        android:id="@+id/picture"
38 38
        android:layout_width="match_parent"
39 39
        android:layout_height="0dp"
40
        android:background="@color/orange"
41 40
        android:scaleType="centerCrop"
42 41
        app:layout_constraintBottom_toBottomOf="parent"
43
        app:layout_constraintTop_toBottomOf="@+id/nav_bar" />
42
        app:layout_constraintTop_toBottomOf="@+id/nav_bar"
43
        tools:background="@color/orange" />
44 44
45 45
</android.support.constraint.ConstraintLayout>

+ 2 - 2
app/src/main/res/layout/item_share_dialog.xml

@ -24,11 +24,11 @@
24 24
            android:layout_width="match_parent"
25 25
            android:layout_height="wrap_content"
26 26
            android:layout_marginLeft="20dp"
27
            android:layout_marginRight="20dp"
27
            android:layout_marginRight="10dp"
28 28
            android:textSize="14sp"
29 29
            android:lineSpacingMultiplier="1.5"
30 30
            android:textColor="@color/ui_65"
31
            android:text="照片内容需包含以下信息,最多张:\n1、站点周围环境照片,如XX酒店、XX银行;\n2、充电站照片,需要包含充电桩;\n3、充电中的照片,可以是车桩连接的照片或者充电桩显示屏正在充电的照片\n4、分时电价、分时停车费等信息可以拍照或截图上传(非必需)"
31
            android:text="添加照片包含以下信息,最多4张:\n1、站点周围建筑或小区图片,如xx酒店、xx银行;\n2、充电站全景照片,需要包含充电桩;\n3、充电桩图片,可以是具体的桩或车连接的照片;\n4、分时电价、分时停车费等信息(非必填)。"
32 32
            android:layout_marginTop="17dp"
33 33
            android:layout_marginBottom="30dp"/>
34 34

+ 73 - 45
app/src/main/res/layout/share_list_adapter.xml

@ -1,20 +1,15 @@
1
<LinearLayout
2
    xmlns:android="http://schemas.android.com/apk/res/android"
1
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
    xmlns:tools="http://schemas.android.com/tools"
3 3
    android:layout_width="match_parent"
4
    android:layout_height="match_parent"
4 5
    android:background="@color/activity_bgcolor"
5
    android:orientation="vertical"
6
    android:layout_height="match_parent">
6
    android:orientation="vertical">
7 7
8 8
    <LinearLayout
9 9
        android:layout_width="match_parent"
10 10
        android:layout_height="wrap_content"
11 11
        android:background="@color/bg_row"
12 12
        android:orientation="vertical">
13
        <View
14
            android:layout_width="match_parent"
15
            android:layout_height="0.5dp"
16
            android:background="@color/Line"
17
            android:visibility="gone"/>
18 13
19 14
        <RelativeLayout
20 15
            android:id="@+id/shareName"
@ -26,30 +21,28 @@
26 21
                android:id="@+id/tv_shareName"
27 22
                android:layout_width="match_parent"
28 23
                android:layout_height="wrap_content"
29
                android:gravity="center_vertical"
24
                android:layout_alignParentLeft="true"
30 25
                android:layout_marginLeft="16dp"
31 26
                android:layout_marginRight="90dp"
32
                android:singleLine="true"
33 27
                android:ellipsize="end"
34
                android:layout_alignParentLeft="true"
35
                android:text=""
28
                android:gravity="center_vertical"
29
                android:singleLine="true"
36 30
                android:textColor="@color/ui_62"
37
                android:textSize="15sp" />
31
                android:textSize="15sp"
32
                tools:text="走起" />
38 33
39 34
            <TextView
40 35
                android:id="@+id/tv_shareState"
41 36
                android:layout_width="wrap_content"
42 37
                android:layout_height="wrap_content"
38
                android:layout_alignParentRight="true"
39
                android:layout_marginRight="16dp"
43 40
                android:gravity="center_vertical"
44
                android:text=""
45 41
                android:textColor="@color/title_row"
46 42
                android:textSize="14sp"
47
                android:layout_marginRight="16dp"
48
                android:layout_alignParentRight="true" />
49
50
51
43
                tools:text="信息不完整" />
52 44
        </RelativeLayout>
45
53 46
        <RelativeLayout
54 47
            android:id="@+id/shareAddress"
55 48
            android:layout_width="match_parent"
@ -60,50 +53,85 @@
60 53
                android:id="@+id/tv_shareAddress"
61 54
                android:layout_width="match_parent"
62 55
                android:layout_height="wrap_content"
56
                android:layout_alignParentLeft="true"
57
                android:layout_alignParentTop="true"
58
                android:layout_marginLeft="16dp"
59
                android:layout_marginRight="16dp"
60
                android:ellipsize="end"
63 61
                android:gravity="center_vertical"
64
                android:text=""
62
                android:lines="2"
65 63
                android:textColor="@color/ui_65"
66 64
                android:textSize="14sp"
67
                android:singleLine="true"
68
                android:ellipsize="end"
69
                android:layout_marginLeft="16dp"
70
                android:layout_alignParentLeft="true"
71
                android:layout_alignParentTop="true"/>
72
73
74
65
                tools:text="北京市朝阳区八里庄街道住邦2000商务楼2号楼从南门入,上12楼右拐即可" />
75 66
        </RelativeLayout>
76 67
77 68
        <LinearLayout
78
            android:id="@+id/shareTime"
79 69
            android:layout_width="match_parent"
80 70
            android:layout_height="wrap_content"
81
            android:gravity="center"
71
            android:layout_marginLeft="16dp"
82 72
            android:layout_marginTop="6dp"
73
            android:gravity="center_vertical"
83 74
            android:orientation="horizontal">
84 75
85
            <TextView
86
                android:id="@+id/tv_shareTime"
87
                android:layout_width="match_parent"
76
            <LinearLayout
77
                android:layout_width="0dp"
88 78
                android:layout_height="wrap_content"
89
                android:layout_marginLeft="16dp"
90
                android:gravity="center_vertical"
91
                android:textColor="@color/ui_68"
92
                android:textSize="14sp"
93
                android:text=""/>
94
            <TextView
95
                android:id="@+id/tv_id"
79
                android:layout_weight="1"
80
                android:orientation="vertical">
81
82
                <TextView
83
                    android:id="@+id/tv_shareTime"
84
                    android:layout_width="match_parent"
85
                    android:layout_height="wrap_content"
86
                    android:textColor="@color/ui_68"
87
                    android:textSize="14sp"
88
89
                    tools:text="2020-05-21 11:26:25" />
90
91
                <TextView
92
                    android:id="@+id/tv_reason"
93
                    android:layout_width="match_parent"
94
                    android:layout_height="wrap_content"
95
                    android:layout_marginTop="5dp"
96
                    android:textColor="#E02020"
97
                    android:textSize="12sp"
98
                    tools:text="原因:缺少站点图片,都是客服经理的说法框架克鲁赛德荆防颗粒的是的考虑是否就看了多少积分开了电视剧付款了大家是否考虑的设计费恐龙当家时空裂缝都是风景的考虑是否觉得卡死了" />
99
100
            </LinearLayout>
101
102
            <LinearLayout
103
                android:id="@+id/tv_edit"
96 104
                android:layout_width="wrap_content"
97
                android:layout_height="wrap_content"
98
                android:visibility="gone"/>
99
105
                android:layout_height="match_parent"
106
                android:gravity="center_vertical"
107
                android:visibility="gone"
108
                tools:background="#ff0000"
109
                tools:visibility="visible">
110
111
                <TextView
112
                    android:layout_width="wrap_content"
113
                    android:layout_height="wrap_content"
114
                    android:layout_marginLeft="16dp"
115
                    android:layout_marginTop="10dp"
116
                    android:layout_marginRight="16dp"
117
                    android:layout_marginBottom="10dp"
118
                    android:background="@drawable/btn_edit_shape"
119
                    android:paddingLeft="10dp"
120
                    android:paddingTop="2dp"
121
                    android:paddingRight="10dp"
122
                    android:paddingBottom="2dp"
123
                    android:text="编辑"
124
                    android:textColor="#444444"
125
                    android:textSize="12sp" />
126
            </LinearLayout>
100 127
        </LinearLayout>
101 128
129
102 130
        <View
103 131
            android:layout_width="match_parent"
104 132
            android:layout_height="0.5dp"
105 133
            android:layout_marginTop="14dp"
106
            android:background="@color/ui_line"/>
134
            android:background="@color/ui_line" />
107 135
108 136
    </LinearLayout>
109 137

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

@ -50,6 +50,7 @@
50 50
    <string name="title_activity_alter_two">AlterTwoActivity</string>
51 51
    <string name="title_activity_alter_three">AlterThreeActivity</string>
52 52
    <string name="title_activity_share_two">ShareTwoActivity</string>
53
    <string name="title_activity_share_two_edit">ShareTwoEditActivity</string>
53 54
    <string name="title_activity_share_three">ShareThreeActivity</string>
54 55
    <string name="title_activity_zhan_details_new">ZhanDetailsNew</string>
55 56
    <string name="title_activity_my_share">MyShareActivity</string>

代码修改 · 1784adb651 - Gogs: Go Git Service
Bladeren bron

代码修改

huyuguo 4 jaren geleden
bovenliggende
commit
1784adb651
3 gewijzigde bestanden met toevoegingen van 24 en 3 verwijderingen
  1. 1 0
      app/build.gradle
  2. 23 3
      app/src/main/java/com/electric/chargingpile/activity/MyWebViewActivity.java
  3. 0 0
      gradlew

+ 1 - 0
app/build.gradle

@ -46,6 +46,7 @@ android {
46 46
//            enabled true
47 47
//        }
48 48
    }
49
    ndkVersion '22.1.7171670'
49 50
50 51
    dataBinding {
51 52
        enabled true

+ 23 - 3
app/src/main/java/com/electric/chargingpile/activity/MyWebViewActivity.java

@ -722,7 +722,14 @@ public class MyWebViewActivity extends Activity implements PlatformActionListene
722 722
                break;
723 723
            case "15":
724 724
                if (MainApplication.isLogin()) {
725
                    loadDialog.show();
725
                    runOnUiThread(new Runnable() {
726
                        @TargetApi(Build.VERSION_CODES.KITKAT)
727
                        @Override
728
                        public void run() {
729
                            loadDialog.show();
730
                        }
731
                    });
732
726 733
                    getCarOwnerCertificateList();
727 734
                } else {
728 735
                    startActivity(new Intent(getApplicationContext(), LoginActivity.class));
@ -1594,13 +1601,26 @@ public class MyWebViewActivity extends Activity implements PlatformActionListene
1594 1601
            @Override
1595 1602
            public void onError(Call call, Exception e) {
1596 1603
                e.printStackTrace();
1597
                loadDialog.dismiss();
1604
                runOnUiThread(new Runnable() {
1605
                    @TargetApi(Build.VERSION_CODES.KITKAT)
1606
                    @Override
1607
                    public void run() {
1608
                        loadDialog.dismiss();
1609
                    }
1610
                });
1611
1598 1612
                Toast.makeText(getApplicationContext(), e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
1599 1613
            }
1600 1614
1601 1615
            @Override
1602 1616
            public void onResponse(String response) {
1603
                loadDialog.dismiss();
1617
                runOnUiThread(new Runnable() {
1618
                    @TargetApi(Build.VERSION_CODES.KITKAT)
1619
                    @Override
1620
                    public void run() {
1621
                        loadDialog.dismiss();
1622
                    }
1623
                });
1604 1624
                String rtnCode = JsonUtils.getKeyResult(response, "rtnCode");
1605 1625
                if ("01".equals(rtnCode)) {
1606 1626
                    String data = JsonUtils.getKeyResult(response, "data");

+ 0 - 0
gradlew