td>
    public interface OnReportParkingDialogFragmentListener {
139
        void report();
140
    }
141
142
    public void setOnReportParkingDialogFragmentListener(OnReportParkingDialogFragmentListener listener) {
143
        this.reportParkingDialogFragmentListener = listener;
144
    }
145
}

BIN
app/src/main/res/drawable-hdpi/detail_no_parking.png


BIN
app/src/main/res/drawable-hdpi/detail_parking.png


BIN
app/src/main/res/drawable-hdpi/detail_parking_alert_first.png


BIN
app/src/main/res/drawable-hdpi/detail_parking_alert_second.png


BIN
app/src/main/res/drawable-hdpi/detail_parking_alert_third.png


BIN
app/src/main/res/drawable-hdpi/detail_report_parking.png


BIN
app/src/main/res/drawable-mdpi/detail_no_parking.png


BIN
app/src/main/res/drawable-mdpi/detail_parking.png


BIN
app/src/main/res/drawable-mdpi/detail_parking_alert_first.png


BIN
app/src/main/res/drawable-mdpi/detail_parking_alert_second.png


BIN
app/src/main/res/drawable-mdpi/detail_parking_alert_third.png


BIN
app/src/main/res/drawable-mdpi/detail_report_parking.png


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


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


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


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


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


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


BIN
app/src/main/res/drawable-xxhdpi/detail_no_parking.png


BIN
app/src/main/res/drawable-xxhdpi/detail_parking.png


BIN
app/src/main/res/drawable-xxhdpi/detail_parking_alert_first.png


BIN
app/src/main/res/drawable-xxhdpi/detail_parking_alert_second.png


BIN
app/src/main/res/drawable-xxhdpi/detail_parking_alert_third.png


BIN
app/src/main/res/drawable-xxhdpi/detail_report_parking.png


BIN
app/src/main/res/drawable-xxxhdpi/detail_no_parking.png


BIN
app/src/main/res/drawable-xxxhdpi/detail_parking.png


BIN
app/src/main/res/drawable-xxxhdpi/detail_parking_alert_first.png


BIN
app/src/main/res/drawable-xxxhdpi/detail_parking_alert_second.png


BIN
app/src/main/res/drawable-xxxhdpi/detail_parking_alert_third.png


BIN
app/src/main/res/drawable-xxxhdpi/detail_report_parking.png


+ 0 - 36
app/src/main/res/layout/activity_new_zhan_details.xml

@ -352,42 +352,6 @@
352 352
            android:textAppearance="?android:attr/textAppearanceMedium"
353 353
            android:textColor="@color/white" />
354 354
355
356
        <!--<TextView-->
357
        <!--android:id="@+id/tv_chenggong"-->
358
        <!--android:layout_width="wrap_content"-->
359
        <!--android:layout_height="wrap_content"-->
360
        <!--android:paddingLeft="8dp"-->
361
        <!--android:paddingRight="8dp"-->
362
        <!--android:paddingBottom="4dp"-->
363
        <!--android:paddingTop="4dp"-->
364
        <!--android:text="成功"-->
365
        <!--android:textColor="@color/white"-->
366
        <!--android:background="@drawable/textview_bglv"-->
367
        <!--android:textSize="16sp"-->
368
        <!--android:layout_marginRight="16dp"-->
369
        <!--android:layout_alignTop="@+id/tv_shibai"-->
370
        <!--android:layout_toLeftOf="@+id/tv_shibai"-->
371
        <!--android:layout_toStartOf="@+id/tv_shibai" />-->
372
373
        <!--<TextView-->
374
        <!--android:id="@+id/tv_shibai"-->
375
        <!--android:layout_width="wrap_content"-->
376
        <!--android:layout_height="wrap_content"-->
377
        <!--android:paddingLeft="8dp"-->
378
        <!--android:paddingRight="8dp"-->
379
        <!--android:paddingBottom="4dp"-->
380
        <!--android:paddingTop="4dp"-->
381
        <!--android:text="失败"-->
382
        <!--android:textColor="@color/white"-->
