替换TrafficPanel背景图
This commit is contained in:
@@ -17,10 +17,10 @@ import retrofit2.http.POST;
|
||||
*/
|
||||
public interface DelayCheckApiServices {
|
||||
|
||||
@GET("/")
|
||||
@GET("/yycp-test-service/net/delay/heartbeat")
|
||||
Observable<BaseData> emptyInterface();
|
||||
|
||||
@POST("/")
|
||||
@POST("/yycp-test-service/net/delay/log")
|
||||
@FormUrlEncoded
|
||||
Observable<BaseData> uploadDelayCheckData(@FieldMap Map<String, String> params);
|
||||
Observable<BaseData> uploadDelayCheckData(@FieldMap Map<String, Object> params);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import android.os.SystemClock;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.commons.network.Utils;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.net.DelayCheckApiServices;
|
||||
import com.mogo.module.extensions.net.DztHttpConstant;
|
||||
@@ -47,7 +49,7 @@ public class DelayCheckUtil implements Handler.Callback {
|
||||
handler.sendEmptyMessageDelayed(MSG_CHECK_NET_CONNECT_STATUS, FIRST_CHECK_NET_CONNECT_STATUS_DELAY);
|
||||
}
|
||||
|
||||
private long requestTime, netDelay;
|
||||
private long requestTime, netDelay, requestSystemTime;
|
||||
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
@@ -70,6 +72,7 @@ public class DelayCheckUtil implements Handler.Callback {
|
||||
|
||||
private void startEmptyRequest() {
|
||||
requestTime = SystemClock.elapsedRealtime();
|
||||
requestSystemTime = System.currentTimeMillis();
|
||||
MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(DelayCheckApiServices.class, DztHttpConstant.getBaseUrl())
|
||||
.emptyInterface().subscribeOn(Schedulers.io()).observeOn(Schedulers.io())
|
||||
@@ -78,7 +81,6 @@ public class DelayCheckUtil implements Handler.Callback {
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
netDelay = SystemClock.elapsedRealtime() - requestTime;
|
||||
|
||||
startUpload();
|
||||
|
||||
}
|
||||
@@ -97,8 +99,22 @@ public class DelayCheckUtil implements Handler.Callback {
|
||||
});
|
||||
}
|
||||
|
||||
private void startUpload(){
|
||||
Map<String, String> params = new HashMap<>();
|
||||
private void startUpload() {
|
||||
MogoLocation lastLocation = MogoApisHandler.getInstance().getApis().getMapServiceApi().getSingletonLocationClient(context).getLastKnowLocation();
|
||||
if (lastLocation == null) {
|
||||
handler.sendEmptyMessageDelayed(MSG_START_DELAY_CHECK, DELAY_CHECK_DELAY);
|
||||
return;
|
||||
}
|
||||
Map<String, Object> params = new HashMap<>(8);
|
||||
params.put("sn", Utils.getSn());
|
||||
params.put("startTime", requestSystemTime);
|
||||
params.put("endTime", System.currentTimeMillis());
|
||||
params.put("netState", NetworkUtils.netStrengthLevel);
|
||||
params.put("place", lastLocation.getAddress());
|
||||
params.put("cityCode", lastLocation.getCityCode());
|
||||
params.put("lat", lastLocation.getLatitude());
|
||||
params.put("lon", lastLocation.getLongitude());
|
||||
|
||||
MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(DelayCheckApiServices.class, DztHttpConstant.getBaseUrl())
|
||||
.uploadDelayCheckData(params).observeOn(Schedulers.io()).subscribeOn(Schedulers.io())
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
@@ -10,26 +10,17 @@
|
||||
android:layout_height="@dimen/module_ext_navi_in_vr_height"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/module_ext_navi_in_vr_margin_top"
|
||||
android:layout_marginStart="@dimen/module_ext_navi_in_vr_margin_start"
|
||||
android:background="@drawable/module_ext_navi_in_vr_bg" />
|
||||
android:background="@drawable/module_ext_traffic_panel_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/module_ext_id_navi_in_vr_speed_bg"
|
||||
android:layout_width="@dimen/module_ext_navi_in_vr_speed_bg_width"
|
||||
android:layout_height="@dimen/module_ext_navi_in_vr_speed_bg_height"
|
||||
android:background="@drawable/module_ext_navi_in_vr_speed_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/module_ext_id_navi_in_vr_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_ext_id_navi_in_vr_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/module_ext_id_navi_in_vr_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/module_ext_id_navi_in_vr_bg" />
|
||||
|
||||
<!-- android:layout_marginTop="@dimen/module_ext_navi_in_vr_margin_top"-->
|
||||
<!-- android:layout_marginStart="@dimen/module_ext_navi_in_vr_margin_start"-->
|
||||
|
||||
<View
|
||||
android:id="@+id/module_ext_id_navi_in_vr_traffic_bg"
|
||||
android:layout_width="@dimen/module_ext_navi_in_vr_speed_bg_width"
|
||||
android:layout_height="@dimen/module_ext_navi_in_vr_traffic_bg_height"
|
||||
android:layout_marginBottom="@dimen/module_ext_navi_in_vr_traffic_bg_margin_bottom"
|
||||
android:background="@drawable/module_ext_navi_in_vr_traffic_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/module_ext_id_navi_in_vr_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_ext_id_navi_in_vr_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/module_ext_id_navi_in_vr_bg" />
|
||||
@@ -64,7 +55,7 @@
|
||||
android:layout_height="@dimen/module_ext_navi_in_vr_navi_icon_size"
|
||||
android:src="@drawable/tc_11"
|
||||
app:layout_constraintBottom_toTopOf="@id/module_ext_id_navi_in_vr_traffic_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_ext_id_navi_in_vr_bg"
|
||||
app:layout_constraintLeft_toLeftOf="@id/module_ext_id_navi_in_vr_traffic_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/module_ext_id_navi_in_vr_bg" />
|
||||
|
||||
<TextView
|
||||
@@ -109,6 +100,7 @@
|
||||
android:textColor="#FF9CA8D8"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/module_ext_navi_in_vr_limit_speed_text_size"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintBottom_toTopOf="@id/module_ext_id_navi_in_vr_traffic_bg"
|
||||
app:layout_constraintRight_toRightOf="@id/module_ext_id_navi_in_vr_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/module_ext_id_navi_in_vr_bg" />
|
||||
@@ -156,13 +148,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="module_ext_id_tv_speed,module_ext_id_tv_speed_unit"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/module_ext_id_group_navi_in_vr_nav_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:constraint_referenced_ids="module_map_id_navi_next_info_road_turn_icon_in_vr_mode,module_map_id_navi_next_info_distance_in_vr_mode,module_map_id_navi_next_info_distance_unit_in_vr_mode,module_map_id_navi_next_info_road_in_vr_mode" />
|
||||
|
||||
<!-- 除了上面两个group以外的其他view的group,方便整体控制显示隐藏,不包含limitSpeed,需要单独控制它的显示隐藏 -->
|
||||
@@ -171,7 +164,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
app:constraint_referenced_ids="module_ext_id_navi_in_vr_bg,module_ext_id_navi_in_vr_speed_bg,module_ext_id_navi_in_vr_traffic_bg,module_ext_id_traffic_light_turn_left,module_ext_id_traffic_light_turn_around,module_ext_id_traffic_light_straight,module_ext_id_traffic_light_turn_right"
|
||||
app:constraint_referenced_ids="module_ext_id_navi_in_vr_bg,module_ext_id_navi_in_vr_traffic_bg,module_ext_id_traffic_light_turn_left,module_ext_id_traffic_light_turn_around,module_ext_id_traffic_light_straight,module_ext_id_traffic_light_turn_right"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
|
||||
@@ -212,8 +212,8 @@
|
||||
<dimen name="module_ext_vr_mode_self_speed_margin_bottom">86px</dimen>
|
||||
|
||||
<!-- 仅在vr模式下有此内容,仅增加了xhdpi对应的大小 -->
|
||||
<dimen name="module_ext_navi_in_vr_width">464px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_height">304px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_width">530px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_height">380px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_margin_start">40px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_margin_top">28px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_navi_icon_size">100px</dimen>
|
||||
@@ -223,14 +223,14 @@
|
||||
<dimen name="module_ext_navi_in_vr_speed_bg_width">458px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_bg_height">298px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_bg_height">140px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_bg_margin_bottom">3px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_traffic_bg_margin_bottom">60px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_text_size">100px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_unit_size">30px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_unit_margin_start">30px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_margin_start">36px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_margin_start">70px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_speed_margin_top">22px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_size">78px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_margin_end">26px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_margin_end">66px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_margin_top">43px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_limit_speed_text_size">40px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_bg_corner">20px</dimen>
|
||||
|
||||
Reference in New Issue
Block a user