This commit is contained in:
zhongchao
2022-03-17 19:06:22 +08:00
parent 22c7920027
commit ee881c99e7
33 changed files with 330 additions and 403 deletions

View File

@@ -1,62 +0,0 @@
package com.mogo.module.common;
/**
* @author congtaowang
* @since 2020-01-03
* <p>
* 模块类型
*/
public interface ModuleType {
/**
* 卡片类型 - fragment
*/
int TYPE_CARD_FRAGMENT = 1;
/**
* 卡片类型 - view
*/
@Deprecated
int TYPE_CARD_VIEW = 2;
/**
* 服务类型的模块
*/
int TYPE_SERVICE = 3;
/**
* APP 列表模块
*/
@Deprecated
int TYPE_APP_LIST = 4;
/**
* 小智语音形象
*/
@Deprecated
int TYPE_VOICE = 5;
/**
* 地图模块
*/
@Deprecated
int TYPE_MAP = 6;
/**
* 导航模块
*/
@Deprecated
int TYPE_NAVI = 7;
/**
* 小智、天气、时间等
*/
@Deprecated
int TYPE_EXTENSION = 8;
/**
* 操作快捷入口
*/
@Deprecated
int TYPE_ENTRANCE = 9;
}

View File

@@ -1,63 +0,0 @@
package com.mogo.module.common.api;
import android.content.Context;
import com.mogo.module.common.entity.MarkerOnlineCar;
public
/**
* @author congtaowang
* @since 2020/9/24
*
* 车聊聊接口
*/
class CallChatApi {
private static final String TAG = "CallChatApi";
private static volatile CallChatApi sInstance;
private CallChatApi() {
//mApiProvider = ARouter.getInstance().navigation( ICarsChattingProvider.class );
}
public static CallChatApi getInstance() {
if ( sInstance == null ) {
synchronized ( CallChatApi.class ) {
if ( sInstance == null ) {
sInstance = new CallChatApi();
}
}
}
return sInstance;
}
public synchronized void release() {
sInstance = null;
}
private Object readResolve() {
// 阻止反序列化,必须实现 Serializable 接口
return sInstance;
}
public void showUserWindow( Context context, MarkerOnlineCar onlineCar ) throws Exception {
// if ( mApiProvider == null ) {
// return;
// }
// MogoDriverInfo driverInfo = new MogoDriverInfo();
// driverInfo.setAge( onlineCar.getUserInfo().getAgeNumber() );
// driverInfo.setCarTypeName( onlineCar.getCarInfo().getCarTypeName() );
// driverInfo.setGender( onlineCar.getUserInfo().getGender() );
// driverInfo.setLat( onlineCar.getLocation().getLat() );
// driverInfo.setLon( onlineCar.getLocation().getLon() );
// driverInfo.setLocationInfo( onlineCar.getLocation().getAddress() );
// driverInfo.setSn( onlineCar.getUserInfo().getSn() );
// driverInfo.setUserHead( onlineCar.getUserInfo().getUserHead() );
// driverInfo.setUserName( onlineCar.getUserInfo().getUserName() );
// if ( mApiProvider != null ) {
// mApiProvider.showUserWindow( TAG, driverInfo, context );
// }
}
}

View File

@@ -1,71 +0,0 @@
package com.mogo.module.common.glide;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.transition.Transition;
public
/**
* @author congtaowang
* @since 2020/9/2
*
* 描述
*/
class SkinAbleBitmapTarget extends SimpleTarget< Bitmap > {
private ImageView mTarget;
private RequestOptions mOptions;
public SkinAbleBitmapTarget( ImageView mTarget, RequestOptions mOptions ) {
super();
this.mTarget = mTarget;
this.mOptions = mOptions;
}
@Override
public void onResourceReady( @NonNull Bitmap resource, @Nullable Transition< ? super Bitmap > transition ) {
try {
mTarget.setImageResource( 0 );
mTarget.setImageBitmap(resource);
} catch( Exception e ){
e.printStackTrace();
}
}
@Override
public void onLoadCleared( @Nullable Drawable placeholder ) {
super.onLoadCleared( placeholder );
try {
mTarget.setImageResource( mOptions.getPlaceholderId() );
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
public void onLoadStarted( @Nullable Drawable placeholder ) {
super.onLoadStarted( placeholder );
try {
mTarget.setImageResource( mOptions.getPlaceholderId() );
} catch ( Exception e ) {
e.printStackTrace();
}
}
@Override
public void onLoadFailed( @Nullable Drawable errorDrawable ) {
super.onLoadFailed( errorDrawable );
try {
mTarget.setImageResource( mOptions.getErrorId() );
} catch ( Exception e ) {
e.printStackTrace();
}
}
}

View File

@@ -1,16 +0,0 @@
package com.mogo.module.common.map;
/**
* @author congtaowang
* @since 2020-04-10
* <p>
* 拦截器
*/
public interface Interrupter {
/**
* 是否拦截
* @return true - 拦截, false - 不拦截
*/
boolean interrupt();
}

View File

@@ -1,19 +0,0 @@
package com.mogo.module.common.map;
/**
* @author congtaowang
* @since 2020-04-10
* <p>
* 地图视图中心点
*/
public class MapCenterPoint {
public final double x;
public final double y;
public MapCenterPoint( double x, double y ) {
this.x = x;
this.y = y;
}
}

View File

@@ -1,55 +0,0 @@
package com.mogo.module.common.map;
/**
* @author congtaowang
* @since 2020-04-10
* <p>
* 描述
*/
public interface Scene {
/**
* 普通场景
*/
int COMMON = 0;
/**
* 选点
*/
int CHOOSE_POINT = 1;
/**
* 导航
*/
int NAVI = 2;
/**
* 导航 vs 道路事件
*/
int NAVI_WITH_ROAD_EVENT = 21;
/**
* 巡航
*/
int AIMLESS = 3;
/**
* 巡航 vs 道路事件
*/
int AIMLESS_WITH_ROAD_EVENT = 31;
/**
* 路线规划
*/
int CALCULATE_PATH = 4;
/**
* 分类搜索
*/
int CATEGORY_SEARCH = 5;
/**
* V2X触发了预警场景
*/
int CATEGORY_V2X_EVENT = 6;
}