class="lines-num lines-num-old"> 1587
//                    }
1588
//                });
1589
//                popupWindow.showAtLocation(cancleButton, Gravity.CENTER, 0, 0);
1590
//                break;
1591
//            case R.id.tv_submit:
1592
//                if (!et_serviceCost.getText().toString().equals("")&& Bimp.tempSelectBitmap.size() != 0) {
1593
//                    createDialog();
1594
//                    new Thread(new Runnable() {
1595
//                        @Override
1596
//                        public void run() {
1597
////                       submitShareTwo();
1598
//
1599
//                            try {
1600
//
1601
//                                    shite("");
1602
//
1603
//
1604
//                            } catch (Exception e) {
1605
//                                e.printStackTrace();
1606
//                            }
1607
//
1608
////                    uploadFile();
1609
//                        }
1610
//                    }).start();
1611
//                }else if (Bimp.tempSelectBitmap.size() == 0){
1612
//                    Toast.makeText(getApplication(),"请提交站点照片",Toast.LENGTH_SHORT).show();
1613
//                } else{
1614
//                    Toast.makeText(ClaimSurveyTwoActivity.this,"请确认必填项是否全部填写",Toast.LENGTH_SHORT).show();
1615
//                }
1616
//                break;
1617
1618
//            case R.id.zoomin1:
1619
//                mBaiduMap.setMapStatus(MapStatusUpdateFactory
1620
//                        .zoomTo(mapStatus.zoom + 1));
1621
//                controlZoomShow();
1622
//                break;
1623
//            case R.id.zoomout1:
1624
//                mBaiduMap.setMapStatus(MapStatusUpdateFactory
1625
//                        .zoomTo(mapStatus.zoom - 1));
1626
//                controlZoomShow();
1627
//                break;
1628
1629
        }
813
        }
1630
1631
//        mapStatus = mBaiduMap.getMapStatus();
1632
1633
1634
    }
814
    }
1635
815
1636
816
1637
    public boolean onKeyDown(int keyCode, KeyEvent event) {
817
    public boolean onKeyDown(int keyCode, KeyEvent event) {
1638
        if (keyCode == KeyEvent.KEYCODE_BACK) {
818
        if (keyCode == KeyEvent.KEYCODE_BACK) {
1639
//            SharedPreferencesUtil sharedPreferencesUtil = new SharedPreferencesUtil(getApplication());
1640
//            sharedPreferencesUtil.setFileName("shareInfo");
1641
//            sharedPreferencesUtil.clearData();
1642
            finish();
819
            finish();
1643
        }
820
        }
1644
        return false;
821
        return false;
1645
822
1646
    }
823
    }
1647
824
1648
    //地图缩放方法
