Browse Source

标签添加

huyuguo 5 years ago
parent
commit
dd64fcf3a0

+ 167 - 8
app/src/main/java/com/electric/chargingpile/activity/MainMapActivity.java

@ -215,7 +215,7 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
215 215
    private Marker detailMarker;
216 216
    public static boolean onResumeRefresh = false;
217 217
    public static boolean search_back = false;
218
    private ImageView iv_guzhang, ivIsCost, iVpoint;
218
    private ImageView iv_guzhang, iVpoint;
219 219
220 220
    private boolean clickMarker = false;
221 221
    public static LatLng center = null;
@ -1243,7 +1243,6 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
1243 1243
        tab_qa = (LinearLayout) findViewById(R.id.tab_qa);
1244 1244
        tab_qa.setOnClickListener(this);
1245 1245
        iv_guzhang = (ImageView) findViewById(R.id.iv_guzhang);
1246
        ivIsCost = (ImageView) findViewById(R.id.iv_is_cost);
1247 1246
        windowName = (TextView) findViewById(R.id.window_tv_zhan_name);
1248 1247
        stopCost = findViewById(R.id.window_tv_stop_cost);
1249 1248
        windowGrade = (TextView) findViewById(R.id.window_tv_zhan_grade);
@ -5262,15 +5261,28 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5262 5261
        final String poi_jing = JsonUtils.getKeyResult(info, "poi_jing");
5263 5262
        final String poi_wei = JsonUtils.getKeyResult(info, "poi_wei");
5264 5263
5265
        if (remind.equals("0") && !"1".equals(own_pay)) {
5266
            iv_guzhang.setVisibility(View.GONE);
5267
        } else {
5268
            if (!remind.equals("0")) {
5269
                iv_guzhang.setImageResource(R.drawable.icon_guzhang_window);
5264
        // remind 0 正常 2 休息中 other 故障
5265
        // own_pay 1 可支付
5266
5267
        // 显示顺序 故障>可支付>休息中
5268
5269
        if (remind.equals("0")) {
5270
            if ("1".equals(own_pay)) {
5271
                iv_guzhang.setVisibility(View.VISIBLE);
5272
                iv_guzhang.setImageResource(R.drawable.icon_is_cost);
5270 5273
            } else {
5274
                iv_guzhang.setVisibility(View.GONE);
5275
            }
5276
        } else if (remind.equals("2")) {
5277
            iv_guzhang.setVisibility(View.VISIBLE);
5278
            if ("1".equals(own_pay)) {
5271 5279
                iv_guzhang.setImageResource(R.drawable.icon_is_cost);
5280
            } else {
5281
                iv_guzhang.setImageResource(R.drawable.icon_rest);
5272 5282
            }
5283
        } else {
5273 5284
            iv_guzhang.setVisibility(View.VISIBLE);
5285
            iv_guzhang.setImageResource(R.drawable.icon_guzhang_window);
5274 5286
        }
5275 5287
5276 5288
        windowName.setText(zhan_name);
@ -5851,9 +5863,156 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
5851 5863
                            .show();
5852 5864
                }
5853 5865
            }
