Merge branch 'dev' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev

This commit is contained in:
wangcongtao
2020-09-03 20:50:48 +08:00
41 changed files with 82 additions and 64 deletions

View File

@@ -7,9 +7,14 @@ import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.Transformation;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPoolAdapter;
import com.bumptech.glide.load.resource.bitmap.BitmapResource;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.transition.Transition;
import com.mogo.commons.AbsMogoApplication;
public
/**
@@ -33,7 +38,15 @@ class SkinAbleBitmapTarget extends SimpleTarget< Bitmap > {
public void onResourceReady( @NonNull Bitmap resource, @Nullable Transition< ? super Bitmap > transition ) {
try {
mTarget.setImageResource( 0 );
mTarget.setImageBitmap( resource );
if(mOptions.getTransformations().containsKey(Bitmap.class)) {
Transformation<Bitmap> t = (Transformation<Bitmap>) mOptions.getTransformations().get(Bitmap.class);
BitmapResource r = BitmapResource.obtain(resource, new BitmapPoolAdapter());
Resource<Bitmap> r2 = t.transform(AbsMogoApplication.getApp(), r, resource.getWidth(),
resource.getHeight());
mTarget.setImageBitmap(r2.get());
}else {
mTarget.setImageBitmap(resource);
}
} catch( Exception e ){
e.printStackTrace();
}

View File

@@ -17,6 +17,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import com.alibaba.android.arouter.launcher.ARouter;
import com.bumptech.glide.request.RequestOptions;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.mvp.MvpFragment;
@@ -32,6 +33,7 @@ import com.mogo.map.navi.MogoTraffic;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.dialog.WMDialog;
import com.mogo.module.common.glide.SkinAbleBitmapTarget;
import com.mogo.module.common.map.CustomNaviInterrupter;
import com.mogo.module.common.map.MapCenterPointStrategy;
import com.mogo.module.common.map.Scene;
@@ -540,7 +542,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
public void renderUserInfo(UserInfo userInfo) {
if (userInfo != null) {
Logger.d(TAG, "renderUserInfo: " + userInfo);
GlideApp.with(getContext()).load(userInfo.getHeadImgurl()).placeholder(R.drawable.model_ext_default_user_head).circleCrop().into(mUserHeadImg);
RequestOptions options =
new RequestOptions().circleCrop().placeholder(R.drawable.model_ext_default_user_head).error(R.drawable.model_ext_default_user_head);
GlideApp.with(getContext()).asBitmap().load(userInfo.getHeadImgurl()).into(new SkinAbleBitmapTarget(mUserHeadImg, options));
}
}

View File

@@ -6,10 +6,12 @@ import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.voice.AIAssist
import com.mogo.map.MogoLatLng
import com.mogo.map.location.MogoLocation
import com.mogo.module.share.R
import com.mogo.module.share.ShareControl
import com.mogo.module.share.dialog.LaucherShareDialog
import com.mogo.service.tanlu.TanluUploadParams
import com.mogo.utils.NetworkUtils
import com.mogo.utils.TipDrawable
import com.mogo.utils.TipToast
import com.mogo.utils.logger.Logger
@@ -42,6 +44,7 @@ object UploadHelper {
}else{
// 没网就直接提示失败
AIAssist.getInstance(context).speakTTSVoice("分享失败,请检查网络")
TipToast.tip("分享失败,请检查网络", TipDrawable(context.resources.getDrawable(R.drawable.module_share_upload_fail)))
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1086,7 +1086,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
}
if (!NetworkUtils.isConnected(getContext())) { //没有网络
TipToast.shortTip("分享失败,请检查网络");
TipToast.shortTip("分享失败,请检查网络",new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_fail)));
} else if(TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) {
float bearing = TanluServiceManager.getLocationClient().getLastKnowLocation().getBearing(); //角度
Logger.d(TAG, "onMarkerInfo event.type = " + event.type + " >>event.lat = " + event.lat + " >>event.lon = " + event.lon + " >>event.imageUrl =" + event.imageUrl);
@@ -1118,7 +1118,7 @@ public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickL
AIAssist.getInstance(getContext()).speakTTSVoice((
String.format(voiceShareSuccessTts, getMathRandom())), null);
TipToast.shortTip("分享成功");
TipToast.shortTip("分享成功",new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_success)));
IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity);

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -14,7 +14,9 @@ import androidx.appcompat.app.AppCompatDelegate;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.mogo.module.v2x.R;
import com.mogo.skin.support.IMogoSkinCompatSupportable;
import com.mogo.skin.support.IMogoSkinSupportInstaller;
import com.mogo.skin.support.MogoSkinManager;
import com.mogo.skin.support.SkinMode;
/**
@@ -24,12 +26,13 @@ import com.mogo.skin.support.SkinMode;
* desc :
* version: 1.0
*/
public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkinSupportInstaller {
public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkinCompatSupportable {
private float roundLayoutRadius = 14f;
private Path roundPath;
private RectF rectF;
public RoundConstraintLayout(Context context) {
this(context, null);
}
@@ -81,23 +84,9 @@ public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkin
super.draw(canvas);
}
@Override
public void install(Application application) {
}
@Override
public void loadSkin(SkinMode skinMode) {
}
@Override
public AppCompatDelegate getSkinAppCompatDelegate(AppCompatActivity activity, AppCompatCallback callback) {
return null;
}
@Override
public void init(Context context) {
public void applySkin() {
}
}

View File

@@ -24,6 +24,7 @@ import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
import com.mogo.module.v2x.voice.V2XVoiceConstants;
import com.mogo.module.v2x.voice.V2XVoiceManager;
import com.mogo.skin.support.IMogoSkinCompatSupportable;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.utils.GsonUtil;
import com.tencent.rtmp.ITXLivePlayListener;
@@ -41,7 +42,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
* desc :
* version: 1.0
*/
public class V2XLiveGSYVideoView extends RoundLayout {
public class V2XLiveGSYVideoView extends RoundLayout implements IMogoSkinCompatSupportable {
private final String TAG = "V2XLiveGSYVideoView";
private TXCloudVideoView mTxcVideoView;
@@ -278,4 +279,9 @@ public class V2XLiveGSYVideoView extends RoundLayout {
.unRegisterUnWakeVoice(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_REFRESH_LIVE_UN_WAKEUP);
super.onDetachedFromWindow();
}
@Override
public void applySkin() {
}
}

View File

@@ -1,9 +1,9 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<corners android:radius="16px" />
<corners android:radius="@dimen/module_v2x_panel_cor" />
<gradient android:angle="135"
android:endColor="#3F456D"
android:endColor="#2E3141"
android:startColor="#3F435F" />
</shape>
</item>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.module.v2x.view.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@@ -14,7 +14,7 @@
android:id="@+id/rlRoadEventImg"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#555A75"
android:background="@color/v2x_555A_F5F5"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -65,7 +65,7 @@
android:layout_marginRight="@dimen/dp_30"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#fff"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_36"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/tvEventTypeTitle"
@@ -87,7 +87,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:alpha="0.6"
android:textColor="@android:color/white"
android:textColor="@color/v2x_FFF_666"
android:textSize="@dimen/dp_28"
app:layout_constraintBottom_toBottomOf="@id/ivEventDistanceLogo"
app:layout_constraintStart_toEndOf="@id/ivEventDistanceLogo"
@@ -100,7 +100,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_30"
android:alpha="0.6"
android:textColor="@android:color/white"
android:textColor="@color/v2x_FFF_666"
android:textSize="@dimen/dp_28"
app:layout_constraintBottom_toBottomOf="@id/ivEventDistanceLogo"
app:layout_constraintStart_toEndOf="@+id/tvEventDistance"
@@ -194,4 +194,4 @@
app:layout_constraintStart_toEndOf="@id/ivEventEventNav"
app:layout_goneMarginLeft="@dimen/dp_10"
tools:visibility="visible" />
</com.mogo.module.v2x.view.RoundConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.module.v2x.view.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rlContent"
@@ -36,7 +36,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_30"
android:layout_marginBottom="@dimen/dp_20"
android:textColor="#FFFFFF"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_34"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
@@ -51,7 +51,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_30"
android:gravity="center_vertical"
android:textColor="#FFF"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_80"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/ivToNav"
@@ -68,4 +68,4 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</com.mogo.module.v2x.view.RoundConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -60,7 +60,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:textColor="@color/v2x_FFF_333_white"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_28"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/ivFaultHelpHead"
@@ -74,7 +74,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.59"
android:textColor="@color/v2x_FFF_999_white"
android:textColor="@color/v2x_FFF_999"
android:textSize="@dimen/dp_26"
app:layout_constraintStart_toStartOf="@id/tvFaultHelpName"
app:layout_constraintTop_toBottomOf="@id/tvFaultHelpName"
@@ -86,7 +86,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_30"
android:gravity="center_vertical"
android:textColor="@color/v2x_FFF_333_white"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_80"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/ivFaultHelpEventCall"

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.module.v2x.view.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rlContent"
@@ -44,7 +44,7 @@
android:layout_marginRight="@dimen/dp_30"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#FFFFFF"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_34"
app:layout_constraintBottom_toTopOf="@+id/tvAddressDistance"
app:layout_constraintEnd_toStartOf="@+id/llIllegalParkingLike"
@@ -60,7 +60,7 @@
android:layout_marginBottom="@dimen/dp_10"
android:alpha="0.6"
android:gravity="center_vertical"
android:textColor="#FFFFFF"
android:textColor="@color/v2x_FFF_666"
android:textSize="@dimen/dp_30"
app:layout_constraintEnd_toEndOf="@+id/tvAddress"
app:layout_constraintStart_toStartOf="@+id/tagEventType"
@@ -84,4 +84,4 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</com.mogo.module.v2x.view.RoundConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<com.mogo.module.v2x.view.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@@ -33,4 +33,4 @@
app:miv_shapeBorderWidth="@dimen/dp_4"
tools:visibility="visible" />
</com.mogo.module.v2x.view.RoundConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -77,7 +77,7 @@
android:layout_marginRight="@dimen/dp_30"
android:ellipsize="end"
android:maxLines="1"
android:textColor="#FFFFFF"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_34"
app:layout_constraintEnd_toStartOf="@+id/llIllegalParkingLike"
app:layout_constraintStart_toEndOf="@+id/ivIconP"
@@ -92,7 +92,7 @@
android:layout_marginBottom="@dimen/dp_24"
android:alpha="0.6"
android:gravity="center_vertical"
android:textColor="#FFFFFF"
android:textColor="@color/v2x_FFF_666"
android:textSize="@dimen/dp_30"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/tvAddress"

View File

@@ -22,7 +22,7 @@
android:alpha="0.7"
android:gravity="bottom"
android:text="你还没有分享过道路事件,快去试试吧"
android:textColor="@color/v2x_FFF_333_white"
android:textColor="@color/v2x_FFF_333"
android:textSize="18px" />
<RelativeLayout

View File

@@ -43,7 +43,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_20"
android:text="直播获取失败"
android:textColor="@color/v2x_FFF_333_white"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_36"
app:layout_constraintBottom_toBottomOf="@+id/ivErrorIcon"
app:layout_constraintStart_toEndOf="@+id/ivErrorIcon"
@@ -60,7 +60,7 @@
android:paddingEnd="@dimen/dp_135"
android:paddingBottom="@dimen/dp_25"
android:text="重试"
android:textColor="@color/v2x_FFF_333_white"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_34"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -53,6 +53,7 @@
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_des_index_width">16px</dimen>
<dimen name="module_v2x_des_index_height">4px</dimen>
<dimen name="module_v2x_panel_cor">30px</dimen>
<dimen name="module_v2x_panel_width">120px</dimen>
</resources>

View File

@@ -13,11 +13,10 @@
<color name="share_event_address_color">#FFFFFF</color>
<color name="panel_shadow_shape_color">#10121E</color>
<color name="share_event_no_more_color">#99FFFFFF</color>
<color name="v2x_FFF_999_white">#FFFFFF</color>
<color name="v2x_FFF_333_white">#FFFFFF</color>
<color name="v2x_ff6163_333_white">#ff616381</color>
//endColor="#ff616381" android:startColor="#ff48495e"
<color name="v2x_FFF_999">#FFFFFF</color>
<color name="v2x_FFF_333">#FFFFFF</color>
<color name="v2x_ff6163_333">#ff616381</color>
<color name="v2x_FFF_666">#FFFFFF</color>
<color name="v2x_555A_F5F5">#555A75</color>
</resources>

View File

@@ -56,5 +56,7 @@
<dimen name="module_v2x_des_index_width">16px</dimen>
<dimen name="module_v2x_des_index_height">20px</dimen>
<dimen name="module_v2x_panel_width">66px</dimen>
<dimen name="module_v2x_panel_cor">16px</dimen>
</resources>