@ -288,6 +296,10 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
288 296
    }
289 297
290 298
    public void Init() {
299
        selectBitmap[0] = null;
300
        selectBitmap[1] = null;
301
        selectBitmap[2] = null;
302
        selectBitmap[3] = null;
291 303
292 304
        pop = new PopupWindow(ShareTwoActivity.this);
293 305
@ -380,7 +392,7 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
380 392
        Log.e(TAG, "callGallery: " + (Bimp.max - Bimp.tempSelectBitmap.size()));
381 393
        //调用第三方图库选择
382 394
        PhotoPicker.builder()
383
                .setPhotoCount(PIC_NUM - Bimp.tempSelectBitmap.size())//可选择图片数量
395
                .setPhotoCount(1)//可选择图片数量
384 396
                .setShowCamera(true)//是否显示拍照按钮
385 397
                .setShowGif(true)//是否显示动态图
386 398
                .setPreviewEnabled(true)//是否可以预览
@ -599,10 +611,8 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
599 611
                if (selectBitmap[0] == null) {
600 612
                    permissionTask();
601 613
                } else {
602
                    Intent intent = new Intent(ShareTwoActivity.this,
603
                            GalleryActivity.class);
604
                    intent.putExtra("position", "1");
605
                    intent.putExtra("ID", 0);
614
                    Intent intent = new Intent(ShareTwoActivity.this, ShareTwoPictureActivity.class);
615
                    intent.putExtra("selectIndex", selectIndex);
606 616
                    startActivity(intent);
607 617
                }
608 618
                break;
@ -611,10 +621,8 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
611 621
                if (selectBitmap[1] == null) {
612 622
                    permissionTask();
613 623
                } else {
614
                    Intent intent = new Intent(ShareTwoActivity.this,
615
                            GalleryActivity.class);
616
                    intent.putExtra("position", "1");
617
                    intent.putExtra("ID", 1);
624
                    Intent intent = new Intent(ShareTwoActivity.this, ShareTwoPictureActivity.class);
625
                    intent.putExtra("selectIndex", selectIndex);
618 626
                    startActivity(intent);
619 627
                }
620 628
                break;
@ -623,10 +631,8 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
623 631
                if (selectBitmap[2] == null) {
624 632
                    permissionTask();
625 633
                } else {
626
                    Intent intent = new Intent(ShareTwoActivity.this,
627
                            GalleryActivity.class);
628
                    intent.putExtra("position", "1");
629
                    intent.putExtra("ID", 2);
634
                    Intent intent = new Intent(ShareTwoActivity.this, ShareTwoPictureActivity.class);
635
                    intent.putExtra("selectIndex", selectIndex);
630 636
                    startActivity(intent);
631 637
                }
632 638
                break;
@ -635,10 +641,8 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
635 641
                if (selectBitmap[3] == null) {
636 642
                    permissionTask();
637 643
                } else {
638
                    Intent intent = new Intent(ShareTwoActivity.this,
639
                            GalleryActivity.class);
640
                    intent.putExtra("position", "1");
641
                    intent.putExtra("ID", 3);
644
                    Intent intent = new Intent(ShareTwoActivity.this, ShareTwoPictureActivity.class);
645
                    intent.putExtra("selectIndex", selectIndex);
642 646
                    startActivity(intent);
643 647
                }
644 648
                break;
@ -1253,6 +1257,25 @@ public class ShareTwoActivity extends Activity implements View.OnClickListener,
1253 1257
        wei = sharedPreferencesUtil.getString("poi_wei", "");
1254 1258
        et_share_address.setText(address);
1255 1259
        costWay.setText(costway);
1260
1261
        for (int i=0;i<selectBitmap.length;i++) {
1262
            ImageItem imageItem = selectBitmap[i];
1263
            if (imageItem == null) {
1264
                takeImageCameraList.get(i).setVisibility(View.VISIBLE);
1265
                ImageView takeImageView = takeImageViewList.get(i);
1266
                takeImageView.setImageResource(Res.getDrawableID("add_picture_" + (i+1)));
1267
                takeImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
1268
1269
                ConstraintLayout.LayoutParams lp = (ConstraintLayout.LayoutParams) takeImageView.getLayoutParams();
1270
                lp.width = ViewGroup.LayoutParams.WRAP_CONTENT;
1271
                lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
1272
                takeImageView.setLayoutParams(lp);
1273
1274
            } else {
1275
                takeImageCameraList.get(i).setVisibility(View.GONE);
1276
            }
1277
        }
1278
1256 1279
    }