5866
        } else if (remind.equals("2")) {
5867
            new com.electric.chargingpile.view.AlertDialog(MainMapActivity.this).builder()
5868
                    .setTitle("暂时未营业")
5869
                    .setMsg("该站点当前不在营业时间\n" + "可能无法正常充电,是否继续前往")
5870
                    .setPositiveButton("继续", new View.OnClickListener() {
5871
                        @Override
5872
                        public void onClick(View v) {
5873
                            if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap") &&
5874
                                    !isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5875
                                Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5876
                                intent.putExtra("start_jing", center.longitude + "");
5877
                                intent.putExtra("start_wei", center.latitude + "");
5878
                                intent.putExtra("stop_jing", ll.longitude + "");
5879
//                    Log.e("123", ll.longitude + "");
5880
                                intent.putExtra("stop_wei", ll.latitude + "");
5881
//                    Log.e("123", ll.latitude + "");
5882
                                startActivity(intent);
5883
                                detailsBack = true;
5884
                                HashMap<String, String> map = new HashMap<String, String>();
5885
                                map.put("Name", zhan_name);
5886
                                map.put("CostWay", charge_cost_way);
5887
                                map.put("City", city);
5888
                                MobclickAgent.onEvent(context, "0033", map);
5889
                                map.clear();
5890
                            } else {
5891
                                if (center != null) {
5892
                                    LayoutInflater inflater1 = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
5893
                                    popupWindowView = inflater1.inflate(R.layout.item_selectmap, null);
5894
                                    popupWindow = new PopupWindow(popupWindowView,
5895
                                            ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT,
5896
                                            true);
5897
                                    popupWindow.setBackgroundDrawable(new BitmapDrawable());
5898
                                    // 设置PopupWindow的弹出和消失效果
5899
                                    popupWindow.setAnimationStyle(R.style.popupAnimation);
5900
                                    LinearLayout ll_tvTwo = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvTwo);
5901
                                    if (!isAvilible(getApplicationContext(), "com.autonavi.minimap")) {
5902
                                        ll_tvTwo.setVisibility(View.GONE);
5903
                                    }
5904
                                    LinearLayout ll_tvOne = (LinearLayout) popupWindowView.findViewById(R.id.ll_tvOne);
5905
                                    if (!isAvilible(getApplicationContext(), "com.baidu.BaiduMap")) {
5906
                                        ll_tvOne.setVisibility(View.GONE);
5907
                                    }
5908
                                    cancleButton = (Button) popupWindowView
5909
                                            .findViewById(R.id.cancleButton);
5910
                                    cancleButton.setOnClickListener(new View.OnClickListener() {
5911
                                        @Override
5912
                                        public void onClick(View view) {
5913
//                        Toast.makeText(ZhanDetailsNew.this, "NO", Toast.LENGTH_SHORT).show();
5914
                                            popupWindow.dismiss();
5915
                                        }
5916
                                    });
5917
                                    tvThree = (TextView) popupWindowView.findViewById(R.id.tvThree);
5918
                                    tvThree.setOnClickListener(new View.OnClickListener() {
5919
                                        @Override
5920
                                        public void onClick(View v) {
5921
                                            Intent intent = new Intent(getApplication(), BasicNaviActivity.class);
5922
                                            intent.putExtra("start_jing", center.longitude + "");
5923
                                            intent.putExtra("start_wei", center.latitude + "");
5924
                                            intent.putExtra("stop_jing", ll.longitude + "");
5925
                                            intent.putExtra("stop_wei", ll.latitude + "");
5926
                                            startActivity(intent);
5927
                                            detailsBack = true;
5928
                                            popupWindow.dismiss();
5929
                                            HashMap<String, String> map = new HashMap<String, String>();
5930
                                            map.put("Name", zhan_name);
5931
                                            map.put("CostWay", charge_cost_way);
5932
                                            map.put("City", city);
5933
                                            MobclickAgent.onEvent(context, "0033", map);
5934
                                            map.clear();
5935
                                        }
5936
                                    });
5937
                                    tvOne = (TextView) popupWindowView.findViewById(R.id.tvOne);
5938
                                    tvOne.setOnClickListener(new View.OnClickListener() {
5939
                                        @Override
5940
                                        public void onClick(View view) {
5941
                                            Intent intent = null;
5942
                                            int position_jing = poi_jing.length() - poi_jing.indexOf(".") - 1;
5943
                                            int position_wei = poi_wei.length() - poi_wei.indexOf(".") - 1;
5944
                                            if (position_jing > 13 || position_wei > 13) {
5945
                                                getBaidu1(Double.parseDouble(poi_jing), Double.parseDouble(poi_wei));
5946
                                            } else {
5947
                                                bd_jing = Double.parseDouble(poi_jing);
5948
                                                bd_wei = Double.parseDouble(poi_wei);
5949
                                            }
5950
                                            getBaidu(center.longitude, center.latitude);
5951
                                            try {
5952
                                                String s = "intent://map/direction?" +
5953
                                                        "origin=" + bd_lat + "," + bd_lon + "&" +
5954
                                                        "destination=" + bd_wei + "," + bd_jing +
5955
                                                        "&mode=driving&" +
5956
                                                        "src=充电桩#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end";
5957
//                                    Log.e("sss", s);
5958
                                                intent = Intent.getIntent(s);
5959
                                                detailsBack = true;
5960
                                                HashMap<String, String> map = new HashMap<String, String>();
5961
                                                map.put("Name", zhan_name);
5962
                                                map.put("CostWay", charge_cost_way);
5963
                                                map.put("City", city);
5964
                                                MobclickAgent.onEvent(context, "0031", map);
5965
                                                map.clear();
5966
                                            } catch (URISyntaxException e) {
5967
                                                e.printStackTrace();
5968
                                            }
5969
                                            startActivity(intent);
5970
                                            popupWindow.dismiss();
5971
5972
                                        }
5973
5974
                                    });
5975
                                    tvTwo = (TextView) popupWindowView.findViewById(R.id.tvTwo);
5976
                                    tvTwo.setOnClickListener(new View.OnClickListener() {
5977
                                        @Override
5978
                                        public void onClick(View view) {
5979
                                            try {
5980
                                                Intent intent4 = new Intent("android.intent.action.VIEW",
5981
                                                        android.net.Uri.parse("androidamap://route?sourceApplication=amap&slat=" + center.latitude + "&slon=" + center.longitude + "&sname=我的位置&dlat=" + ll.latitude + "&dlon=" + ll.longitude + "&dname=" + zhan_name + "&dev=0&m=0&t=2"));
5982
                                                intent4.setPackage("com.autonavi.minimap");
5983
                                                startActivity(intent4);
5984
                                                detailsBack = true;
5985
                                                popupWindow.dismiss();
5986
                                                HashMap<String, String> map = new HashMap<String, String>();
5987
                                                map.put("Name", zhan_name);
5988
                                                map.put("CostWay", charge_cost_way);
5989
                                                map.put("City", city);
5990
                                                MobclickAgent.onEvent(context, "0032", map);
5991
                                                map.clear();
5992
                                            } catch (Exception e) {
5993
                                                e.printStackTrace();
5994
                                                Toast.makeText(getApplication(), "请您确认是否安装高德地图APP", Toast.LENGTH_SHORT).show();
5995
                                            }
5996
5997
                                        }
5998
                                    });
5999
                                    popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
6000
//                                            startNavi(center, ll);
6001
                                } else {
6002
                                    ToastUtil.showToast(getApplicationContext(), "请检查您当前网络或定位权限是否开启", Toast.LENGTH_SHORT);
6003
                                }
6004
                            }
6005
                        }
6006
                    }).setNegativeButton("取消", new View.OnClickListener() {
6007
                @Override
6008
                public void onClick(View v) {
6009
6010
                }
6011
            }).show();