383
        <!--android:background="@drawable/textview_bgju"-->
384
        <!--android:textSize="16sp"-->
385
        <!--android:layout_marginRight="16dp"-->
386
        <!--android:layout_centerVertical="true"-->
387
        <!--android:layout_alignParentRight="true"-->
388
        <!--android:layout_alignParentEnd="true" />-->
389
390 355
    </LinearLayout>
391 356
392
393 357
</LinearLayout>

+ 5 - 18
app/src/main/res/layout/fragmen_details_new.xml

@ -448,8 +448,8 @@
448 448
                        android:layout_width="0dp"
449 449
                        android:layout_height="wrap_content"
450 450
                        android:layout_weight="3"
451
                        tools:background="#00ff00"
452
                        android:orientation="vertical">
451
                        android:orientation="vertical"
452
                        tools:background="#00ff00">
453 453
454 454
                        <LinearLayout
455 455
                            android:layout_width="wrap_content"
@ -489,8 +489,8 @@
489 489
                        android:layout_width="0dp"
490 490
                        android:layout_height="match_parent"
491 491
                        android:layout_weight="2"
492
                        tools:background="#ff0000"
493
                        android:gravity="center_vertical|right">
492
                        android:gravity="center_vertical|right"
493
                        tools:background="#ff0000">
494 494
495 495
                        <TextView
496 496
                            android:layout_width="wrap_content"
@ -499,6 +499,7 @@
499 499
                            android:text="电价详情"
500 500
                            android:textColor="@color/color_222222"
501 501
                            android:textSize="14sp" />
502
502 503
                        <ImageView
503 504
                            android:layout_width="wrap_content"
504 505
                            android:layout_height="wrap_content"
@ -827,19 +828,5 @@
827 828
            </RelativeLayout>
828 829
829 830
        </LinearLayout>
830
831 831
    </com.electric.chargingpile.view.CustomScrollView>
832
833
    <ImageView
834
        android:id="@+id/parking_icon"
835
        android:layout_width="wrap_content"
836
        android:layout_height="wrap_content"
837
        android:layout_marginRight="15dp"
838
        android:layout_marginBottom="15dp"
839
        android:src="@drawable/detail_report_parking"
840
        android:visibility="gone"
841
        app:layout_constraintBottom_toBottomOf="parent"
842
        app:layout_constraintRight_toRightOf="parent"
843
        tools:visibility="visible" />
844
845 832
</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 224
app/src/main/res/layout/fragment_dialog_report_parking.xml

@ -1,224 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:id="@+id/container"
6
    android:layout_width="match_parent"
7
    android:layout_height="match_parent"
8
    android:background="#a0000000">
9
10
    <androidx.constraintlayout.widget.ConstraintLayout
11
        android:id="@+id/first"
12
        android:layout_width="310dp"
13
        android:layout_height="255dp"
14
        android:visibility="gone"
15
        app:layout_constraintBottom_toBottomOf="parent"
16
        app:layout_constraintLeft_toLeftOf="parent"
17
        app:layout_constraintRight_toRightOf="parent"
18
        app:layout_constraintTop_toTopOf="parent">
19
20
        <ImageView
21
            android:layout_width="match_parent"
22
            android:layout_height="match_parent"
23
            android:src="@drawable/detail_parking_alert_first" />
24
25
        <ImageView
26
            android:id="@+id/first_close"
27
            android:layout_width="wrap_content"
28
            android:layout_height="wrap_content"
29
            android:layout_marginTop="40dp"
30
            android:padding="10dp"
31
            android:src="@drawable/report_parking_close"
32
            app:layout_constraintRight_toRightOf="parent"
33
            app:layout_constraintTop_toTopOf="parent" />
34
35
        <TextView
36
            android:id="@+id/first_msg"
37
            android:layout_width="match_parent"
38
            android:layout_height="wrap_content"
39
            android:layout_marginLeft="28dp"
40
            android:layout_marginTop="90dp"
41
            android:layout_marginRight="28dp"
42
            android:text="对不起,请在该充电站100米范围内上报“有充电车位”信息"