1649
//    private void controlZoomShow() {
1650
//        float zoom = mBaiduMap.getMapStatus().zoom;
1651
//        try {
1652
//            if (zoom >= maxZoomLevel) {
1653
//                inBtn.setImageResource(R.drawable.icon_nojia2_0);
1654
//                inBtn.setEnabled(false);
1655
////                Toast.makeText(getApplication(), "已放大到最大级别", Toast.LENGTH_SHORT)
1656
////                        .show();
1657
//                return;
1658
//            } else {
1659
//                inBtn.setImageResource(R.drawable.icon_jia2_0);
1660
//                inBtn.setEnabled(true);
1661
//            }
1662
//
1663
//            if (zoom <= minZoomLevel) {
1664
//                outBtn.setImageResource(R.drawable.icon_nojian2_0);
1665
//                outBtn.setEnabled(false);
1666
////                Toast.makeText(getApplication(), "已缩小到最小级别", Toast.LENGTH_SHORT)
1667
////                        .show();
1668
//                return;
1669
//            } else {
1670
//                outBtn.setImageResource(R.drawable.icon_jian2_0);
1671
//                outBtn.setEnabled(true);
1672
//            }
1673
//        } catch (Exception e) {
1674
//            e.printStackTrace();
1675
//        }
1676
//
1677
//    }
1678
1679
//    public void getPoint() {
1680
//        if (!isGetData) {
1681
//            isGetData = true;
1682
//            new Handler().postDelayed(new Runnable() {
1683
//
1684
//                @Override
1685
//                public void run() {
1686
//                    MyLocationData locCenter = mBaiduMap.getLocationData();
1687
//                    if (locCenter != null) {
1688
//                        center = new LatLng(locCenter.latitude,
1689
//                                locCenter.longitude);
1690
//
1691
////                        mBaiduMap.addOverlay(new MarkerOptions().position(center).icon(
1692
////                                BitmapDescriptorFactory
1693
////                                        .fromResource(R.drawable.position_icon)));
1694
//                    } else {
1695
//                        return;
1696
//                    }
1697
////                    Point p1 = new Point(0, 0);
1698
////                    LatLng locLeftTop = mBaiduMap.getProjection()
1699
////                            .fromScreenLocation(p1);
1700
////                    Point p2 = new Point(MainApplication.mScreenWidth, mMapView
1701
////                            .getHeight());
1702
////                    LatLng llRightBottom = mBaiduMap.getProjection()
1703
////                            .fromScreenLocation(p2);
1704
////                    MainMap();
1705
//                }
1706
//            }, 500);
1707
//        }
1708
//    }
1709
1710
//    private void MainMap() {
1711
//        new Thread(new Runnable() {
1712
//            Point p1 = new Point(0,0);
1713
//            LatLng locLeftTop = mBaiduMap.getProjection()
1714
//                    .fromScreenLocation(p1);
1715
//            Point p2 = new Point(MainApplication.mScreenWidth, mMapView
1716
//                    .getHeight());
1717
//            LatLng llRightBottom = mBaiduMap.getProjection()
1718
//                    .fromScreenLocation(p2);
1719
//
1720
//
1721
//            //            GeoPoint centerPoint = mapview.getMapCenter();// 地图中心坐标
1722
////            int tbSpan = mapview.getLatitudeSpan();// 当前纬线的跨度(从地图的上边缘到下边缘)
1723
////            int lrSpan = mapview.getLongitudeSpan();// 当前经度的跨度(从地图的左边缘到地图的右边缘)
1724
////            GeoPoint ltPoint = new GeoPoint(centerPoint.getLatitudeE6() - tbSpan / 2, centerPoint.getLongitudeE6() - lrSpan
1725
////                    / 2);// 左上角坐标
1726
////            GeoPoint rbPoint = new GeoPoint(centerPoint.getLatitudeE6()// 右下角坐标
1727
////                    + tbSpan / 2, centerPoint.getLongitudeE6() + lrSpan / 2);
1728
//            @Override
1729
//            public void run() {
1730
//                String url=MainApplication.url+"/zhannew/basic/web/index.php/zhanlist/getlist?poi_lux="+ locLeftTop.longitude+""+"&poi_luy="+ locLeftTop.latitude+"" +"&poi_rdx="+ llRightBottom.longitude+""+"&poi_rdy="+ llRightBottom.latitude+ ""+"&suit_car2="+MainApplication.userTpye;
1731
//                submitShowMap(url);
1732
//            }
1733
//        }).start();
1734
//
1735
//    }
1736
1737
    private void submitShowMap(String sms) {
825
    private void submitShowMap(String sms) {
1738
1739
        Log.e("url", sms);
1740
        Request request = new Request.Builder().url(sms).build();
826
        Request request = new Request.Builder().url(sms).build();
1741
        Response response = null;
827
        Response response = null;
1742
        try {
828
        try {
1867
        par.put("slow_num", slowNum.getText().toString());
953
        par.put("slow_num", slowNum.getText().toString());
1868
        if (tag.equals("edit")) {
954
        if (tag.equals("edit")) {
1869
            par.put("where", id);
955
            par.put("where", id);
1870
//            JSONObject jsonObject = new JSONObject();
1871
//            JSONArray jsonArray = new JSONArray();
1872
//            jsonArray.put(0,"a");
1873
//            jsonObject.put("jsonArray",jsonArray);
1874
            par.put("picid", "a");
956
            par.put("picid", "a");
1875
        }
957
        }
1876
958
1877
//        if ()
1878
//        par.put("where", zhan_id);
1879
1880
1881
//        par.put("zhan_id", zhan_id);
1882
//        par.put("total_num", "");
1883
//
1884
//        par.put("open_object", "");
1885
//        par.put("charges", "");
1886
//
1887
//        par.put("stop_cost_way", "");
1888
//
1889
//
1890
//        par.put("other_cost", et_serviceCost.getText().toString());
1891
//
1892
//        par.put("zhuang_produce", "");
1893
//
1894
//        par.put("city", "");
1895
//        par.put("supplier", "");
1896
//        par.put("facilities_classify", "");
1897
//        par.put("belong_attribute", "");
1898
//        par.put("operation_state", "");
1899
//
1900
//        par.put("holiday_open", "");
1901
//        par.put("holiday_close", "");
1902
//        par.put("company_name", "");
1903
//        par.put("person_name", "");
1904
//        par.put("zhuang_num", "");
1905
//        par.put("zy_num", "");
1906
//
1907
//
1908
//        par.put("token", DES3.encode(token));
1909
        try {
959
        try {
1910
            String u = UploadUtil.post(
960
            String u = UploadUtil.post(
1911
//                    "http://123.57.6.131/zhannew/basic/web/index.php/zhanlist/add",
1912
                    MainApplication.url + "/zhannew/basic/web/index.php/applist/createpile",
961
                    MainApplication.url + "/zhannew/basic/web/index.php/applist/createpile",
1913
                    par, null);
962
                    par, null);
1914
            System.err.println(u);
963
            System.err.println(u);
1936
    public void permissionTask() {
985
    public void permissionTask() {
1937
        if (isPermissionOK()) {
986
        if (isPermissionOK()) {
1938
            callGallery();
987
            callGallery();
1939
            // Have permission, do the thing!
1940
//            Toast.makeText(this, "TODO: Camera things", Toast.LENGTH_LONG).show();
1941
//            ifTimeout();
1942
        } else {
988
        } else {
1943
            // Ask for one permission
1944
            EasyPermissions.requestPermissions(
989
            EasyPermissions.requestPermissions(
1945
                    this, "充电桩想要获取您的图片读取权限,是否允许?",
990
                    this, "充电桩想要获取您的图片读取权限,是否允许?",
1946
                    RC_ALBUM_PERM,
991
                    RC_ALBUM_PERM,
1947
                    Manifest.permission.WRITE_EXTERNAL_STORAGE,
992
                    Manifest.permission.WRITE_EXTERNAL_STORAGE,
1948
                    Manifest.permission.READ_EXTERNAL_STORAGE);
993
                    Manifest.permission.READ_EXTERNAL_STORAGE,
994
                    Manifest.permission.CAMERA
995
            );
1949
        }
996
        }
1950
    }
997
    }
1951
998
1952
    private boolean isPermissionOK() {
999
    private boolean isPermissionOK() {
1953
        return EasyPermissions.hasPermissions(this,
1000
        return EasyPermissions.hasPermissions(this,
1954
                Manifest.permission.WRITE_EXTERNAL_STORAGE,
1001
                Manifest.permission.WRITE_EXTERNAL_STORAGE,
1955
                Manifest.permission.READ_EXTERNAL_STORAGE
1002
                Manifest.permission.READ_EXTERNAL_STORAGE,
1003
                Manifest.permission.CAMERA
1956
        );
1004
        );
1957
    }
1005
    }
1958
1006
1959
1960
//    @Override
1961
//    public void onGetGeoCodeResult(GeoCodeResult geoCodeResult) {
1962
//
1963
//    }
1964
//
1965
//    @Override
1966
//    public void onGetReverseGeoCodeResult(ReverseGeoCodeResult result) {
1967
//        if (result == null || result.error != SearchResult.ERRORNO.NO_ERROR) {
1968
//            Toast.makeText(ShareTwoActivity.this, "抱歉,未能找到结果",
1969
//                    Toast.LENGTH_LONG).show();
1970
//            return;
1971
//        }
1972
////        TextView tv = new TextView(this);
1973
////        tv.setBackgroundResource(R.color.bkg_button_green);
1974
////        tv.setPadding(7, 7, 7, 7);
1975
////        tv.setText(result.getAddress());
1976
////        tv.setTextColor(Color.WHITE);
1977
////        mInfoWindow = new InfoWindow(tv, llposition, -60);
1978
////        mBaiduMap.showInfoWindow(mInfoWindow);
1979
//        location = result.getAddress();
1980
//        city = Util.getCityName(result.getAddress());
1981
//        et_share_address.setText(location);
1982
//    }
1983
1984
    @SuppressLint("HandlerLeak")
1007
    @SuppressLint("HandlerLeak")
1985
    public class GridAdapter extends BaseAdapter {
1008
    public class GridAdapter extends BaseAdapter {
1986
        private LayoutInflater inflater;
1009
        private LayoutInflater inflater;
2106
    private static final int TAKE_PICTURE = 0x000001;
1129
    private static final int TAKE_PICTURE = 0x000001;
2107
1130
2108
    public void photo() {
1131
    public void photo() {
2109
//		Intent openCameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
2110
//		startActivityForResult(openCameraIntent, TAKE_PICTURE);
2111
//        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
2112
//        File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/myimage/", String.valueOf(System
2113
//                .currentTimeMillis()) + ".jpg");
2114
//        camePath = file.getPath();
2115
//        Uri imageUri = Uri.fromFile(file);
2116
//        intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
2117
//        startActivityForResult(intent, TAKE_PICTURE);
2118
2119
        if (hasSdcard()) {
1132
        if (hasSdcard()) {
2120
            Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);//���������
1133
            Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);//���������
2121
            intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));
1134
            intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(tempFile));
2122
//            intent.putExtra(MediaStore.EXTRA_OUTPUT, cutImgUri);
2123
            startActivityForResult(intent, PHOTO_REQUEST_CAMERA);
1135
            startActivityForResult(intent, PHOTO_REQUEST_CAMERA);
2124
        }
1136
        }
2125
2126
//        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
2127
//        intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(
2128
//                Environment.getExternalStorageDirectory(), "androidapp.jpg")));
2129
//        ((Activity) mContext).startActivityForResult(intent, 2);
2130
    }
1137
    }
2131
1138
2132
//    public void photo() {
2133
//        Intent openCameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
2134
//        startActivityForResult(openCameraIntent, TAKE_PICTURE);
2135
////        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
2136
////        File file = new File(Environment.getExternalStorageDirectory() + "/myimage/", String.valueOf(System
2137
////                .currentTimeMillis()) + ".jpg");
2138
////        camePath = file.getPath();
2139
////        Uri imageUri = Uri.fromFile(file);
2140
////        intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
2141
////        startActivityForResult(intent, TAKE_PICTURE);
2142
//    }
2143
2144
//    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
2145
//        System.out.println("--------data------->"+data);
2146
//        //���ѡȡ
2147
//        if(requestCode == PHOTO_REQUEST_CAMERA && resultCode == Activity.RESULT_OK ){
2148
//            //��������ͼƬ�ͽ�ȡ���ͼƬ�ļ���д����ͬһ���ļ���photo.jpg
2149
//            crop(Uri.fromFile(tempFile),Uri.fromFile(tempFile));
2150
//        }
2151
//        //���ؽ�ȡ��ͼƬ
2152
//        else if(requestCode == PHOTO_REQUEST_CUT ){
2153
//            //���д�ͼʹ��Uri
2154
//            Bitmap bitmap = decodeUriAsBitmap(Uri.fromFile(tempFile));//decode bitmap
2155
////            mFace.setImageBitmap(bitmap);
2156
//            String fileName = String.valueOf(System.currentTimeMillis());
2157
//            ImageItem takePhoto = new ImageItem();
2158
//            takePhoto.setBitmap(bitmap);
2159
//            takePhoto.setImagePath(FileUtils.SDPATH + fileName + ".JPEG");
2160
//            Bimp.tempSelectBitmap.add(takePhoto);
2161
//        }else {
2162
////            Toast.makeText(getApplicationContext(), "��ȡͼƬʧ��", Toast.LENGTH_SHORT).show();
2163
//        }
2164
//        super.onActivityResult(requestCode, resultCode, data);
2165
//        if (resultCode != Activity.RESULT_OK) {
2166
//            return;
2167
//        }
2168
//        switch (requestCode) {
2169
//            // 如果是直接从相册获取
2170
//            case REQUSET:
2171
//                poi_jing = data.getStringExtra("poi_jing");
2172
//                Log.e("返回==poi_jing",poi_jing);
2173
//                poi_wei = data.getStringExtra("poi_wei");
2174
//                Log.e("返回==poi_wei",poi_wei);
2175
//                et_share_address.setText(data.getStringExtra("address"));
2176
//            default:
2177
//                break;
2178
//        }
2179
//    }
2180
2181
//    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
2182
//        switch (requestCode) {
2183
//            case TAKE_PICTURE:
2184
//                if (Bimp.tempSelectBitmap.size() < 3 && resultCode == RESULT_OK) {
2185
//
2186
////                    String fileName = String.valueOf(System.currentTimeMillis());
2187
////                    Bundle bundle = data.getExtras("data");
2188
////                    Bitmap bm = (Bitmap) data.getExtras().get("data");
2189
////                    FileUtils.saveBitmap(bm, fileName);
2190
////
2191
////                    ImageItem takePhoto = new ImageItem();
2192
////                    takePhoto.setBitmap(bm);
2193
////                    takePhoto.setImagePath(FileUtils.SDPATH + fileName + ".JPEG");
2194
////                    Bimp.tempSelectBitmap.add(takePhoto);
2195
//
2196
////                    SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmssSSS");
2197
//
2198
//                    Bitmap bitmap = BitmapFactory.decodeFile(camePath);
2199
//                    File file = new File(String.valueOf(Environment.getDataDirectory()));
2200
//                    file.mkdirs();
2201
//                    String fileName = Environment.getExternalStorageDirectory().getAbsolutePath() + "/myimage/" + System.currentTimeMillis()
2202
//                            + ".jpg";
2203
//                    try {
2204
//                        FileOutputStream b = new FileOutputStream(fileName);
2205
//                        bitmap.compress(Bitmap.CompressFormat.JPEG, 50, b);
2206
//                        b.flush();
2207
//                        b.close();
2208
//                        bitmap = Bimp.revitionImageSize(fileName);
2209
//                        FileUtils.saveBitmap(bitmap,
2210
//                                "" + fileName.substring(fileName.lastIndexOf("/") + 1, fileName.lastIndexOf(".")));
2211
//                    ImageItem takePhoto = new ImageItem();
2212
//                    takePhoto.setBitmap(bitmap);
2213
//                    takePhoto.setImagePath(fileName);
2214
//                    Bimp.tempSelectBitmap.add(takePhoto);
2215
//                        if (null != adapter) {
2216
//                            adapter.notifyDataSetChanged();
2217
//                        }
2218
//                    File refile = new File(camePath);
2219
//                        if (refile.exists()) {
2220
//                            refile.delete();
2221
//                        }
2222
//                    } catch (Exception e) {
2223
//                        e.printStackTrace();
2224
//                    }
2225
//
2226
//
2227
////                    Bitmap bitmap = BitmapFactory.decodeFile(camePath);
2228
////                    File file = new File(Environment.getExternalStorageDirectory() + "/myImage/");
2229
////                    file.mkdirs();
2230
////                    String fileName = Environment.getExternalStorageDirectory() + "/myImage/" + System.currentTimeMillis()
2231
////                            + ".jpg";
2232
////                    try {
2233
////                        FileOutputStream b = new FileOutputStream(fileName);
2234
////                        bitmap.compress(Bitmap.CompressFormat.JPEG, 50, b);
2235
////                        b.flush();
2236
////                        b.close();
2237
////                        bitmap = Bimp.revitionImageSize(fileName);
2238
////                        FileUtils.saveBitmap(bitmap,
2239
////                                "" + fileName.substring(fileName.lastIndexOf("/") + 1, fileName.lastIndexOf(".")));
2240
////                        ImageItem takePhoto = new ImageItem();
2241
////                        takePhoto.setBitmap(bitmap);
2242
////                        takePhoto.setImagePath(fileName);
2243
////                        Bimp.tempSelectBitmap.add(takePhoto);
2244
////                        if (null != adapter) {
2245
////                            adapter.notifyDataSetChanged();
2246
////                        }
2247
////                        File refile = new File(camePath);
2248
////                        if (refile.exists()) {
2249
////                            refile.delete();
2250
////                        }
2251
////                    } catch (Exception e) {
2252
////                        e.printStackTrace();
2253
////                    }
2254
//                }
2255
//
2256
//                break;
2257
////            case 1:
2258
////                if (data != null) {
2259
////                    startPhotoZoom(data.getData());
2260
////                    Toast.makeText(mContext, "拖动正方形角可调整剪切大小",
2261
////                            android.widget.Toast.LENGTH_SHORT).show();
2262
////                }
2263
////                break;
2264
////            // 如果是调用相机拍照时
2265
////            case 2:
2266
////                File temp = new File(Environment.getExternalStorageDirectory()
2267
////                        + "/androidapp.jpg");
2268
////                startPhotoZoom(Uri.fromFile(temp));
2269
////                break;
2270
//        }
2271
//    }
2272
2273
//    private void cameraCamera(Intent data) {
2274
//        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmssSSS");
2275
//        String name = formatter.format(System.currentTimeMillis()) + ".jpg";
2276
//        Log.i("zhiwei.zhao", "image name:" + name);
2277
//        Toast.makeText(this, name, Toast.LENGTH_LONG).show();
2278
//        Bundle bundle = data.getExtras();
2279
//		/* 获取相机返回的数据,并转换为Bitmap图片格式 */
2280
//        Bitmap bitmap = (Bitmap) bundle.get("data");
2281
//        FileOutputStream b = null;
2282
//
2283
//        String path = Environment.getExternalStorageDirectory().getPath();
2284
//        File file = new File(path + "/myImage/");
2285
//        /** 检测文件夹是否存在,不存在则创建文件夹 **/
2286
//        if (!file.exists() && !file.isDirectory())
2287
//            file.mkdirs();
2288
//        String fileName = file.getPath() + "/" + name;
2289
//        Log.i("zhiwei.zhao", "camera file path:" + fileName);
2290
//        try {
2291
//            b = new FileOutputStream(fileName);
2292
//			/* 把数据写入文件 */
2293
//            bitmap.compress(Bitmap.CompressFormat.JPEG, 100, b);
2294
//        } catch (FileNotFoundException e) {
2295
//            e.printStackTrace();
2296
//        } finally {
2297
//            try {
2298
//                if (b == null)
2299
//                    return;
2300
//                b.flush();
2301
//                b.close();
2302
//            } catch (IOException e) {
2303
//                e.printStackTrace();
2304
//            }
2305
//        }
2306
//        showImgs(bitmap, true);
2307
//    }
2308
2309
2310
//    public class MyLocationListenner implements BDLocationListener {
2311
//
2312
//
2313
//        @Override
2314
//        public void onReceiveLocation(BDLocation location) {
2315
//            if (location == null || mMapView == null)
2316
//                return;
2317
//            MyLocationData locData = new MyLocationData.Builder()
2318
//                    .accuracy(location.getRadius()).direction(1000)
2319
//                    .latitude(location.getLatitude())
2320
//                    .longitude(location.getLongitude()).build();
2321
//            mBaiduMap.setMyLocationData(locData);
2322
//            if (isFirstLoc) {
2323
//                isFirstLoc = false;
2324
//                mLocClient.stop();
2325
//                mBaiduMap.setMyLocationEnabled(true);
2326
//                LatLng ll = new LatLng(location.getLatitude(),
2327
//                        location.getLongitude());
2328
//                if (TextUtils.isEmpty(location.getCity())) {
2329
////                        mSearch.reverseGeoCode(new ReverseGeoCodeOption()
2330
////                                .location(ll));
2331
//                } else {
2332
//                    city = location.getCity();
2333
//                }
2334
//                MapStatusUpdate u = MapStatusUpdateFactory.newLatLng(ll);
2335
//                mBaiduMap.animateMapStatus(u);
2336
//                getPoint();
2337
//            }
2338
//        }
2339
//
2340
//        public void onReceivePoi(BDLocation poiLocation) {
2341
//        }
2342
//    }
2343
2344
2345
    @Override
1139
    @Override
2346
    protected void onDestroy() {
1140
    protected void onDestroy() {
2347
        Bimp.tempSelectBitmap.clear();
1141
        Bimp.tempSelectBitmap.clear();
2366
1160
2367
1161
2368
    private void crop(Uri uri, Uri cutImgUri) {
1162
    private void crop(Uri uri, Uri cutImgUri) {
2369
        // �ü�ͼƬ��ͼ
2370
        Intent intent = new Intent("com.android.camera.action.CROP");
1163
        Intent intent = new Intent("com.android.camera.action.CROP");
2371
        intent.setDataAndType(uri, "image/*");
1164
        intent.setDataAndType(uri, "image/*");
2372
        intent.putExtra("crop", "true");
1165
        intent.putExtra("crop", "true");
2373
        // �ü���ı�����1��1
2374
//        intent.putExtra("aspectX", 4);
2375
//        intent.putExtra("aspectY", 3);
2376
        // �ü������ͼƬ�ijߴ��С
2377
//        intent.putExtra("outputX", 400);
2378
//        intent.putExtra("outputY", 300);
2379
2380
        // ͼƬ��ʽ
2381
        intent.putExtra("outputFormat", "JPEG");
1166
        intent.putExtra("outputFormat", "JPEG");
2382
        intent.putExtra("noFaceDetection", true);// ȡ������ʶ��
1167
        intent.putExtra("noFaceDetection", true);// ȡ������ʶ��
2383
        intent.putExtra("return-data", false);// true:������uri��false������uri
1168
        intent.putExtra("return-data", false);// true:������uri��false������uri
2512
        matrix.postScale(scaleWidth, scaleHeight);
1297
        matrix.postScale(scaleWidth, scaleHeight);
2513
        Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, (int) width,
1298
        Bitmap bitmap = Bitmap.createBitmap(bgimage, 0, 0, (int) width,
2514
                (int) height, matrix, true);
1299
                (int) height, matrix, true);
2515
//        iv_2.setImageBitmap(bitmap);
2516
//        tv_2.setText(bitmap.getRowBytes() * bitmap.getHeight() + "");
2517
        return bitmap;
1300
        return bitmap;
2518
    }
1301
    }
2519
1302
2520
    @Override
1303
    @Override
2521
    protected void onResume() {
1304
    protected void onResume() {
2522
        super.onResume();
1305
        super.onResume();
2523
//        SharedPreferencesUtil sharedPreferencesUtil = new SharedPreferencesUtil(getApplication());
2524
//        sharedPreferencesUtil.setFileName("shareInfo");
2525
//        String address =sharedPreferencesUtil.getString("address", "");
2526
//        String costway =sharedPreferencesUtil.getString("costWay", "");
2527
//        jing =sharedPreferencesUtil.getString("poi_jing", "");
2528
//        wei =sharedPreferencesUtil.getString("poi_wei", "");
2529
////        String tel =sharedPreferencesUtil.getString("tel", "");
2530
//////        String car =sharedPreferencesUtil.getString("car", "");
2531
////        String alipay =sharedPreferencesUtil.getString("alipay", "");
2532
////        carType.setText(car);
2533
//        et_share_address.setText(address);
2534
//        costWay.setText(costway);
2535
    }
1306
    }
2536
1307
2537
    public Bitmap getHttpBitmap(String url) {
1308
    public Bitmap getHttpBitmap(String url) {

+ 0 - 1
app/src/main/java/com/electric/chargingpile/activity/UserCenterActivity.java

1007
                    MobclickAgent.onEvent(getApplicationContext(), "0813");
1007
                    MobclickAgent.onEvent(getApplicationContext(), "0813");
1008
                    startActivity(new Intent(this, PrivateZhaungListActivity.class));
1008
                    startActivity(new Intent(this, PrivateZhaungListActivity.class));
1009
                }
1009
                }
1010
1011
                break;
1010
                break;
1012
        }
1011
        }
1013
    }
1012
    }