5854 6012
        } else {
5855 6013
            new com.electric.chargingpile.view.AlertDialog(MainMapActivity.this).builder()
5856
                    .setMsg("站点充电桩均为离线或故障,可能无法正常充电,是否继续前往")
6014
                    .setTitle("站点故障")
6015
                    .setMsg("该站点充电桩均为离线或故障\n" + "可能无法正常充电,是否继续前往")
5857 6016
                    .setPositiveButton("继续", new View.OnClickListener() {
5858 6017
                        @Override
5859 6018
                        public void onClick(View v) {

+ 98 - 2
app/src/main/java/com/electric/chargingpile/activity/ShareTwoActivity.java

@ -20,6 +20,7 @@ import android.os.Handler;
20 20
import android.os.Message;
21 21
import android.provider.MediaStore;
22 22
import android.support.annotation.NonNull;
23
import android.support.constraint.ConstraintLayout;
23 24
import android.support.v4.content.FileProvider;
24 25
import android.util.Base64;
25 26
import android.util.Log;
@ -159,12 +160,22 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
159 160
    private ProgressDialog insertDialog;
160 161
    private static final int RC_ALBUM_PERM = 123;
161 162
163
    private ImageItem[] selectBitmap = new ImageItem[4];
164
    private int selectIndex = 0;
165
166
    private ArrayList<ImageView> takeImageViewList = new ArrayList<>();
167
    private ArrayList<ImageView> takeImageCameraList = new ArrayList<>();
162 168
163 169
    private Handler handler = new Handler() {
164 170
        // 主线程通过这个方法处理消息
165 171
        @Override
166 172
        public void handleMessage(Message msg) {
167 173
            switch (msg.what) {
174
                case 1:
175
                    int index = msg.arg1;
176
                    takeImageViewList.get(index).setImageBitmap(selectBitmap[index].getBitmap());
177
                    takeImageCameraList.get(index).setVisibility(View.GONE);
178
                    break;
168 179
                case 2:
169 180
                    Toast.makeText(ShareTwoActivity.this, "提交信息成功,感谢您的分享", Toast.LENGTH_SHORT).show();
170 181
                    dismissDialog();
@ -220,6 +231,10 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
220 231
    };
221 232
    private EditText chargeCostWay;
222 233
    private EditText telephone;
234
    private ConstraintLayout take_image_0;
235
    private ConstraintLayout take_image_1;
236
    private ConstraintLayout take_image_2;
237
    private ConstraintLayout take_image_3;
223 238
224 239
225 240
    @Override
@ -413,7 +428,8 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
413 428
                        ImageItem takePhoto = new ImageItem();
414 429
                        takePhoto.setBitmap(bitmap);
415 430
                        takePhoto.setImagePath(imagePath);
416
                        Bimp.tempSelectBitmap.add(takePhoto);
431
                        //Bimp.tempSelectBitmap.add(takePhoto);
432
                        selectBitmap[selectIndex] = takePhoto;
417 433
//
418 434
                        subscriber.onNext(imagePath);
419 435
                    }
@ -431,7 +447,12 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
431 447
                    public void onComplete() {
432 448
                        Log.e(TAG, "onCompleted: -------------");
433 449
                        insertDialog.dismiss();
434
                        adapter.update();
450
                        Message msg = new Message();
451
                        msg.arg1 = selectIndex;
452
                        msg.what = 1;
453
                        handler.sendMessage(msg);
454
//                        adapter.update();
455
435 456
436 457
                    }
437 458
@ -539,6 +560,33 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
539 560
540 561
        et_share_address = (TextView) findViewById(R.id.et_share_address);
541 562
        zhuangType = (TextView) findViewById(R.id.tv_zhuangType);
563
        take_image_0 = findViewById(R.id.take_image_0);
564
        take_image_1 = findViewById(R.id.take_image_1);
565
        take_image_2 = findViewById(R.id.take_image_2);
566
        take_image_3 = findViewById(R.id.take_image_3);
567
568
        take_image_0.setOnClickListener(this);
569
        take_image_1.setOnClickListener(this);
570
        take_image_2.setOnClickListener(this);
571
        take_image_3.setOnClickListener(this);
572
573
        ImageView take_image_view_0 = findViewById(R.id.take_image_view_0);
574
        ImageView take_image_view_1 = findViewById(R.id.take_image_view_1);
575
        ImageView take_image_view_2 = findViewById(R.id.take_image_view_2);
576
        ImageView take_image_view_3 = findViewById(R.id.take_image_view_3);
577
        takeImageViewList.add(take_image_view_0);
578
        takeImageViewList.add(take_image_view_1);
579
        takeImageViewList.add(take_image_view_2);
580
        takeImageViewList.add(take_image_view_3);
581
582
        ImageView take_image_camera_0 = findViewById(R.id.take_image_camera_0);
583
        ImageView take_image_camera_1 = findViewById(R.id.take_image_camera_1);
584
        ImageView take_image_camera_2 = findViewById(R.id.take_image_camera_2);
585
        ImageView take_image_camera_3 = findViewById(R.id.take_image_camera_3);
586
        takeImageCameraList.add(take_image_camera_0);
587
        takeImageCameraList.add(take_image_camera_1);
588
        takeImageCameraList.add(take_image_camera_2);
589
        takeImageCameraList.add(take_image_camera_3);
542 590
543 591
    }
544 592
@ -546,6 +594,54 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
546 594
    @Override
547 595
    public void onClick(View v) {
548 596
        switch (v.getId()) {
597
            case R.id.take_image_0:
598
                selectIndex = 0;
599
                if (selectBitmap[0] == null) {
600
                    permissionTask();
601
                } else {
602
                    Intent intent = new Intent(ShareTwoActivity.this,
603
                            GalleryActivity.class);
604
                    intent.putExtra("position", "1");
605
                    intent.putExtra("ID", 0);
606
                    startActivity(intent);
607
                }
608
                break;
609
            case R.id.take_image_1:
610
                selectIndex = 1;
611
                if (selectBitmap[1] == null) {
612
                    permissionTask();
613
                } else {
614
                    Intent intent = new Intent(ShareTwoActivity.this,
615
                            GalleryActivity.class);
616
                    intent.putExtra("position", "1");
617
                    intent.putExtra("ID", 1);
618
                    startActivity(intent);
619
                }
620
                break;
621
            case R.id.take_image_2:
622
                selectIndex = 2;
623
                if (selectBitmap[2] == null) {
624
                    permissionTask();
625
                } else {
626
                    Intent intent = new Intent(ShareTwoActivity.this,
627
                            GalleryActivity.class);
628
                    intent.putExtra("position", "1");
629
                    intent.putExtra("ID", 2);
630
                    startActivity(intent);
631
                }
632
                break;
633
            case R.id.take_image_3:
634
                selectIndex = 3;
635
                if (selectBitmap[3] == null) {
636
                    permissionTask();
637
                } else {
638
                    Intent intent = new Intent(ShareTwoActivity.this,
639
                            GalleryActivity.class);
640
                    intent.putExtra("position", "1");
641
                    intent.putExtra("ID", 3);
642
                    startActivity(intent);
643
                }
644
                break;
549 645
            case R.id.iv_chakan:
550 646
                new ShareDialog(this).builder()
551 647
                        .setCancelable(true)

+ 2 - 5
app/src/main/java/com/electric/chargingpile/view/AlertDialog.java

@ -2,7 +2,6 @@ package com.electric.chargingpile.view;
2 2
3 3
import android.app.Dialog;
4 4
import android.content.Context;
5
import android.view.Display;
6 5
import android.view.LayoutInflater;
7 6
import android.view.View;
8 7
import android.view.View.OnClickListener;
@ -15,6 +14,7 @@ import android.widget.LinearLayout.LayoutParams;
15 14
import android.widget.TextView;
16 15
17 16
import com.electric.chargingpile.R;
17
import com.mabeijianxi.smallvideorecord2.DeviceUtils;
18 18
19 19
public class AlertDialog {
20 20
    private Context context;
@ -25,7 +25,6 @@ public class AlertDialog {
25 25
    private Button btn_neg;
26 26
    private Button btn_pos;
27 27
    private ImageView img_line;
28
    private Display display;
29 28
    private boolean showTitle = false;
30 29
    private boolean showMsg = false;
31 30
    private boolean showPosBtn = false;
@ -35,7 +34,6 @@ public class AlertDialog {
35 34
        this.context = context;
36 35
        WindowManager windowManager = (WindowManager) context
37 36
                .getSystemService(Context.WINDOW_SERVICE);
38
        display = windowManager.getDefaultDisplay();
39 37
    }
40 38
41 39
    public AlertDialog builder() {
@ -61,8 +59,7 @@ public class AlertDialog {
61 59
        dialog.setContentView(view);
62 60
63 61
        // 调整dialog背景大小
64
        lLayout_bg.setLayoutParams(new FrameLayout.LayoutParams((int) (display
65
                .getWidth() * 0.85), LayoutParams.WRAP_CONTENT));
62
        lLayout_bg.setLayoutParams(new FrameLayout.LayoutParams((int) (DeviceUtils.getScreenWidth(context) * 0.85), LayoutParams.WRAP_CONTENT));
66 63
67 64
        return this;
68 65
    }

BIN
app/src/main/res/drawable-xhdpi/bg_w_4.9.png


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


BIN
app/src/main/res/drawable-xxhdpi/bg_w_4.9.png


+ 2 - 0
app/src/main/res/layout/activity_main_map.xml

@ -1057,6 +1057,8 @@
1057 1057
                        android:layout_height="wrap_content"
1058 1058
                        android:src="@drawable/icon_is_cost"
1059 1059
                        android:visibility="gone"
1060
                        android:layout_marginLeft="5dp"
1061
                        android:layout_marginRight="5dp"
1060 1062
                        tools:visibility="visible" />
1061 1063
                </LinearLayout>
1062 1064
            </RelativeLayout>

+ 140 - 12
app/src/main/res/layout/activity_share_two.xml

@ -1,5 +1,6 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<com.zhy.autolayout.AutoRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3 4
    android:id="@+id/claim"
4 5
    android:layout_width="match_parent"
5 6
    android:layout_height="match_parent"
@ -155,17 +156,6 @@
155 156
                android:orientation="vertical"
156 157
                android:visibility="visible">
157 158

158
                <TextView
159
                    android:layout_width="wrap_content"
160
                    android:layout_height="wrap_content"
161
                    android:layout_gravity="center_vertical"
162
                    android:layout_marginLeft="16dp"
163
                    android:layout_marginTop="8dp"
164
                    android:text="请上传充电站照片"
165
                    android:textColor="@color/title_row"
166
                    android:textSize="16sp"
167
                    android:visibility="gone" />
168

169 159
                <GridView
170 160
                    android:id="@+id/noScrollgridview"
171 161
                    android:layout_width="match_parent"
@ -176,7 +166,145 @@
176 166
                    android:horizontalSpacing="3dp"
177 167
                    android:numColumns="4"
178 168
                    android:scrollbars="none"
179
                    android:verticalSpacing="5dp"></GridView>
169
                    android:verticalSpacing="5dp"
170
                    android:visibility="gone"></GridView>
171

172
                <LinearLayout
173
                    android:layout_width="match_parent"
174
                    android:layout_height="wrap_content"
175
                    android:layout_marginLeft="15dp"
176
                    android:layout_marginTop="10dp"
177
                    android:layout_marginRight="15dp"
178
                    android:orientation="horizontal">
179

180
                    <android.support.constraint.ConstraintLayout
181
                        android:id="@+id/take_image_0"
182
                        android:layout_width="0dp"
183
                        android:layout_height="wrap_content"
184
                        android:layout_marginLeft="2.5dp"
185
                        android:layout_marginRight="2.5dp"
186
                        android:layout_weight="1">
187

188
                        <ImageView
189
                            android:id="@+id/take_image_view_0"
190
                            android:layout_width="82dp"
191
                            android:layout_height="70dp"
192
                            android:scaleType="centerCrop"
193
                            android:src="@drawable/add_picture_1"
194
                            app:layout_constraintBottom_toBottomOf="parent"
195
                            app:layout_constraintLeft_toLeftOf="parent"
196
                            app:layout_constraintRight_toRightOf="parent"
197
                            app:layout_constraintTop_toTopOf="parent" />
198

199
                        <ImageView
200
                            android:id="@+id/take_image_camera_0"
201
                            android:layout_width="wrap_content"
202
                            android:layout_height="wrap_content"
203
                            android:layout_marginTop="5dp"
204
                            android:layout_marginRight="5dp"
205
                            android:scaleType="fitEnd"
206
                            android:src="@drawable/camera_icon"
207
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_0"
208
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_0" />
209

210

211
                    </android.support.constraint.ConstraintLayout>
212

213
                    <android.support.constraint.ConstraintLayout
214
                        android:id="@+id/take_image_1"
215
                        android:layout_width="0dp"
216
                        android:layout_height="wrap_content"
217
                        android:layout_marginLeft="2.5dp"
218
                        android:layout_marginRight="2.5dp"
219
                        android:layout_weight="1">
220

221
                        <ImageView
222
                            android:id="@+id/take_image_view_1"
223
                            android:layout_width="82dp"
224
                            android:layout_height="70dp"
225
                            android:scaleType="centerCrop"
226
                            android:src="@drawable/add_picture_2"
227
                            app:layout_constraintBottom_toBottomOf="parent"
228
                            app:layout_constraintLeft_toLeftOf="parent"
229
                            app:layout_constraintRight_toRightOf="parent"
230
                            app:layout_constraintTop_toTopOf="parent" />
231

232
                        <ImageView
233
                            android:id="@+id/take_image_camera_1"
234
                            android:layout_width="wrap_content"
235
                            android:layout_height="wrap_content"
236
                            android:layout_marginTop="5dp"
237
                            android:layout_marginRight="5dp"
238
                            android:scaleType="fitEnd"
239
                            android:src="@drawable/camera_icon"
240
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_1"
241
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_1" />
242
                    </android.support.constraint.ConstraintLayout>
243

244
                    <android.support.constraint.ConstraintLayout
245
                        android:id="@+id/take_image_2"
246
                        android:layout_width="0dp"
247
                        android:layout_height="wrap_content"
248
                        android:layout_marginLeft="2.5dp"
249
                        android:layout_marginRight="2.5dp"
250
                        android:layout_weight="1">
251

252
                        <ImageView
253
                            android:id="@+id/take_image_view_2"
254
                            android:layout_width="82dp"
255
                            android:layout_height="70dp"
256
                            android:scaleType="centerCrop"
257
                            android:src="@drawable/add_picture_3"
258
                            app:layout_constraintBottom_toBottomOf="parent"
259
                            app:layout_constraintLeft_toLeftOf="parent"
260
                            app:layout_constraintRight_toRightOf="parent"
261
                            app:layout_constraintTop_toTopOf="parent" />
262

263
                        <ImageView
264
                            android:id="@+id/take_image_camera_2"
265
                            android:layout_width="wrap_content"
266
                            android:layout_height="wrap_content"
267
                            android:layout_marginTop="5dp"
268
                            android:layout_marginRight="5dp"
269
                            android:scaleType="fitEnd"
270
                            android:src="@drawable/camera_icon"
271
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_2"
272
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_2" />
273
                    </android.support.constraint.ConstraintLayout>
274

275
                    <android.support.constraint.ConstraintLayout
276
                        android:id="@+id/take_image_3"
277
                        android:layout_width="0dp"
278
                        android:layout_height="wrap_content"
279
                        android:layout_marginLeft="2.5dp"
280
                        android:layout_marginRight="2.5dp"
281
                        android:layout_weight="1">
282

283
                        <ImageView
284
                            android:id="@+id/take_image_view_3"
285
                            android:layout_width="82dp"
286
                            android:layout_height="70dp"
287
                            android:scaleType="centerCrop"
288
                            android:src="@drawable/add_picture_4"
289
                            app:layout_constraintBottom_toBottomOf="parent"
290
                            app:layout_constraintLeft_toLeftOf="parent"
291
                            app:layout_constraintRight_toRightOf="parent"
292
                            app:layout_constraintTop_toTopOf="parent" />
293

294
                        <ImageView
295
                            android:id="@+id/take_image_camera_3"
296
                            android:layout_width="wrap_content"
297
                            android:layout_height="wrap_content"
298
                            android:layout_marginTop="5dp"
299
                            android:layout_marginRight="5dp"
300
                            android:scaleType="fitEnd"
301
                            android:src="@drawable/camera_icon"
302
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_3"
303
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_3" />
304

305
                    </android.support.constraint.ConstraintLayout>
306

307
                </LinearLayout>
180 308

181 309
                <RelativeLayout
182 310
                    android:layout_width="match_parent"

+ 9 - 6
app/src/main/res/layout/view_alertdialog.xml

@ -1,30 +1,34 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<com.zhy.autolayout.AutoLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:tools="http://schemas.android.com/tools"
3 4
    android:id="@+id/lLayout_bg"
4 5
    android:layout_width="800px"
5 6
    android:layout_height="450px"
6 7
    android:background="@drawable/offlinearrow_but_normal"
7
    android:orientation="vertical" >
8
    android:orientation="vertical">
8 9

9 10
    <TextView
10 11
        android:id="@+id/txt_title"
11 12
        android:layout_width="match_parent"
12 13
        android:layout_height="wrap_content"
13 14
        android:layout_marginLeft="44px"
14
        android:layout_marginRight="44px"
15 15
        android:layout_marginTop="64px"
16
        android:layout_marginRight="44px"
16 17
        android:gravity="center"
18
        tools:text="标题"
17 19
        android:textColor="@color/black"
18 20
        android:textSize="18sp"
19 21
        android:textStyle="bold" />
20 22

21 23
    <TextView
22 24
        android:id="@+id/txt_msg"
25
        tools:text="这一段模拟内容\n开始模拟"
23 26
        android:layout_width="match_parent"
24 27
        android:layout_height="wrap_content"
25 28
        android:layout_marginLeft="44px"
29
        android:layout_marginTop="32px"
30
        android:lineSpacingExtra="5dp"
26 31
        android:layout_marginRight="44px"
27
        android:layout_marginTop="64px"
28 32
        android:gravity="center"
29 33
        android:textColor="@color/black"
30 34
        android:textSize="16sp" />
@ -38,7 +42,7 @@
38 42
    <com.zhy.autolayout.AutoLinearLayout
39 43
        android:layout_width="match_parent"
40 44
        android:layout_height="130px"
41
        android:orientation="horizontal" >
45
        android:orientation="horizontal">
42 46

43 47
        <Button
44 48
            android:id="@+id/btn_neg"
@ -48,8 +52,7 @@
48 52
            android:background="@drawable/alertdialog_left_selector"
49 53
            android:gravity="center"
50 54
            android:textColor="@color/actionsheet_green"
51
            android:textSize="16sp"
52
            />
55
            android:textSize="16sp" />
53 56

54 57
        <ImageView
55 58
            android:id="@+id/img_line"