43
            android:textColor="#222222"
44
            android:textSize="14sp"
45
            app:layout_constraintLeft_toLeftOf="parent"
46
            app:layout_constraintRight_toRightOf="parent"
47
            app:layout_constraintTop_toTopOf="parent" />
48
49
        <TextView
50
            android:layout_width="match_parent"
51
            android:layout_height="wrap_content"
52
            android:layout_marginLeft="28dp"
53
            android:layout_marginTop="10dp"
54
            android:layout_marginRight="28dp"
55
            android:text="非常感谢,您的信息可以帮助到更多的充电用户"
56
            android:textColor="#bcbcbc"
57
            android:textSize="14sp"
58
            app:layout_constraintLeft_toLeftOf="parent"
59
            app:layout_constraintRight_toRightOf="parent"
60
            app:layout_constraintTop_toBottomOf="@+id/first_msg" />
61
62
        <TextView
63
            android:layout_width="match_parent"
64
            android:layout_height="wrap_content"
65
            android:layout_marginBottom="10dp"
66
            android:text="有任何疑问可以联系充电桩客服微信\nchongdianzhuang2"
67
            android:textAlignment="center"
68
            android:textColor="#a7a7a7"
69
            android:textSize="12sp"
70
            app:layout_constraintBottom_toBottomOf="parent"
71
            app:layout_constraintLeft_toLeftOf="parent"
72
            app:layout_constraintRight_toRightOf="parent" />
73
74
    </androidx.constraintlayout.widget.ConstraintLayout>
75
76
    <androidx.constraintlayout.widget.ConstraintLayout
77
        android:id="@+id/second"
78
        android:layout_width="310dp"
79
        android:layout_height="320dp"
80
        android:visibility="gone"
81
        app:layout_constraintBottom_toBottomOf="parent"
82
        app:layout_constraintLeft_toLeftOf="parent"
83
        app:layout_constraintRight_toRightOf="parent"
84
        app:layout_constraintTop_toTopOf="parent">
85
86
        <ImageView
87
            android:layout_width="match_parent"
88
            android:layout_height="match_parent"
89
            android:src="@drawable/detail_parking_alert_second" />
90
91
        <ImageView
92
            android:id="@+id/second_close"
93
            android:layout_width="wrap_content"
94
            android:layout_height="wrap_content"
95
            android:layout_marginTop="40dp"
96
            android:padding="10dp"
97
            android:src="@drawable/report_parking_close"
98
            app:layout_constraintRight_toRightOf="parent"
99
            app:layout_constraintTop_toTopOf="parent" />
100
101
        <TextView
102
            android:id="@+id/second_msg"
103
            android:layout_width="match_parent"
104
            android:layout_height="wrap_content"
105
            android:layout_marginLeft="28dp"
106
            android:layout_marginTop="90dp"
107
            android:layout_marginRight="28dp"
108
            android:text="您上报的“有充电车位”信息,可以作为其他用户到此充电的重要参考依据,务必真实上报"
109
            android:textColor="#222222"
110
            android:textSize="14sp"
111
            app:layout_constraintLeft_toLeftOf="parent"
112
            app:layout_constraintRight_toRightOf="parent"
113
            app:layout_constraintTop_toTopOf="parent" />
114
115
        <TextView
116
            android:id="@+id/second_desc"
117
            android:layout_width="match_parent"
118
            android:layout_height="wrap_content"
119
            android:layout_marginLeft="28dp"
120
            android:layout_marginTop="10dp"
121
            android:layout_marginRight="28dp"
122
            android:text="非常感谢,您的信息可以帮助到更多的充电用户"
123
            android:textColor="#bcbcbc"
124
            android:textSize="14sp"
125
            app:layout_constraintLeft_toLeftOf="parent"
126
            app:layout_constraintRight_toRightOf="parent"
127
            app:layout_constraintTop_toBottomOf="@+id/second_msg" />
128
129
        <LinearLayout
130
            android:layout_width="match_parent"
131
            android:layout_height="35dp"
132
            android:layout_marginTop="20dp"
133
            android:gravity="center"
