This commit is contained in:
wangcongtao
2020-09-14 14:10:14 +08:00
15 changed files with 78 additions and 37 deletions

View File

@@ -522,7 +522,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
@@ -544,7 +544,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
if ( checkAMapView() ) {
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( style == null ) {
style = new MyLocationStyle();
}
@@ -557,7 +557,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
public void initMyLocation() {
if ( checkAMapView() ) {
mMapView.getMap().setMyLocationEnabled( true );
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
style.myLocationType( MyLocationStyle.LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER );
style.interval( 1000 );
style.anchor( 0.5F, 0.5F );
@@ -864,7 +864,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
if ( mMapView.getMap() == null ) {
return;
}
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( mCarCursorOption.getCarCursorBmp() != null && !mCarCursorOption.getCarCursorBmp().isRecycled() ) {
style.myLocationIcon( BitmapDescriptorFactory.fromBitmap( mCarCursorOption.getCarCursorBmp() ) );
} else {
@@ -877,6 +877,20 @@ public class AMapNaviViewWrapper implements IMogoMapView,
mMapView.getMap().setMyLocationStyle( style );
}
private MyLocationStyle getMyLocationStyle() {
MyLocationStyle style = null;
try {
style = mMapView.getMap().getMyLocationStyle();
} catch ( Exception e ) {
style = new MyLocationStyle();
} finally {
if ( style == null ) {
style = new MyLocationStyle();
}
return style;
}
}
@Override
public MapCameraPosition getMapCameraPosition() {
if ( checkAMapView() ) {

View File

@@ -465,10 +465,16 @@ public class AMapViewWrapper implements IMogoMapView,
}
private MyLocationStyle getMyLocationStyle() {
MyLocationStyle style = null;
try {
return mMapView.getMap().getMyLocationStyle();
style = mMapView.getMap().getMyLocationStyle();
} catch ( Exception e ) {
return new MyLocationStyle();
style = new MyLocationStyle();
} finally {
if ( style == null ) {
style = new MyLocationStyle();
}
return style;
}
}
@@ -790,7 +796,7 @@ public class AMapViewWrapper implements IMogoMapView,
if ( mMapView.getMap() == null ) {
return;
}
MyLocationStyle style = mMapView.getMap().getMyLocationStyle();
MyLocationStyle style = getMyLocationStyle();
if ( mCarCursorOption.getCarCursorBmp() != null && !mCarCursorOption.getCarCursorBmp().isRecycled() ) {
style.myLocationIcon( BitmapDescriptorFactory.fromBitmap( mCarCursorOption.getCarCursorBmp() ) );
} else {

View File

@@ -82,8 +82,8 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
mMogoMarkerOptions = null;
}
if ( mMarker != null ) {
mMarker.remove();
mMarker.setObject( null );
mMarker.remove();
mMarker = null;
}
if ( mMovingPointOverlay != null ) {

View File

@@ -46,9 +46,6 @@ public class MainIndependentActivity extends MainActivity {
@Override
protected void onResume() {
super.onResume();
if ( mCoverUpLayout.getVisibility() != View.VISIBLE ) {
mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
}
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
fixInMultiWindowMode();
}
@@ -65,7 +62,6 @@ public class MainIndependentActivity extends MainActivity {
@Override
protected void onPause() {
super.onPause();
mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
}
@Override

View File

@@ -50,6 +50,8 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
private IMogoNetwork mNetWork;
private boolean isResumed = false;
public EntrancePresenter(Context context, EntranceView view) {
super(view);
mWeatherModel = new WeatherModel( getContext() );
@@ -91,6 +93,10 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
@Override
public void onResume( @NonNull LifecycleOwner owner ) {
super.onResume( owner );
isResumed = true;
if (userInfo != null) {
mView.renderUserInfo(userInfo);
}
if(ExtensionsConfig.needRequestUserInfo()){
// 相当于每次onResume都会请求一下个人信息目的是能够相对及时的同步手机端的个人信息修改
requestUserInfo();
@@ -100,6 +106,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
@Override
public void onPause( @NonNull LifecycleOwner owner ) {
super.onPause( owner );
isResumed = false;
}
@Override
@@ -128,11 +135,13 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
@Override
public void onSuccess(UserInfoResponse userInfoBaseResponse) {
userInfo = userInfoBaseResponse.getResult();
if(userInfo!=null) {
Logger.d(TAG, "获取个人信息成功: " + userInfo);
mView.renderUserInfo(userInfo);
}else{
Logger.e(TAG,"获取个人信息失败");
if(isResumed) {
if (userInfo != null) {
Logger.d(TAG, "获取个人信息成功: " + userInfo);
mView.renderUserInfo(userInfo);
} else {
Logger.e(TAG, "获取个人信息失败");
}
}
}

View File

@@ -7,7 +7,7 @@ import com.mogo.service.analytics.IMogoAnalytics
object AnalyticsUtil {
const val INVOKE_TRACK_PLAY_PASS_ID = "mogu_play_pass"
const val INVOKE_TRACK_PLAY_PASS_ID = "v2x_play_pass"
const val INVOKE_TRACK_PASS_TIME = "pass_time"
const val INVOKE_TRACK_PLAY_TIME = "play_time"

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="270"
android:endColor="#2A2B38"
android:startColor="#3F4057" />
android:angle="0"
android:endColor="@color/tanlu_dialog_endcolor"
android:startColor="@color/tanlu_dialog_startcolor" />
<corners android:radius="@dimen/tanlu_dialog_radius" />
</shape>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#50526E"/>
<solid android:color="@color/tanlu_dialog_bt_right_color"/>
<corners android:bottomRightRadius="@dimen/tanlu_dialog_radius" />
</shape>

View File

@@ -2,8 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="0"
android:endColor="#5CC1FF"
android:startColor="#3E7FFC" />
android:endColor="@color/tanlu_dialog_bt_endcolor"
android:startColor="@color/tanlu_dialog_bt_startcolor" />
<corners android:bottomLeftRadius="@dimen/tanlu_dialog_radius" />
</shape>

View File

@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:text="抱歉,无法获取到相关数据"
android:textColor="@color/white"
android:textColor="@color/tanlu_dialog_textcolor"
android:textSize="@dimen/tanlu_dialog_content_size" />
<TextView
@@ -38,7 +38,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:text="分享失败"
android:textColor="@color/white"
android:textColor="@color/tanlu_dialog_textcolor"
android:textSize="@dimen/tanlu_dialog_content_size" />
<LinearLayout
@@ -57,7 +57,7 @@
android:background="@drawable/tanlu_dialog_button_bg"
android:gravity="center"
android:text="重新分享"
android:textColor="@color/white"
android:textColor="@color/tanlu_dialog_bt_press_text_color"
android:textSize="@dimen/tanlu_dialog_content_size"
android:textStyle="bold" />
@@ -74,7 +74,7 @@
android:background="@drawable/tanlu_dialog_bottom_button_right_bg"
android:gravity="center"
android:text="取消"
android:textColor="@color/white"
android:textColor="@color/tanlu_dialog_bt_defalt_text_color"
android:textSize="@dimen/tanlu_dialog_content_size"
android:textStyle="bold" />
</LinearLayout>

View File

@@ -20,7 +20,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:text="由于网络原因上传失败"
android:textColor="@color/white"
android:textColor="@color/tanlu_dialog_textcolor"
android:textSize="@dimen/tanlu_dialog_content_size" />
<TextView
@@ -29,7 +29,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:text="系统将在网络恢复时自动上传"
android:textColor="@color/white"
android:textColor="@color/tanlu_dialog_textcolor"
android:textSize="@dimen/tanlu_dialog_content_size" />
<!--网络弹框-->

View File

@@ -41,4 +41,13 @@
<color name="color_59FFFFFF">#59FFFFFF</color>
<color name="tanlu_white">#FFFFFF</color>
<color name="tanlu_dialog_textcolor">#FFFFFF</color>
<color name="tanlu_dialog_startcolor">#3F4057</color>
<color name="tanlu_dialog_endcolor">#2A2B38</color>
<color name="tanlu_dialog_bt_defalt_text_color">#FFFFFF</color>
<color name="tanlu_dialog_bt_press_text_color">#FFFFFF</color>
<color name="tanlu_dialog_bt_startcolor">#3E7FFC</color>
<color name="tanlu_dialog_bt_endcolor">#5CC1FF</color>
<color name="tanlu_dialog_bt_right_color">#50526E</color>
</resources>

View File

@@ -82,13 +82,11 @@ public class V2XSurroundingAdapter extends RecyclerView.Adapter<V2XSurroundingVi
});
//数据绑定
Glide.with(mContext)
.load(getTypeRes(surroundingConstruction.getPoiType()))
.into(mBgImageView);
// Glide.with(mContext)
// .load(getTypeSmallRes(surroundingConstruction.getPoiType()))
// .into(mTypeImageView);
// .load(getTypeRes(surroundingConstruction.getPoiType()))
// .into(mBgImageView);
mBgImageView.setBackgroundResource(getTypeRes(surroundingConstruction.getPoiType()));
RequestOptions requestOptions = new RequestOptions()
.placeholder(R.drawable.v2x_icon_live_logo)

View File

@@ -7,9 +7,9 @@
<ImageView
android:id="@+id/iv_event_bg"
android:scaleType="fitXY"
android:src="@drawable/mogo_image_nongwu_nor"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- android:src="@drawable/mogo_image_nongwu_nor"-->
<RelativeLayout
android:layout_alignParentBottom="true"

View File

@@ -3,4 +3,13 @@
<color name="tanlu_white_light">#333333</color>
<color name="color_99FFFFFF_light">#666666</color>
<color name="tanlu_dialog_textcolor_light">#333333</color>
<color name="tanlu_dialog_startcolor_light">#F5F5F5</color>
<color name="tanlu_dialog_endcolor_light">#FFFFFF</color>
<color name="tanlu_dialog_bt_defalt_text_color_light">#333333</color>
<color name="tanlu_dialog_bt_press_text_color_light">#2896FF</color>
<color name="tanlu_dialog_bt_startcolor_light">#FFFFFF</color>
<color name="tanlu_dialog_bt_endcolor_light">#FFFFFF</color>
<color name="tanlu_dialog_bt_right_color_light">#E8E8E8</color>
</resources>