Explorar el Código

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

huyuguo %!s(int64=4) %!d(string=hace) años
padre
commit
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>