134
            app:layout_constraintTop_toBottomOf="@+id/second_desc">
135
136
            <Button
137
                android:id="@+id/cancel_report"
138
                android:layout_width="100dp"
139
                android:layout_height="match_parent"
140
                android:background="@drawable/cancel_report_parking_shap"
141
                android:text="取消上报"
142
                android:textColor="#999999"
143
                android:textSize="13sp" />
144
145
            <Button
146
                android:id="@+id/report"
147
                android:layout_width="100dp"
148
                android:layout_height="match_parent"
149
                android:layout_marginLeft="10dp"
150
                android:background="@drawable/report_parking_shape"
151
                android:text="上报空停车位"
152
                android:textColor="#ffffff"
153
                android:textSize="13sp" />
154
155
        </LinearLayout>
156
157
158
        <TextView
159
            android:layout_width="match_parent"
160
            android:layout_height="wrap_content"
161
            android:layout_marginBottom="10dp"
162
            android:text="有任何疑问可以联系充电桩客服微信\nchongdianzhuang2"
163
            android:textAlignment="center"
164
            android:textColor="#a7a7a7"
165
            android:textSize="12sp"
166
            app:layout_constraintBottom_toBottomOf="parent"
167
            app:layout_constraintLeft_toLeftOf="parent"
168
            app:layout_constraintRight_toRightOf="parent" />
169
170
    </androidx.constraintlayout.widget.ConstraintLayout>
171
172
    <androidx.constraintlayout.widget.ConstraintLayout
173
        android:id="@+id/third"
174
        android:layout_width="310dp"
175
        android:layout_height="200dp"
176
        app:layout_constraintBottom_toBottomOf="parent"
177
        app:layout_constraintLeft_toLeftOf="parent"
178
        app:layout_constraintRight_toRightOf="parent"
179
        app:layout_constraintTop_toTopOf="parent">
180
181
        <ImageView
182
            android:layout_width="match_parent"
183
            android:layout_height="match_parent"
184
            android:src="@drawable/detail_parking_alert_third" />
185
186
        <ImageView
187
            android:id="@+id/third_close"
188
            android:layout_width="wrap_content"
189
            android:layout_height="wrap_content"
190
            android:layout_marginTop="40dp"
191
            android:padding="10dp"
192
            android:src="@drawable/report_parking_close"
193
            app:layout_constraintRight_toRightOf="parent"
194
            app:layout_constraintTop_toTopOf="parent" />
195
196
        <TextView
197
            android:id="@+id/third_msg"
198
            android:layout_width="match_parent"
199
            android:layout_height="wrap_content"
200
            android:layout_marginLeft="28dp"
201
            android:layout_marginTop="90dp"
202
            android:layout_marginRight="28dp"
203
            android:text="该充电站目前没有充电车位"
204
            android:textColor="#222222"
205
            android:textSize="14sp"
206
            app:layout_constraintLeft_toLeftOf="parent"
207
            app:layout_constraintRight_toRightOf="parent"
208
            app:layout_constraintTop_toTopOf="parent" />
209
210
        <TextView
211
            android:layout_width="match_parent"
212
            android:layout_height="wrap_content"
213
            android:layout_marginBottom="10dp"
214
            android:text="有任何疑问可以联系充电桩客服微信\nchongdianzhuang2"
215
            android:textAlignment="center"
216
            android:textColor="#a7a7a7"
217
            android:textSize="12sp"
218
            app:layout_constraintBottom_toBottomOf="parent"
219
            app:layout_constraintLeft_toLeftOf="parent"
220
            app:layout_constraintRight_toRightOf="parent" />
221
222
    </androidx.constraintlayout.widget.ConstraintLayout>
223
224
</androidx.constraintlayout.widget.ConstraintLayout>

发布视频代码优化 · 277acf8a80 - Gogs: Go Git Service
Browse Source

发布视频代码优化

huyuguo 7 years ago
parent
commit
277acf8a80

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

@ -992,7 +992,7 @@
992 992
            android:screenOrientation="portrait"
993 993
            android:windowSoftInputMode="adjustPan" />