+ 0 - 3
app/src/main/java/com/electric/chargingpile/adapter/PrivateZhuangListAdapter.java

97
            holder.item_edit = (TextView) convertView.findViewById(R.id.item_edit);
97
            holder.item_edit = (TextView) convertView.findViewById(R.id.item_edit);
98
            holder.item_zhan_address = (TextView) convertView
98
            holder.item_zhan_address = (TextView) convertView
99
                    .findViewById(R.id.item_zhan_address);
99
                    .findViewById(R.id.item_zhan_address);
100
//            holder.slideShowView = (SlideShowView) convertView.findViewById(R.id.rl_img);
101
            holder.item_picnum = (TextView) convertView.findViewById(R.id.item_picnum);
100
            holder.item_picnum = (TextView) convertView.findViewById(R.id.item_picnum);
102
            holder.item_pic = (ImageView) convertView.findViewById(R.id.item_pic);
101
            holder.item_pic = (ImageView) convertView.findViewById(R.id.item_pic);
103
//            holder.tv_claimState = (TextView) convertView
104
//                    .findViewById(R.id.tv_claimState);
105
        }
102
        }
106
103
107
        if (holder != null && convertView != null) {
104
        if (holder != null && convertView != null) {

详情页快慢桩显示样式修改 · d5730d80c6 - Gogs: Go Git Service
Просмотр исходного кода

详情页快慢桩显示样式修改

huyuguo лет назад: 6
Родитель
Сommit
d5730d80c6

+ 31 - 23
app/src/main/java/com/electric/chargingpile/fragment/DetailsFragment.java

@ -350,22 +350,32 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
350 350
                        if (null != acableNum && null != acNum
351 351
                                && null != dcableNum && null != dcNum && !acableNum.equals("")
352 352
                                && !acNum.equals("") && !dcableNum.equals("") && !dcNum.equals("")) {
353
                            detail_fast_num.setText(dcNum);
354
                            detail_fastable_num.setText(dcableNum);
355
                            detail_fastable.setVisibility(View.VISIBLE);
356
                            detail_fastable_num.setVisibility(View.VISIBLE);
357
                            detail_slow_num.setText(acNum);
358
                            detail_slowable_num.setText(acableNum);
359
                            detail_slowable.setVisibility(View.VISIBLE);
360
                            detail_slowable_num.setVisibility(View.VISIBLE);
353
                            window_tv_fast_total_num.setText("/" + dcNum);  // 快充总桩数
354
                            window_tv_fast_free_num.setText(dcableNum); // 快充空闲桩数
355
                            window_tv_fast_total_num.setVisibility(View.VISIBLE);
356
                            window_tv_fast_free_label.setVisibility(View.VISIBLE);
357
358
                            window_tv_slow_total_num.setText("/" + acNum);
359
                            window_tv_slow_free_num.setText(acableNum);
360
                            window_tv_slow_total_num.setVisibility(View.VISIBLE);
361
                            window_tv_slow_free_label.setVisibility(View.VISIBLE);
361 362
362 363
                        } else {
363
                            detail_fast_num.setText(fast_num);
364
                            detail_fastable.setVisibility(View.GONE);
365
                            detail_fastable_num.setVisibility(View.GONE);
366
                            detail_slow_num.setText(slow_num);
367
                            detail_slowable.setVisibility(View.GONE);
368
                            detail_slowable_num.setVisibility(View.GONE);
364
                            if ("".equals(fast_num)) {
365
                                window_tv_fast_free_num.setText("0");
366
                            } else {
367
                                window_tv_fast_free_num.setText(fast_num);
368
                            }
369
                            window_tv_fast_total_num.setVisibility(View.GONE);
370
                            window_tv_fast_free_label.setVisibility(View.GONE);
371
372
                            if ("".equals(slow_num)) {
373
                                window_tv_slow_free_num.setText("0");
374
                            } else {
375
                                window_tv_slow_free_num.setText(slow_num);
376
                            }
377
                            window_tv_slow_total_num.setVisibility(View.GONE);
378
                            window_tv_slow_free_label.setVisibility(View.GONE);
369 379
                        }
370 380
371 381
@ -627,7 +637,6 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
627 637
                                    final String url = MainApplication.url + "/zhannew/uploadfile/" + thumUrl;
628 638
                                    final String file_url = MainApplication.url + "/zhannew/uploadfile/" + fileUrl;
629 639
                                    final String[] ss = {file_url};
630
//                    PicassoUtil.loadingNetImage(mContext,url,holder.iv_commentPic);
631 640
                                    Picasso.with(MainApplication.context)
632 641
                                            .load(url)
633 642
                                            .into(iv_commentPic);
@ -845,14 +854,13 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
845 854
    }
846 855
847 856
    private TextView detail_address, detail_grade, detail_picnum, detail_zhan_distance,
848
            detail_fast_num, detail_fastable, detail_fastable_num, detail_slow_num, detail_slowable, detail_slowable_num,
857
            window_tv_fast_total_num, window_tv_fast_free_label, window_tv_fast_free_num, window_tv_slow_total_num, window_tv_slow_free_label, window_tv_slow_free_num,
849 858
            detail_supplier, detail_cost, detail_serve_cost, detail_serve_cost_two,
850 859
            details_claimer;
851 860
    private AlignTextView detail_charge_cost;
852 861
    private AlignTextView detail_park_cost;
853 862
    private AlignTextView detail_remark;
854 863
    private AlignTextView detail_zhan_name;
855
//    private ImageView chat_share_bar;
856 864
    private LinearLayout red_paper_bag_top;
857 865
    private AlignTextView detail_time;
858 866
    public static TextView detail_list_num;
@ -893,12 +901,12 @@ public class DetailsFragment extends Fragment implements View.OnClickListener, O
893 901
        detail_picnum = (TextView) v.findViewById(R.id.detail_picnum);
894 902
        detail_address = (TextView) v.findViewById(R.id.detail_address);
895 903
        detail_zhan_distance = (TextView) v.findViewById(R.id.detail_zhan_distance);
896
        detail_fast_num = (TextView) v.findViewById(R.id.detail_fast_num);
897
        detail_fastable = (TextView) v.findViewById(R.id.detail_fastable);
898
        detail_fastable_num = (TextView) v.findViewById(R.id.detail_fastable_num);
899
        detail_slow_num = (TextView) v.findViewById(R.id.detail_slow_num);
900
        detail_slowable = (TextView) v.findViewById(R.id.detail_slowable);
901
        detail_slowable_num = (TextView) v.findViewById(R.id.detail_slowable_num);
904
        window_tv_fast_total_num = (TextView) v.findViewById(R.id.window_tv_fast_total_num);
905
        window_tv_fast_free_label = (TextView) v.findViewById(R.id.window_tv_fast_free_label);
906
        window_tv_fast_free_num = (TextView) v.findViewById(R.id.window_tv_fast_free_num);
907
        window_tv_slow_total_num = (TextView) v.findViewById(R.id.window_tv_slow_total_num);
908
        window_tv_slow_free_label = (TextView) v.findViewById(R.id.window_tv_slow_free_label);
909
        window_tv_slow_free_num = (TextView) v.findViewById(R.id.window_tv_slow_free_num);
902 910
        detail_supplier = (TextView) v.findViewById(R.id.detail_supplier);
903 911
        detail_cost = (TextView) v.findViewById(R.id.detail_cost);
904 912
        detail_charge_cost = (AlignTextView) v.findViewById(R.id.detail_charge_cost);

+ 68 - 63
app/src/main/res/layout/fragmen_details_new.xml

@ -162,9 +162,10 @@
162 162
                android:layout_marginLeft="15dp"
163 163
                android:background="#dddddd" />
164 164
165
            <!-- 快慢充 -->
165 166
            <LinearLayout
166 167
                android:layout_width="match_parent"
167
                android:layout_height="44dp"
168
                android:layout_height="50dp"
168 169
                android:orientation="horizontal">
169 170
170 171
                <RelativeLayout
@ -178,47 +179,49 @@
178 179
                        android:layout_centerInParent="true"
179 180
                        android:orientation="horizontal">
180 181
181
                        <TextView
182
                        <ImageView
182 183
                            android:layout_width="wrap_content"
183 184
                            android:layout_height="wrap_content"
184
                            android:layout_gravity="center"
185
                            android:text="快充"
186
                            android:textColor="@color/ui_68"
187
                            android:textSize="12sp" />
185
                            android:layout_gravity="center_vertical"
186
                            android:paddingRight="10dp"
187
                            android:src="@drawable/fast_icon" />
188 188
189 189
                        <TextView
190
                            android:id="@+id/detail_fast_num"
190
                            android:id="@+id/window_tv_fast_free_label"
191 191
                            android:layout_width="wrap_content"
192 192
                            android:layout_height="wrap_content"
193
                            android:layout_gravity="center"
194
                            android:layout_marginLeft="13dp"
195
                            android:text=""
193
                            android:layout_gravity="center_vertical"
194
                            android:text="闲"
196 195
                            android:textColor="@color/ui_62"
197
                            android:textSize="21sp" />
198
199
                        <TextView
200
                            android:id="@+id/detail_fastable"
201
                            android:layout_width="wrap_content"
202
                            android:layout_height="wrap_content"
203
                            android:layout_gravity="center"
204
                            android:layout_marginLeft="24dp"
205
                            android:text="空闲"
206
                            android:textColor="@color/ui_68"
207
                            android:textSize="12sp"
208
                            android:visibility="visible" />
196
                            android:textSize="14sp" />
209 197
210
                        <TextView
211
                            android:id="@+id/detail_fastable_num"
198
                        <LinearLayout
212 199
                            android:layout_width="wrap_content"
213 200
                            android:layout_height="wrap_content"
214
                            android:layout_gravity="center"
215
                            android:layout_marginLeft="13dp"
216
                            android:text=""
217
                            android:textColor="@color/ui_62"
218
                            android:textSize="21sp"
219
                            android:visibility="visible" />
220
221
201
                            android:layout_gravity="center_vertical"
202
                            android:orientation="horizontal">
203
204
                            <TextView
205
                                android:id="@+id/window_tv_fast_free_num"
206
                                android:layout_width="wrap_content"
207
                                android:layout_height="wrap_content"
208
                                android:layout_gravity="bottom"
209
                                android:paddingLeft="5dp"
210
                                android:textColor="@color/ui_62"
211
                                android:textSize="18sp"
212
                                android:textStyle="bold"
213
                                tools:text="13" />
214
215
                            <TextView
216
                                android:id="@+id/window_tv_fast_total_num"
217
                                android:layout_width="wrap_content"
218
                                android:layout_height="wrap_content"
219
                                android:layout_gravity="bottom"
220
                                android:paddingLeft="1dp"
221
                                android:textColor="@color/ui_68"
222
                                android:textSize="12sp"
223
                                tools:text="/15" />
224
                        </LinearLayout>
222 225
                    </LinearLayout>
223 226
224 227
                </RelativeLayout>
@ -240,46 +243,48 @@
240 243
                        android:layout_centerInParent="true"
241 244
                        android:orientation="horizontal">
242 245
243
                        <TextView
246
                        <ImageView
244 247
                            android:layout_width="wrap_content"
245 248
                            android:layout_height="wrap_content"
246
                            android:layout_gravity="center"
247
                            android:text="慢充"
248
                            android:textColor="@color/ui_68"
249
                            android:textSize="12sp" />
250
249
                            android:layout_gravity="center_vertical"
250
                            android:paddingRight="10dp"
251
                            android:src="@drawable/slow_icon" />
251 252
                        <TextView
252
                            android:id="@+id/detail_slow_num"
253
                            android:id="@+id/window_tv_slow_free_label"
253 254
                            android:layout_width="wrap_content"
254 255
                            android:layout_height="wrap_content"
255
                            android:layout_gravity="center"
256
                            android:layout_marginLeft="13dp"
257
                            android:text=""
256
                            android:layout_gravity="center_vertical"
257
                            android:text="闲"
258 258
                            android:textColor="@color/ui_62"
259
                            android:textSize="21sp" />
260
261
                        <TextView
262
                            android:id="@+id/detail_slowable"
263
                            android:layout_width="wrap_content"
264
                            android:layout_height="wrap_content"
265
                            android:layout_gravity="center"
266
                            android:layout_marginLeft="24dp"
267
                            android:text="空闲"
268
                            android:textColor="@color/ui_68"
269
                            android:textSize="12sp"
270
                            android:visibility="visible" />
259
                            android:textSize="14sp" />
271 260
272
                        <TextView
273
                            android:id="@+id/detail_slowable_num"
261
                        <LinearLayout
274 262
                            android:layout_width="wrap_content"
275 263
                            android:layout_height="wrap_content"
276
                            android:layout_gravity="center"
277
                            android:layout_marginLeft="13dp"
278
                            android:text=""
279
                            android:textColor="@color/ui_62"
280
                            android:textSize="21sp"
281
                            android:visibility="visible" />
282
264
                            android:layout_gravity="center_vertical"
265
                            android:orientation="horizontal">
266
267
                            <TextView
268
                                android:id="@+id/window_tv_slow_free_num"
269
                                android:layout_width="wrap_content"
270
                                android:layout_height="wrap_content"
271
                                android:layout_gravity="bottom"
272
                                android:paddingLeft="5dp"
273
                                android:textColor="@color/ui_62"
274
                                android:textSize="18sp"
275
                                android:textStyle="bold"
276
                                tools:text="13" />
277
278
                            <TextView
279
                                android:id="@+id/window_tv_slow_total_num"
280
                                android:layout_width="wrap_content"
281
                                android:layout_height="wrap_content"
282
                                android:layout_gravity="bottom"
283
                                android:paddingLeft="1dp"
284
                                android:textColor="@color/ui_68"
285
                                android:textSize="12sp"
286
                                tools:text="/15" />
287
                        </LinearLayout>
283 288
                    </LinearLayout>
284 289
285 290
                </RelativeLayout>