Merge remote-tracking branch 'origin/dev_merge_shunyi_vr_map' into dev_merge_shunyi_vr_map
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package="com.mogo.launcher">
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
||||
|
||||
<application
|
||||
android:name=".MogoApplication"
|
||||
|
||||
@@ -3,6 +3,10 @@ package com.mogo.utils;
|
||||
import android.content.Context;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.telephony.PhoneStateListener;
|
||||
import android.telephony.SignalStrength;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -107,4 +111,17 @@ public class NetworkUtils {
|
||||
return matcher.matches();
|
||||
}
|
||||
|
||||
public static int netStrengthLevel = 0;
|
||||
|
||||
public static void listenNetStrength(Context context) {
|
||||
TelephonyManager manager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
manager.listen(new PhoneStateListener() {
|
||||
@Override
|
||||
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
|
||||
super.onSignalStrengthsChanged(signalStrength);
|
||||
netStrengthLevel = signalStrength.getLevel();
|
||||
}
|
||||
}, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.mogo.module.common.animation;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.module.common.R;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BezierAnimationView extends RelativeLayout implements View.OnClickListener {
|
||||
private String TAG = "BezierAnimationView";
|
||||
private Context context;
|
||||
private int[] animation_drawable = {
|
||||
R.drawable.icon_common_heart_animation_vr00,
|
||||
R.drawable.icon_heart_unchoose_other,
|
||||
R.drawable.icon_map_marker_living};
|
||||
private Random random = new Random();
|
||||
private int width = 500, height = 210;
|
||||
private int drawableWidth, drawableHeight;
|
||||
|
||||
public BezierAnimationView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public BezierAnimationView(Context context, AttributeSet attributes) {
|
||||
this(context, attributes, 0);
|
||||
}
|
||||
|
||||
public BezierAnimationView(Context context, AttributeSet attributes, int defStyleAttr) {
|
||||
super(context, attributes, defStyleAttr);
|
||||
this.context = context;
|
||||
//3、设置点击事件
|
||||
setOnClickListener(this);
|
||||
//4、获取点赞图片的宽高
|
||||
Drawable drawable = ContextCompat.getDrawable(context, R.drawable.icon_common_heart_animation_vr02);
|
||||
drawableWidth = drawable.getIntrinsicWidth();
|
||||
drawableHeight = drawable.getIntrinsicHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Log.d("执行点赞动画", "ppp");
|
||||
bezierAnimation();
|
||||
}
|
||||
|
||||
private void bezierAnimation() {
|
||||
final ImageView imageView = new ImageView(context);
|
||||
imageView.setBackgroundResource(animation_drawable[random.nextInt(animation_drawable.length - 1)]);
|
||||
RelativeLayout.LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params.addRule(ALIGN_BOTTOM);
|
||||
params.addRule(CENTER_HORIZONTAL);
|
||||
imageView.setLayoutParams(params);
|
||||
addView(imageView);
|
||||
|
||||
/*
|
||||
* 开始执行点赞效果
|
||||
* */
|
||||
AnimatorSet animatorSet = getAnimatorSet(imageView);
|
||||
animatorSet.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
//3、动画执行后移除View
|
||||
removeView(imageView);
|
||||
}
|
||||
});
|
||||
animatorSet.start();
|
||||
}
|
||||
|
||||
private AnimatorSet getAnimatorSet(ImageView imageView) {
|
||||
AnimatorSet enter = new AnimatorSet();
|
||||
/*
|
||||
* 缩放动画
|
||||
* */
|
||||
AnimatorSet scaleAnimator = new AnimatorSet();
|
||||
ObjectAnimator alpha = ObjectAnimator.ofFloat(imageView, "alpha", 0.8f, 1f);
|
||||
ObjectAnimator scaleX = ObjectAnimator.ofFloat(imageView, "scaleX", 0.8f, 1f);
|
||||
ObjectAnimator scaleY = ObjectAnimator.ofFloat(imageView, "scaleY", 0.8f, 1f);
|
||||
scaleAnimator.setDuration(500);
|
||||
scaleAnimator.playTogether(alpha, scaleX, scaleY);
|
||||
|
||||
/*
|
||||
* 贝塞尔动画
|
||||
* */
|
||||
ValueAnimator bezierAnimator = getBezierValueAnimator(imageView);
|
||||
/*
|
||||
* 两个动画按顺序播放
|
||||
* */
|
||||
enter.playSequentially(scaleAnimator, bezierAnimator);
|
||||
return enter;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取贝塞尔曲线动画
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
*/
|
||||
private ValueAnimator getBezierValueAnimator(View target) {
|
||||
|
||||
//初始化一个BezierEvaluator
|
||||
BezierEvaluator evaluator = new BezierEvaluator(getPointF(1), getPointF(1));
|
||||
|
||||
// 起点固定,终点随机
|
||||
ValueAnimator animator = ValueAnimator.ofObject(evaluator, new PointF((width - 40) / 2, height - 80),
|
||||
new PointF(random.nextInt(getWidth()), 0));
|
||||
animator.addUpdateListener(new BezierListener(target));
|
||||
animator.setTarget(target);
|
||||
animator.setDuration(3000);
|
||||
return animator;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一条路径的两个控制点
|
||||
*
|
||||
* @param scale
|
||||
*/
|
||||
private PointF getPointF(int scale) {
|
||||
|
||||
PointF pointF = new PointF();
|
||||
//减去100 是为了控制 x轴活动范围
|
||||
pointF.x = random.nextInt((width));
|
||||
//再Y轴上 为了确保第二个控制点 在第一个点之上,我把Y分成了上下两半
|
||||
pointF.y = random.nextInt((height)) / scale;
|
||||
return pointF;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.mogo.module.common.animation;
|
||||
|
||||
import android.animation.TypeEvaluator;
|
||||
import android.graphics.PointF;
|
||||
|
||||
/**
|
||||
* 贝塞尔曲线估值器:计算动画的执行轨迹
|
||||
*
|
||||
* @params 传入贝塞尔曲线需要的四个点
|
||||
* @return 通过计算返回贝塞尔曲线的坐标
|
||||
*/
|
||||
public class BezierEvaluator implements TypeEvaluator<PointF> {
|
||||
|
||||
private PointF pointF1;
|
||||
private PointF pointF2;
|
||||
|
||||
public BezierEvaluator(PointF point1, PointF point2) {
|
||||
this.pointF1 = point1;
|
||||
this.pointF2 = point2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PointF evaluate(float time, PointF startValue, PointF endValue) {
|
||||
float timeLeft = 1.0f - time;
|
||||
|
||||
//结果
|
||||
PointF point = new PointF();
|
||||
|
||||
PointF point0 = (PointF)startValue;//起点
|
||||
PointF point3 = (PointF)endValue;//终点
|
||||
|
||||
// 贝塞尔公式
|
||||
point.x = timeLeft * timeLeft * timeLeft * (point0.x)
|
||||
+ 3 * timeLeft * timeLeft * time * (pointF1.x)
|
||||
+ 3 * timeLeft * time * time * (pointF2.x)
|
||||
+ time * time * time * (point3.x);
|
||||
|
||||
point.y = timeLeft * timeLeft * timeLeft * (point0.y)
|
||||
+ 3 * timeLeft * timeLeft * time * (pointF1.y)
|
||||
+ 3 * timeLeft * time * time * (pointF2.y)
|
||||
+ time * time * time * (point3.y);
|
||||
|
||||
return point;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mogo.module.common.animation;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.graphics.PointF;
|
||||
import android.view.View;
|
||||
|
||||
public class BezierListener implements ValueAnimator.AnimatorUpdateListener {
|
||||
|
||||
private View target;
|
||||
|
||||
public BezierListener(View target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
//这里获取到贝塞尔曲线计算出来的的x y值 赋值给view 这样就能让爱心随着曲线走啦
|
||||
PointF pointF = (PointF) animation.getAnimatedValue();
|
||||
target.setX(pointF.x);
|
||||
target.setY(pointF.y);
|
||||
// 这里偷个懒,顺便做一个alpha动画,这样alpha渐变也完成啦
|
||||
target.setAlpha(1 - animation.getAnimatedFraction());
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.mogo.module.common.drawer.marker;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
@@ -15,8 +15,4 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/module_camera_real_time_traffic" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="1px"
|
||||
android:layout_height="1px"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -113,7 +113,7 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
|
||||
private void playLiveVideo(String liveUrl) {
|
||||
try {
|
||||
if (mLivePlayer != null) {
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_RTMP);
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_FLV);
|
||||
mLivePlayer.setPlayListener(new ITXLivePlayListener() {
|
||||
@Override
|
||||
public void onPlayEvent(int event, Bundle bundle) {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.mogo.module.extensions.net;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import retrofit2.http.FieldMap;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
/**
|
||||
* 时延验证相关接口
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface DelayCheckApiServices {
|
||||
|
||||
@GET("/")
|
||||
Observable<BaseData> emptyInterface();
|
||||
|
||||
@POST("/")
|
||||
@FormUrlEncoded
|
||||
Observable<BaseData> uploadDelayCheckData(@FieldMap Map<String, String> params);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
private Context mContext;
|
||||
private static IMogoMarker mMogoMarker;
|
||||
private CloudRoadData mCloudRoadData;
|
||||
|
||||
private boolean isFirst;
|
||||
|
||||
public void init(Context context) {
|
||||
Logger.d(TAG, "init ======= ");
|
||||
@@ -60,20 +60,28 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
}
|
||||
});
|
||||
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
mCloudRoadData = new CloudRoadData();
|
||||
mCloudRoadData.setRtmpUrl("rtmp://58.200.131.2:1935/livetv/hunantv");
|
||||
mCloudRoadData.setLat(40.200353);
|
||||
mCloudRoadData.setLon(116.745467);
|
||||
// CameraLiveManager.getInstance().init(mCloudRoadData);
|
||||
addCameraMarker(mCloudRoadData);
|
||||
}, 2_000);
|
||||
// if (!isFirst) {
|
||||
// isFirst = true;
|
||||
// UiThreadHandler.postDelayed(() -> {
|
||||
// mCloudRoadData = new CloudRoadData();
|
||||
//// mCloudRoadData.setRtmpUrl("rtmp://58.200.131.2:1935/livetv/hunantv");
|
||||
// mCloudRoadData.setRtmpUrl("http://video.zhidaozhixing.com/live/rec_12_22.flv");
|
||||
//
|
||||
// mCloudRoadData.setLat(39.969089);
|
||||
// mCloudRoadData.setLon(116.418009);
|
||||
//
|
||||
//// CameraLiveManager.getInstance().init(mCloudRoadData);
|
||||
// addCameraMarker(mCloudRoadData);
|
||||
// }, 2_000);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void exitVrMode() {
|
||||
Logger.d(TAG, "退出vr模式===");
|
||||
// removeCameraMarker();
|
||||
// isFirst = false;
|
||||
MogoApisHandler.getInstance().getApis().getWebSocketManagerApi(mContext).unregisterOnWebSocketMessageListener(this);
|
||||
}
|
||||
|
||||
@@ -90,15 +98,13 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
.longitude(roadData.getLon());
|
||||
options.anchor(0.5f, 0.5f);
|
||||
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.module_camera_real_time_traffic, null);
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_space, null);
|
||||
options.icon(bitmap);
|
||||
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
|
||||
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
||||
|
||||
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), mMogoMarker.getMogoMarkerOptions()));
|
||||
mMogoMarker.showInfoWindow();
|
||||
|
||||
if (mMogoMarker != null) {
|
||||
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), mMogoMarker.getMogoMarkerOptions()));
|
||||
mMogoMarker.showInfoWindow();
|
||||
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
|
||||
}
|
||||
}
|
||||
@@ -127,13 +133,12 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
*/
|
||||
@Override
|
||||
public void onMsgReceived(MogoSnapshotSetData obj) {
|
||||
Logger.d(TAG, "onMsgReceived cameralive : " + obj);
|
||||
// Logger.d(TAG, "onMsgReceived cameralive : " + obj);
|
||||
if (obj != null) { //如果多个点,如何处理,点击的时候
|
||||
mCloudRoadData = obj.getCamera();
|
||||
if (mCloudRoadData != null) {
|
||||
Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl());
|
||||
Log.d(TAG, "mCurrentlat = " + mCurrentlat + "--mCurrentlon = " + mCurrentlon);
|
||||
Log.d(TAG, "mCloudRoadData.getLat() = " + mCloudRoadData.getLat() + "--mCloudRoadData.getLon() = " + mCloudRoadData.getLon());
|
||||
Log.d(TAG, "mCurrentlat = " + mCurrentlat + "--mCurrentlon = " + mCurrentlon + "---mCloudRoadData.getLat() = " + mCloudRoadData.getLat() + "--mCloudRoadData.getLon() = " + mCloudRoadData.getLon());
|
||||
if (mCurrentlat == mCloudRoadData.getLat() && mCurrentlon == mCloudRoadData.getLon()) {
|
||||
//TODO
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import com.mogo.commons.data.BaseData;
|
||||
import com.mogo.commons.network.SubscribeImpl;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.net.DelayCheckApiServices;
|
||||
import com.mogo.module.extensions.net.DztHttpConstant;
|
||||
import com.mogo.utils.NetworkUtils;
|
||||
import com.mogo.utils.network.RequestOptions;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 延时验证工具类
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class DelayCheckUtil implements Handler.Callback {
|
||||
|
||||
private final Handler handler = new Handler(this);
|
||||
|
||||
private static final int MSG_CHECK_NET_CONNECT_STATUS = 1001;
|
||||
private static final long CHECK_NET_CONNECT_STATUS_DELAY = 5000L;
|
||||
|
||||
private static final int MSG_START_DELAY_CHECK = 1002;
|
||||
private static final long DELAY_CHECK_DELAY = 10 * 60 * 1000;
|
||||
|
||||
private Context context;
|
||||
|
||||
public DelayCheckUtil(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* 每5s检查一下网络状态,网络状态为连接状态时,开始空接口请求以及后续的参数上报
|
||||
*/
|
||||
public void waitingForCheck() {
|
||||
handler.sendEmptyMessageDelayed(MSG_CHECK_NET_CONNECT_STATUS, CHECK_NET_CONNECT_STATUS_DELAY);
|
||||
}
|
||||
|
||||
private long requestTime, netDelay;
|
||||
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case MSG_CHECK_NET_CONNECT_STATUS:
|
||||
if (NetworkUtils.isConnected(context)) {
|
||||
handler.sendEmptyMessage(MSG_START_DELAY_CHECK);
|
||||
} else {
|
||||
handler.sendEmptyMessageDelayed(MSG_CHECK_NET_CONNECT_STATUS, CHECK_NET_CONNECT_STATUS_DELAY);
|
||||
}
|
||||
return true;
|
||||
case MSG_START_DELAY_CHECK:
|
||||
// 请求空接口
|
||||
startEmptyRequest();
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void startEmptyRequest() {
|
||||
requestTime = SystemClock.elapsedRealtime();
|
||||
MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(DelayCheckApiServices.class, DztHttpConstant.getBaseUrl())
|
||||
.emptyInterface().subscribeOn(Schedulers.io()).observeOn(Schedulers.io())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(context)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
netDelay = SystemClock.elapsedRealtime() - requestTime;
|
||||
|
||||
startUpload();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void startUpload(){
|
||||
Map<String, String> params = new HashMap<>();
|
||||
MogoApisHandler.getInstance().getApis().getNetworkApi()
|
||||
.create(DelayCheckApiServices.class, DztHttpConstant.getBaseUrl())
|
||||
.uploadDelayCheckData(params).observeOn(Schedulers.io()).subscribeOn(Schedulers.io())
|
||||
.subscribe(new SubscribeImpl<BaseData>(RequestOptions.create(context)) {
|
||||
@Override
|
||||
public void onSuccess(BaseData o) {
|
||||
super.onSuccess(o);
|
||||
|
||||
handler.sendEmptyMessageDelayed(MSG_START_DELAY_CHECK, DELAY_CHECK_DELAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String message, int code) {
|
||||
super.onError(message, code);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
super.onError(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 163 B |
Binary file not shown.
|
After Width: | Height: | Size: 163 B |
Binary file not shown.
|
After Width: | Height: | Size: 163 B |
@@ -135,6 +135,5 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/groupDebugPanel"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:constraint_referenced_ids="btnCloseLog,btnOpenLog,btnOpenV2xPanel,tvObuSetTitle,tvLogSetTitle,tvV2xSetTitle,rgObuSet,ibDebugPanelClose,debugPanelBg" />
|
||||
</merge>
|
||||
@@ -214,8 +214,8 @@
|
||||
<!-- 仅在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_margin_start">20px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_margin_top">8px</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>
|
||||
<dimen name="module_ext_navi_in_vr_next_info_txt_size">60px</dimen>
|
||||
<dimen name="module_ext_navi_in_vr_next_info_unit_size">48px</dimen>
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.skin.support.SkinMode;
|
||||
import com.mogo.utils.NetworkUtils;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.adasconfig.api.AdasConfigApiController;
|
||||
@@ -140,6 +141,8 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
super.onCreate( savedInstanceState );
|
||||
ContextHolderUtil.holdContext(this);
|
||||
mPresenter.postLoadModuleMsg();
|
||||
|
||||
NetworkUtils.listenNetStrength(this);
|
||||
}
|
||||
|
||||
private void init() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.media.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
@@ -9,6 +10,7 @@ import android.graphics.RectF;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.module.media.R;
|
||||
import com.mogo.module.media.utils.Utils;
|
||||
|
||||
/**
|
||||
@@ -24,10 +26,12 @@ public class CircleNumberProgress extends View {
|
||||
private int paintTextSize = 20;
|
||||
|
||||
/** 未完成进度条的颜色 */
|
||||
private int paintUndoneColor = 0xffaaaaaa;
|
||||
// private int paintUndoneColor = 0xffaaaaaa;
|
||||
private int paintUndoneColor;
|
||||
|
||||
/** 已完成进度条的颜色 */
|
||||
private int paintDoneColor = 0xff67aae4;
|
||||
// private int paintDoneColor = 0xff67aae4;
|
||||
private int paintDoneColor;
|
||||
|
||||
/** 百分比文字的颜色 */
|
||||
private int paintTextColor = 0xffff0077;
|
||||
@@ -70,6 +74,12 @@ public class CircleNumberProgress extends View {
|
||||
public CircleNumberProgress(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
this.context = context;
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.PercentageRing);
|
||||
//中间圆的背景颜色 默认为浅紫色
|
||||
paintUndoneColor = typedArray.getColor(R.styleable.PercentageRing_circleBackground, 0xffafb4db);
|
||||
//外圆环的颜色 默认为深紫色
|
||||
paintDoneColor = typedArray.getColor(R.styleable.PercentageRing_ringColor, 0xff6950a1);
|
||||
|
||||
// 构造器中初始化数据
|
||||
initData();
|
||||
}
|
||||
|
||||
@@ -314,16 +314,9 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener {
|
||||
// GlideApp.with(mContext).applyDefaultRequestOptions(options).load(mMediaInfoData.getMediaImg()).into(new SkinAbleBitmapTarget(mCircleImg, options));
|
||||
}else{
|
||||
Logger.e(TAG, "mMediaInfoData == null ");
|
||||
// mAnimCircleImageView.setImageResource(R.drawable.module_media_default_music_img);
|
||||
int size =
|
||||
mContext.getResources().getDimensionPixelSize(R.dimen.module_media_pop_window_anim_img_size_new);
|
||||
com.bumptech.glide.request.RequestOptions options =
|
||||
new com.bumptech.glide.request.RequestOptions()
|
||||
.placeholder(R.drawable.module_media_default_music_img).error(R.drawable.module_media_default_music_img).override(size, size);
|
||||
GlideApp.with(mContext).asBitmap().apply(options).load("").into(new SkinAbleBitmapTarget(mAnimCircleImageView, options));
|
||||
mAnimCircleImageView.setImageResource(R.drawable.module_media_default_music_img);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if (mScrollText != null) {
|
||||
mScrollText.setText(mMediaInfoData.getMediaName());
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:circleBackground="@color/modules_media_music_bg_color"
|
||||
app:ringColor="@color/modules_media_music_circle_color"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
<color name="modules_media_music_title_text_color">#fff</color>
|
||||
<color name="modules_media_music_time_text_color">#7affffff</color>
|
||||
<color name="modules_media_music_bg_color">#444E6E</color>
|
||||
<color name="modules_media_music_circle_color">#B63737</color>
|
||||
<color name="modules_media_music_circle_color">#80ffffff</color>
|
||||
</resources>
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.location.LocationManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.module.common.entity.CloudLocationInfo;
|
||||
@@ -121,7 +122,11 @@ public class MogoRTKLocation {
|
||||
cloudLocationInfo.setSpeed(location.getSpeed());
|
||||
cloudLocationInfo.setSatelliteTime(location.getTime());
|
||||
cloudLocationInfo.setSystemTime(System.currentTimeMillis());
|
||||
|
||||
// Log.e("liyz", "lat = " + location.getLatitude() + ">>>>long = " + location.getLongitude());
|
||||
cacheList.add(cloudLocationInfo);
|
||||
} else {
|
||||
Logger.e(TAG, "location == null");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,14 +4,17 @@ import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.IMogoMarkerClickListener;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.drawer.MarkerDrawer;
|
||||
import com.mogo.module.common.drawer.marker.IMarkerView;
|
||||
import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
|
||||
import com.mogo.module.common.drawer.marker.RoadConditionInfoWindow3DAdapter;
|
||||
import com.mogo.module.common.entity.MarkerCardResult;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
@@ -532,6 +535,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
.longitude(roadEventEntity.getLocation().getLon());
|
||||
optionsRipple.anchor(0.5f, 0.5f);
|
||||
|
||||
MarkerShowEntity markerShowEntity = new MarkerShowEntity();
|
||||
MarkerExploreWay markerExploreWay = roadEventEntity.getNoveltyInfo();
|
||||
markerShowEntity.setBindObj(markerExploreWay);
|
||||
markerShowEntity.setMarkerLocation(markerExploreWay.getLocation());
|
||||
markerShowEntity.setMarkerType(markerExploreWay.getPoiType());
|
||||
markerShowEntity.setTextContent(markerExploreWay.getPoiType());
|
||||
|
||||
// 由于性能问题,D车机不使用事件扩散动画
|
||||
if (!CarSeries.isF8xxSeries()) {
|
||||
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
|
||||
@@ -539,8 +549,13 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
|
||||
optionsRipple.period(1);
|
||||
}
|
||||
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, clickListener);
|
||||
mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
|
||||
mAlarmInfoMarker.showInfoWindow();
|
||||
} else {
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
// 当前Marker设置为最上面
|
||||
mAlarmInfoMarker.setToTop();
|
||||
// 绘制连接线
|
||||
|
||||
Reference in New Issue
Block a user