994 994
        <activity
995
            android:name=".activity.PublishTopicActivity"
995
            android:name=".activity.PublishVideoTopicActivity"
996 996
            android:screenOrientation="portrait"
997 997
            android:windowSoftInputMode="stateVisible|adjustResize" />
998 998
        <activity

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

@ -88,7 +88,7 @@ public class PublishItemsActivity extends AppCompatActivity implements View.OnCl
88 88
                break;
89 89
            case R.id.publish_video: // 视频
90 90
                if (checkPublishRadio()) {
91
                    intent.setClass(this, PublishTopicActivity.class);
91
                    intent.setClass(this, PublishVideoTopicActivity.class);
92 92
                    startActivity(intent);
93 93
                }
94 94
                break;

+ 35 - 5
app/src/main/java/com/electric/chargingpile/activity/PublishPicTopicActivity.java

@ -61,6 +61,7 @@ import com.electric.chargingpile.manager.ProfileManager;
61 61
import com.electric.chargingpile.util.BarColorUtil;
62 62
import com.electric.chargingpile.util.Bimp;
63 63
import com.electric.chargingpile.util.CommonParams;
64
import com.electric.chargingpile.util.DensityUtil;
64 65
import com.electric.chargingpile.util.ImageItem;
65 66
import com.electric.chargingpile.util.JsonUtils;
66 67
import com.electric.chargingpile.util.LoadingDialog;
@ -68,6 +69,7 @@ import com.electric.chargingpile.util.PublicWay;
68 69
import com.electric.chargingpile.util.Res;
69 70
import com.electric.chargingpile.util.SystemTypeUtil;
70 71
import com.electric.chargingpile.util.ToastUtil;
72
import com.luck.picture.lib.tools.ScreenUtils;
71 73
import com.umeng.analytics.MobclickAgent;
72 74
import com.upyun.library.common.ParallelUploader;
73 75
import com.upyun.library.common.UploadEngine;
@ -130,6 +132,8 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
130 132
    LoadingDialog dialog;
131 133
    private ProgressDialog insertDialog;
132 134
    private static final int RC_ALBUM_PERM = 123;
135
    private int screenWidth;
136
    private int itemWidth;
133 137
134 138
135 139
    private TextView publishtopic_choose_topic, mPublishtopicChooseTopic, publishtopic_word_num;
@ -149,6 +153,7 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
149 153
        super.onCreate(savedInstanceState);
150 154
        setContentView(R.layout.activity_publish_picture_content);
151 155
        BarColorUtil.initStatusBarColor(PublishPicTopicActivity.this);
156
152 157
        initView();
153 158
        Res.init(this);
154 159
        PublicWay.activityList.add(this);
@ -180,6 +185,9 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
180 185
    }
181 186
182 187
    private void initView() {
188
        screenWidth = ScreenUtils.getScreenWidth(this);
189
        itemWidth = (int) ((screenWidth - DensityUtil.dip2px(this, 15 * 2 + 10 * 2)) / 3f);
190
183 191
        uploadDialog = new ProgressDialog(this);
184 192
        uploadDialog.setMessage("正在提交...");
185 193
        uploadDialog.setCanceledOnTouchOutside(false);
@ -629,39 +637,61 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
629 637
            return selectedPosition;
630 638
        }