1257 1280
1258 1281

+ 46 - 0
app/src/main/java/com/electric/chargingpile/activity/ShareTwoPictureActivity.java

@ -0,0 +1,46 @@
1
package com.electric.chargingpile.activity;
2
3
import android.support.v7.app.AppCompatActivity;
4
import android.os.Bundle;
5
import android.view.View;
6
import android.widget.ImageView;
7
import android.widget.TextView;
8
9
import com.electric.chargingpile.R;
10
11
public class ShareTwoPictureActivity extends AppCompatActivity {
12
13
    private ImageView gallery_icon;
14
    private TextView gallery_del;
15
    private int selectIndex;
16
    private ImageView picture;
17
18
    @Override
19
    protected void onCreate(Bundle savedInstanceState) {
20
        super.onCreate(savedInstanceState);
21
        setContentView(R.layout.activity_share_two_picture);
22
        initView();
23
    }
24
25
    private void initView() {
26
        selectIndex = getIntent().getIntExtra("selectIndex", 0);
27
        picture = findViewById(R.id.picture);
28
29
        picture.setImageBitmap(ShareTwoActivity.selectBitmap[selectIndex].getBitmap());
30
        gallery_icon = findViewById(R.id.gallery_icon);
31
        gallery_icon.setOnClickListener(new View.OnClickListener() {
32
            @Override
33
            public void onClick(View v) {
34
                finish();
35
            }
36
        });
37
        gallery_del = findViewById(R.id.gallery_del);
38
        gallery_del.setOnClickListener(new View.OnClickListener() {
39
            @Override
40
            public void onClick(View v) {
41
                ShareTwoActivity.selectBitmap[selectIndex] = null;
42
                finish();
43
            }
44
        });
45
    }
46
}

+ 8 - 16
app/src/main/res/layout/activity_share_two.xml

@ -187,9 +187,8 @@
187 187

188 188
                        <ImageView
189 189
                            android:id="@+id/take_image_view_0"
190
                            android:layout_width="82dp"
191
                            android:layout_height="70dp"
192
                            android:scaleType="centerCrop"
190
                            android:layout_width="wrap_content"
191
                            android:layout_height="wrap_content"
193 192
                            android:src="@drawable/add_picture_1"
194 193
                            app:layout_constraintBottom_toBottomOf="parent"
195 194
                            app:layout_constraintLeft_toLeftOf="parent"
@ -202,7 +201,6 @@
202 201
                            android:layout_height="wrap_content"
203 202
                            android:layout_marginTop="5dp"
204 203
                            android:layout_marginRight="5dp"
205
                            android:scaleType="fitEnd"
206 204
                            android:src="@drawable/camera_icon"
207 205
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_0"
208 206
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_0" />
@ -220,9 +218,8 @@
220 218

221 219
                        <ImageView
222 220
                            android:id="@+id/take_image_view_1"
223
                            android:layout_width="82dp"
224
                            android:layout_height="70dp"
225
                            android:scaleType="centerCrop"
221
                            android:layout_width="wrap_content"
222
                            android:layout_height="wrap_content"
226 223
                            android:src="@drawable/add_picture_2"
227 224
                            app:layout_constraintBottom_toBottomOf="parent"
228 225
                            app:layout_constraintLeft_toLeftOf="parent"
@ -235,7 +232,6 @@
235 232
                            android:layout_height="wrap_content"
236 233
                            android:layout_marginTop="5dp"
237 234
                            android:layout_marginRight="5dp"
238
                            android:scaleType="fitEnd"
239 235
                            android:src="@drawable/camera_icon"
240 236
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_1"
241 237
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_1" />
@ -251,9 +247,8 @@
251 247

252 248
                        <ImageView
253 249
                            android:id="@+id/take_image_view_2"
254
                            android:layout_width="82dp"
255
                            android:layout_height="70dp"
256
                            android:scaleType="centerCrop"
250
                            android:layout_width="wrap_content"
251
                            android:layout_height="wrap_content"
257 252
                            android:src="@drawable/add_picture_3"
258 253
                            app:layout_constraintBottom_toBottomOf="parent"