631 639
632
        public View getView(int position, View convertView, ViewGroup parent) {
640
        public View getView(final int position, View convertView, ViewGroup parent) {
633 641
            GridAdapter.ViewHolder holder = null;
634 642
            if (convertView == null) {
635
                convertView = inflater.inflate(R.layout.item_feedback_gridview,
643
                convertView = inflater.inflate(R.layout.item_publish_picture,
636 644
                        parent, false);
637 645
                holder = new GridAdapter.ViewHolder();
638 646
                holder.image = (ImageView) convertView
639
                        .findViewById(R.id.item_grida_image);
647
                        .findViewById(R.id.item_publish_image);
648
                holder.imageDelete = convertView.findViewById(R.id.item_publish_image_delete);
640 649
                convertView.setTag(holder);
641 650
            } else {
642 651
                holder = (GridAdapter.ViewHolder) convertView.getTag();
643 652
            }
644 653
654
655
            RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) holder.image.getLayoutParams();
656
            params.width = itemWidth;
657
            params.height = itemWidth;
658
            if (position % 3 != 0) {
659
                params.leftMargin = DensityUtil.dip2px(getApplicationContext(), 10);
660
            }
661
            holder.image.setLayoutParams(params);
662
645 663
            if (position == Bimp.tempSelectBitmap.size()) {
664
                holder.imageDelete.setVisibility(View.GONE);
646 665
                holder.image.setImageResource(R.drawable.add_picture);
647 666
                holder.image.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
648 667
                holder.image.setBackgroundColor(Color.parseColor("#f5f5f5"));
649
//                holder.image.setImageBitmap(BitmapFactory.decodeResource(
650
//                        getResources(), R.drawable.icon_feedback_upload));
651 668
                if (position == 9) {
652 669
                    holder.image.setVisibility(View.GONE);
653 670
                }
654 671
            } else {
672
                holder.imageDelete.setVisibility(View.VISIBLE);
655 673
                holder.image.setImageBitmap(Bimp.tempSelectBitmap.get(position).getBitmap());
656 674
                holder.image.setScaleType(ImageView.ScaleType.CENTER_CROP);
657 675
                holder.image.setBackgroundColor(Color.WHITE);
658 676
            }
659 677
678
            holder.imageDelete.setOnClickListener(new OnClickListener() {
679
                @Override
680
                public void onClick(View view) {
681
                    Bimp.tempSelectBitmap.remove(position);
682
                    Bimp.max--;
683
                    Message message = new Message();
684
                    message.what = 1;
685
                    handler.sendMessage(message);
686
                }
687
            });
688
660 689
            return convertView;
661 690
        }
662 691
663 692
        public class ViewHolder {
664 693
            public ImageView image;
694
            public ImageView imageDelete;
665 695
        }
666 696
667 697
        Handler handler = new Handler() {

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

@ -56,7 +56,7 @@ import java.util.Map;
56 56
57 57
import okhttp3.Call;
58 58
59
public class PublishTopicActivity extends Activity implements OnClickListener {
59
public class PublishVideoTopicActivity extends Activity implements OnClickListener {
60 60
    Context mContext;
61 61
    private ImageView mPublishtopicBack;
62 62
    private TextView mPublishtopicPublish;
@ -86,7 +86,7 @@ public class PublishTopicActivity extends Activity implements OnClickListener {
86 86
        mContext = this;
87 87
        loadingDialog = new LoadingDialog(this);
88 88
        loadingDialog.setCanceledOnTouchOutside(false);
89
        BarColorUtil.initStatusBarColor(PublishTopicActivity.this);
89
        BarColorUtil.initStatusBarColor(PublishVideoTopicActivity.this);
90 90
        initView();
91 91
    }
92 92
@ -418,7 +418,7 @@ public class PublishTopicActivity extends Activity implements OnClickListener {
418 418
    }
419 419
420 420
    private void showDialogToExit() {
421
        AlertDialog.Builder builder = new AlertDialog.Builder(PublishTopicActivity.this);
421
        AlertDialog.Builder builder = new AlertDialog.Builder(PublishVideoTopicActivity.this);
422 422
        builder.setTitle("提示");
423 423
        builder.setMessage("是否离开发布页?");
424 424
        builder.setCancelable(false);

+ 3 - 5
app/src/main/java/com/electric/chargingpile/fragment/ChatRecommendFragment.java

@ -172,12 +172,11 @@ public class ChatRecommendFragment extends Fragment implements View.OnClickListe
172 172
    private void loginSign() {
173 173
        String url = MainApplication.urlNew + "/topic/sign.do";
174 174
        final Map<String, String> map = new HashMap<>();
175
        map.put("fileNames", "xxx");
175
        map.put("fileNames", "android");
176 176
        map.put("targetType", ChatRecommendBean.TARGET_TYPE_IMAGE_TEXT + "");
177
        map.put("appToken", ProfileManager.getInstance().getKeyMessageToken(getContext()));
178 177
        CommonParams.addCommonParams(map);
179
        Log.d(TAG, "loginSign: " + map);
180 178
        loadingDialog.show();
179
181 180
        OkHttpUtils.post().params(map).url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
182 181
            @Override
183 182
            public void onError(Call call, Exception e) {
@ -196,7 +195,7 @@ public class ChatRecommendFragment extends Fragment implements View.OnClickListe
196 195
                    startActivity(new Intent(getActivity(), PublishItemsActivity.class));
197 196
                } else if ("8010".equals(code)) {
198 197
                    startActivity(new Intent(getContext(), LoginActivity.class));
199
                    ToastUtil.showToast(getContext(), desc + map, Toast.LENGTH_LONG);
198
                    ToastUtil.showToast(getContext(), desc, Toast.LENGTH_LONG);
200 199
                } else  {
201 200
                    ToastUtil.showToast(getContext(), desc, Toast.LENGTH_SHORT);
202 201
                }
@ -219,7 +218,6 @@ public class ChatRecommendFragment extends Fragment implements View.OnClickListe
219 218
        Map<String, String> map = new HashMap<>();
220 219
        map.put("selected", "1");
221 220
        CommonParams.addCommonParams(map);
222
        Log.d(TAG, "requestHeaderData: " + map);
223 221
224 222
        OkHttpUtils.get().params(map).url(url).build().connTimeOut(6000).readTimeOut(6000).execute(new StringCallback() {
225 223
            @Override

+ 2 - 1
app/src/main/java/com/electric/chargingpile/util/CommonParams.java

@ -14,11 +14,12 @@ public class CommonParams {
14 14
    public static void addCommonParams(Map<String, String> map) {
15 15
        if (MainApplication.isLogin()) {
16 16
            map.put("userId", MainApplication.userId);
17
            // map.put("appToken", ProfileManager.getInstance().getKeyMessageToken(getContext()));
18
            map.put("appToken", ProfileManager.getInstance().getKeyMessageToken(MainApplication.context));
17 19
        }
18 20
19 21
        map.put("deviceOs", "android");
20 22
        map.put("appVer", BuildConfig.VERSION_NAME);
21
//        map.put("appToken", "");
22 23
        map.put("deviceOsVer", Build.VERSION.RELEASE);
23 24
        map.put("deviceId", JPushInterface.getUdid(MainApplication.context));
24 25
//            map.put("tpToken", "");

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

@ -98,7 +98,7 @@
98 98
        android:layout_marginBottom="50dp"
99 99
        android:numColumns="3"
100 100
        android:scrollbars="none"
101
        android:verticalSpacing="5dp"></GridView>
101
        android:verticalSpacing="10dp"></GridView>
102 102

103 103
    <View
104 104
        android:layout_width="match_parent"

+ 0 - 1
app/src/main/res/layout/item_feedback_gridview.xml

@ -8,7 +8,6 @@
8 8
        android:id="@+id/item_grida_image"
9 9
        android:layout_width="81dp"
10 10
        android:layout_height="81dp"
11
        android:background="#ff0000"
12 11
        android:scaleType="centerCrop">
13 12
    </ImageView>
14 13

+ 21 - 0
app/src/main/res/layout/item_publish_picture.xml

@ -0,0 +1,21 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    android:layout_width="wrap_content"
4
    android:layout_height="wrap_content"
5
    android:background="@color/white">
6
7
    <ImageView
8
        android:id="@+id/item_publish_image"
9
        android:layout_width="81dp"
10
        android:layout_height="81dp"
11
        android:scaleType="centerCrop"></ImageView>
12
13
    <ImageView
14
        android:id="@+id/item_publish_image_delete"
15
        android:layout_width="30dp"
16
        android:layout_height="30dp"
17
        android:layout_alignEnd="@+id/item_publish_image"
18
        android:padding="5dp"
19
        android:src="@drawable/delete_picture" />
20
21
</RelativeLayout>