259 254
                            app:layout_constraintLeft_toLeftOf="parent"
@ -266,7 +261,6 @@
266 261
                            android:layout_height="wrap_content"
267 262
                            android:layout_marginTop="5dp"
268 263
                            android:layout_marginRight="5dp"
269
                            android:scaleType="fitEnd"
270 264
                            android:src="@drawable/camera_icon"
271 265
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_2"
272 266
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_2" />
@ -282,9 +276,8 @@
282 276

283 277
                        <ImageView
284 278
                            android:id="@+id/take_image_view_3"
285
                            android:layout_width="82dp"
286
                            android:layout_height="70dp"
287
                            android:scaleType="centerCrop"
279
                            android:layout_width="wrap_content"
280
                            android:layout_height="wrap_content"
288 281
                            android:src="@drawable/add_picture_4"
289 282
                            app:layout_constraintBottom_toBottomOf="parent"
290 283
                            app:layout_constraintLeft_toLeftOf="parent"
@ -297,7 +290,6 @@
297 290
                            android:layout_height="wrap_content"
298 291
                            android:layout_marginTop="5dp"
299 292
                            android:layout_marginRight="5dp"
300
                            android:scaleType="fitEnd"
301 293
                            android:src="@drawable/camera_icon"
302 294
                            app:layout_constraintRight_toRightOf="@+id/take_image_view_3"
303 295
                            app:layout_constraintTop_toTopOf="@+id/take_image_view_3" />

+ 45 - 0
app/src/main/res/layout/activity_share_two_picture.xml

@ -0,0 +1,45 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    android:background="@color/activity_bgcolor"
8
    tools:context=".activity.ShareTwoPictureActivity">
9
10
    <android.support.constraint.ConstraintLayout
11
        android:id="@+id/nav_bar"
12
        android:layout_width="match_parent"
13
        android:layout_height="45dp"
14
        android:background="@color/white"
15
        app:layout_constraintLeft_toLeftOf="parent"
16
        app:layout_constraintRight_toRightOf="parent"
17
        app:layout_constraintTop_toTopOf="parent">
18
19
        <ImageView
20
            android:id="@+id/gallery_icon"
21
            android:layout_width="60dp"
22
            android:layout_height="match_parent"
23
            android:scaleType="center"
24
            android:src="@drawable/app_publish_close_icon"
25
            app:layout_constraintLeft_toLeftOf="parent" />
26
27
        <TextView
28
            android:id="@+id/gallery_del"
29
            android:layout_width="60dp"
30
            android:layout_height="match_parent"
31
            android:background="@drawable/plugin_camera_del_state"
32
            app:layout_constraintRight_toRightOf="parent" />
33
34
    </android.support.constraint.ConstraintLayout>
35
36
    <ImageView
37
        android:id="@+id/picture"
38
        android:layout_width="match_parent"
39
        android:layout_height="0dp"
40
        android:background="@color/orange"
41
        android:scaleType="centerCrop"
42
        app:layout_constraintBottom_toBottomOf="parent"
43
        app:layout_constraintTop_toBottomOf="@+id/nav_bar" />
44
45
</android.support.constraint.ConstraintLayout>

人民币符号bug修改 · 2382c03d8a - Gogs: Go Git Service
Browse Source

人民币符号bug修改

huyuguo 6 years ago
parent
commit
2382c03d8a
2 changed files with 3 additions and 3 deletions
  1. 2 2
      app/src/main/AndroidManifest.xml
  2. 1 1
      app/src/main/res/layout/activity_main_map.xml

+ 2 - 2
app/src/main/AndroidManifest.xml

@ -1,8 +1,8 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3
    package="com.electric.chargingpile"
4
    android:versionCode="77"
5
    android:versionName="3.3.3">
4
    android:versionCode="78"
5
    android:versionName="3.4">
6 6
    <!-- 极光 -->
7 7
    <permission
8 8
        android:name="${applicationId}.permission.JPUSH_MESSAGE"

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

@ -1130,7 +1130,7 @@
1130 1130
                    <TextView
1131 1131
                        android:layout_width="wrap_content"
1132 1132
                        android:layout_height="wrap_content"
1133
                        android:text=""
1133
                        android:text="¥"
1134 1134
                        android:textColor="#555557"
1135 1135
                        android:textSize="12dp" />
1136 1136