dev
@@ -8,9 +8,19 @@ package com.mogo.module.extensions;
|
||||
*/
|
||||
public class ExtensionsModuleConst {
|
||||
|
||||
/**
|
||||
* 顶部UI
|
||||
*/
|
||||
public static final String PATH_EXTENSION = "/extension/ui";
|
||||
|
||||
/**
|
||||
* 快捷操作入口:定位、
|
||||
*/
|
||||
public static final String PATH_ENTRANCE = "/extension/entrance";
|
||||
|
||||
|
||||
public static final String TYPE = "extension";
|
||||
|
||||
public static final String TYPE_ENTRANCE = "entrance";
|
||||
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class ExtensionsPresenter extends Presenter< ExtensionsView > implements
|
||||
String temp = getContext().getResources().getString( R.string.module_ext_str_weather_temp_format, weatherInfo.getTemperature() );
|
||||
Phenomena phenomena = Phenomena.getById( weatherInfo.getPhenomena() );
|
||||
String desc = phenomena == null ? "" : phenomena.nameCn;
|
||||
int resId = 0;
|
||||
int resId = phenomena.resId;
|
||||
mView.renderWeatherInfo( temp, desc, resId );
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.location.IMogoLocationClient;
|
||||
import com.mogo.map.location.MogoLocation;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.navi.NaviInfoView;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.map.IMogoMapService;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresenter > implements EntranceView, IMogoNaviListener {
|
||||
|
||||
|
||||
private View mSearch;
|
||||
|
||||
private View mCommonAddress;
|
||||
private View mHome;
|
||||
private View mCompany;
|
||||
|
||||
private View mUploadRoadCondition;
|
||||
|
||||
private View mVRMode;
|
||||
private View mMove2CurrentLocation;
|
||||
|
||||
private NaviInfoView mNaviInfo;
|
||||
private View mExitNavi;
|
||||
|
||||
private IMogoMapService mService;
|
||||
private IMogoMapUIController mMApUIController;
|
||||
private IMogoLocationClient mMogoLocationClient;
|
||||
private IMogoNavi mMogoNavi;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.module_ext_layout_entrance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mCommonAddress = findViewById( R.id.module_map_id_common_address );
|
||||
|
||||
mSearch = findViewById( R.id.module_map_id_search );
|
||||
mSearch.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mHome = findViewById( R.id.module_map_id_home );
|
||||
mHome.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mCompany = findViewById( R.id.module_map_id_company );
|
||||
mCompany.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mUploadRoadCondition = findViewById( R.id.module_map_id_upload_road_condition );
|
||||
mUploadRoadCondition.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mVRMode = findViewById( R.id.module_map_id_vr_mode );
|
||||
mVRMode.setOnClickListener( view -> {
|
||||
} );
|
||||
|
||||
mMove2CurrentLocation = findViewById( R.id.module_map_id_move2_current_location );
|
||||
mMove2CurrentLocation.setOnClickListener( view -> {
|
||||
final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
|
||||
if ( location != null ) {
|
||||
mMApUIController.moveToCenter( new MogoLatLng( location.getLatitude(), location.getLongitude() ) );
|
||||
}
|
||||
} );
|
||||
|
||||
mNaviInfo = findViewById( R.id.module_map_id_navi_info_panel );
|
||||
mExitNavi = findViewById( R.id.module_map_id_exit_navi );
|
||||
mExitNavi.setOnClickListener( view -> {
|
||||
if ( mMogoNavi != null ) {
|
||||
mMogoNavi.stopNavi();
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected EntrancePresenter createPresenter() {
|
||||
return new EntrancePresenter( this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated( @Nullable Bundle savedInstanceState ) {
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
mService = ( IMogoMapService ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_MAP ).navigation( getContext() );
|
||||
mMApUIController = mService.getMapUIController();
|
||||
mMogoLocationClient = mService.getLocationClient( getContext() );
|
||||
mMogoNavi = mService.getNavi( getContext() );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onInitNaviFailure() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitNaviSuccess() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNaviInfoUpdate( MogoNaviInfo naviinfo ) {
|
||||
if ( naviinfo == null ) {
|
||||
return;
|
||||
}
|
||||
mNaviInfo.notifyChanged( naviinfo );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartNavi() {
|
||||
mCommonAddress.setVisibility( View.GONE );
|
||||
mNaviInfo.setVisibility( View.VISIBLE );
|
||||
mExitNavi.setVisibility( View.VISIBLE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopNavi() {
|
||||
mCommonAddress.setVisibility( View.VISIBLE );
|
||||
mNaviInfo.setVisibility( View.GONE );
|
||||
mExitNavi.setVisibility( View.GONE );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class EntrancePresenter extends Presenter<EntranceView> {
|
||||
|
||||
public EntrancePresenter( EntranceView view ) {
|
||||
super( view );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
import com.mogo.map.location.IMogoLocationListener;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.module.extensions.ExtensionsModuleConst;
|
||||
import com.mogo.service.module.IMogoModuleLifecycle;
|
||||
import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.ModuleType;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route( path = ExtensionsModuleConst.PATH_ENTRANCE )
|
||||
public class EntranceProvider implements IMogoModuleProvider {
|
||||
|
||||
@Override
|
||||
public Fragment createFragment( Context context, Bundle data ) {
|
||||
EntranceFragment fragment = new EntranceFragment();
|
||||
fragment.setArguments( data );
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView( Context context ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoModuleLifecycle getCardLifecycle() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoMapListener getMapListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return ModuleType.TYPE_ENTRANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoNaviListener getNaviListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoLocationListener getLocationListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public interface EntranceView extends IView {
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.mogo.module.extensions.navi;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.map.impl.amap.utils.IconTypeUtils;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-10-03
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public abstract class BaseNaviInfoView extends RelativeLayout {
|
||||
|
||||
public BaseNaviInfoView( Context context ) {
|
||||
this( context, null );
|
||||
}
|
||||
|
||||
public BaseNaviInfoView( Context context, @Nullable AttributeSet attrs ) {
|
||||
this( context, attrs, 0 );
|
||||
}
|
||||
|
||||
public BaseNaviInfoView( Context context, @Nullable AttributeSet attrs, int defStyleAttr ) {
|
||||
super( context, attrs, defStyleAttr );
|
||||
}
|
||||
|
||||
public void notifyChanged( MogoNaviInfo naviInfo ) {
|
||||
|
||||
}
|
||||
|
||||
protected void fillNextCrossTurning( TextView target, int nextIconType ) {
|
||||
target.setText( "后" + IconTypeUtils.getNameByIconType( nextIconType ) );
|
||||
}
|
||||
|
||||
protected void fillNextCrossIconType( ImageView target, int iconId ) {
|
||||
if ( iconId > 0 ) {
|
||||
target.setImageResource( iconId );
|
||||
}
|
||||
}
|
||||
|
||||
protected void fillNextCrossDistance( TextView target, TextView unit, int distance ) {
|
||||
if ( distance >= 1000 ) {
|
||||
target.setText( String.format( "%.1f", distance / 1000f ) );
|
||||
unit.setText( "公里" );
|
||||
} else {
|
||||
target.setText( distance + "" );
|
||||
unit.setText( "米" );
|
||||
}
|
||||
}
|
||||
|
||||
protected void fillFormatSurplusDistance( int m, StringBuilder builder ) {
|
||||
if ( m >= 1000 ) {
|
||||
builder.append( String.format( "%.1f公里", m / 1000f ) );
|
||||
} else {
|
||||
builder.append( m ).append( "米" );
|
||||
}
|
||||
}
|
||||
|
||||
protected void fillFormatTime( int seconds, StringBuilder builder ) {
|
||||
int days = seconds / ( 24 * 60 * 60 );
|
||||
if ( days > 0 ) {
|
||||
builder.append( days ).append( "天" );
|
||||
}
|
||||
seconds -= days * 24 * 60 * 60;
|
||||
int hours = seconds / ( 60 * 60 );
|
||||
if ( hours > 0 ) {
|
||||
builder.append( hours ).append( "小时" );
|
||||
}
|
||||
seconds -= hours * 60 * 60;
|
||||
int min = seconds / 60;
|
||||
builder.append( min > 1 ? min : 1 ).append( "分钟" );
|
||||
}
|
||||
|
||||
protected void fillArriveTime( int seconds, StringBuilder builder ) {
|
||||
|
||||
int days = seconds / ( 24 * 60 * 60 );
|
||||
if ( days > 0 ) {
|
||||
builder.append( days ).append( "天后" );
|
||||
} else {
|
||||
seconds -= days * 24 * 60 * 60;
|
||||
int hours = seconds / ( 60 * 60 );
|
||||
seconds -= hours * 60 * 60;
|
||||
int min = seconds / 60;
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int curHour = calendar.get( Calendar.HOUR_OF_DAY );
|
||||
int curMin = calendar.get( Calendar.MINUTE );
|
||||
if ( curHour + hours + ( curMin + min ) / 60 > 24 ) {
|
||||
builder.append( "一天后" );
|
||||
} else {
|
||||
calendar.add( Calendar.HOUR_OF_DAY, hours );
|
||||
calendar.add( Calendar.MINUTE, min );
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat( "HH:mm" );
|
||||
builder.append( dateFormat.format( calendar.getTime() ) );
|
||||
}
|
||||
}
|
||||
builder.append( "到达" );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.mogo.module.extensions.navi;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.module.extensions.R;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-09-29
|
||||
* <p>
|
||||
* 导航信息
|
||||
*/
|
||||
public class NaviInfoView extends BaseNaviInfoView {
|
||||
|
||||
private ImageView turnIcon;
|
||||
private TextView distance;
|
||||
private TextView distanceUnit;
|
||||
private TextView nextRoad;
|
||||
private TextView estimateInfo;
|
||||
|
||||
private StringBuilder mBuilder = new StringBuilder();
|
||||
|
||||
public NaviInfoView( Context context ) {
|
||||
this( context, null );
|
||||
}
|
||||
|
||||
public NaviInfoView( Context context, @Nullable AttributeSet attrs ) {
|
||||
this( context, attrs, 0 );
|
||||
}
|
||||
|
||||
public NaviInfoView( Context context, @Nullable AttributeSet attrs, int defStyleAttr ) {
|
||||
super( context, attrs, defStyleAttr );
|
||||
View.inflate( context, R.layout.module_map_layout_navi_info_panel, this );
|
||||
turnIcon = findViewById( R.id.module_map_id_navi_next_info_road_turn_icon );
|
||||
distance = findViewById( R.id.module_map_id_navi_next_info_distance );
|
||||
distanceUnit = findViewById( R.id.module_map_id_navi_next_info_distance_unit );
|
||||
nextRoad = findViewById( R.id.module_map_id_navi_next_info_road );
|
||||
estimateInfo = findViewById( R.id.module_map_id_navi_arrive_destination_estimate_info );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyChanged( MogoNaviInfo naviInfo ) {
|
||||
super.notifyChanged( naviInfo );
|
||||
if ( naviInfo == null ) {
|
||||
return;
|
||||
}
|
||||
fillNextCrossDistance( distance, distanceUnit, naviInfo.getCurStepRetainDistance() );
|
||||
fillNextCrossIconType( turnIcon, naviInfo.getIconResId() );
|
||||
nextRoad.setText( naviInfo.getNextRoadName() );
|
||||
|
||||
try {
|
||||
mBuilder.delete( 0, mBuilder.length() );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mBuilder.append( "剩余" );
|
||||
fillFormatSurplusDistance( naviInfo.getPathRetainDistance(), mBuilder );
|
||||
mBuilder.append( " " );
|
||||
fillFormatTime( naviInfo.getPathRetainTime(), mBuilder );
|
||||
mBuilder.append( "\n" );
|
||||
fillArriveTime( naviInfo.getPathRetainTime(), mBuilder );
|
||||
|
||||
final String text = mBuilder.toString();
|
||||
estimateInfo.setText( text );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当行信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getGuideInfo() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if ( getVisibility() == VISIBLE ) {
|
||||
builder.append( distance.getText() );
|
||||
builder.append( nextRoad.getText() );
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取剩余里程
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getPathRetainDistance() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if ( getVisibility() == VISIBLE ) {
|
||||
builder.append( estimateInfo.getText() );
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package com.mogo.module.extensions.weather;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.module.extensions.R;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -9,68 +11,70 @@ import java.util.Map;
|
||||
* @author Lzq
|
||||
*/
|
||||
public enum Phenomena {
|
||||
Sunny( "00", "晴", "Sunny" ),
|
||||
Cloudy( "01", "多云", "Cloudy" ),
|
||||
Overcast( "02", "阴", "Overcast" ),
|
||||
Sunny( "00", "晴", "Sunny", R.drawable.ic_sunny ),
|
||||
Cloudy( "01", "多云", "Cloudy", R.drawable.ic_cloudy ),
|
||||
Overcast( "02", "阴", "Overcast", R.drawable.ic_overcast ),
|
||||
|
||||
Shower( "03", "阵雨", "Shower" ),
|
||||
Thundershower( "04", "雷阵雨", "Thundershower" ),
|
||||
ThundershowerWithHail( "05", "雷阵雨伴有冰雹", "Thundershower with hail" ),
|
||||
Sleet( "06", "雨夹雪", "Sleet" ),
|
||||
LightRain( "07", "小雨", "Light rain" ),
|
||||
ModerateRain( "08", "中雨", "Moderate rain" ),
|
||||
HeavyRain( "09", "大雨", "Heavy rain" ),
|
||||
Storm( "10", "暴雨", "Storm" ),
|
||||
HeavyStorm( "11", "大暴雨", "Heavy storm" ),
|
||||
SevereStorm( "12", "特大暴雨", "Severe storm" ),
|
||||
Shower( "03", "阵雨", "Shower", R.drawable.ic_shower ),
|
||||
Thundershower( "04", "雷阵雨", "Thundershower", R.drawable.ic_thundershower ),
|
||||
ThundershowerWithHail( "05", "雷阵雨伴有冰雹", "Thundershower with hail", R.drawable.ic_thundershower ),
|
||||
Sleet( "06", "雨夹雪", "Sleet", R.drawable.ic_snow ),
|
||||
LightRain( "07", "小雨", "Light rain", R.drawable.ic_light_rain ),
|
||||
ModerateRain( "08", "中雨", "Moderate rain", R.drawable.ic_light_rain ),
|
||||
HeavyRain( "09", "大雨", "Heavy rain", R.drawable.ic_heavy_rain ),
|
||||
Storm( "10", "暴雨", "Storm", R.drawable.ic_heavy_rain ),
|
||||
HeavyStorm( "11", "大暴雨", "Heavy storm", R.drawable.ic_heavy_rain ),
|
||||
SevereStorm( "12", "特大暴雨", "Severe storm", R.drawable.ic_severe_storm ),
|
||||
|
||||
SnowFlurry( "13", "阵雪", "Snow flurry" ),
|
||||
LightSnow( "14", "小雪", "Light snow" ),
|
||||
ModerateSnow( "15", "中雪", "Moderate snow" ),
|
||||
HeavySnow( "16", "大雪", "Heavy snow" ),
|
||||
Snowstorm( "17", "暴雪", "Snowstorm" ),
|
||||
SnowFlurry( "13", "阵雪", "Snow flurry", R.drawable.ic_snow ),
|
||||
LightSnow( "14", "小雪", "Light snow", R.drawable.ic_snow ),
|
||||
ModerateSnow( "15", "中雪", "Moderate snow", R.drawable.ic_snow ),
|
||||
HeavySnow( "16", "大雪", "Heavy snow", R.drawable.ic_snow ),
|
||||
Snowstorm( "17", "暴雪", "Snowstorm", R.drawable.ic_snow ),
|
||||
|
||||
Foggy( "18", "雾", "Foggy" ),
|
||||
IceRain( "19", "冻雨", "Ice rain" ),
|
||||
Duststorm( "20", "沙尘暴", "Duststorm" ),
|
||||
Foggy( "18", "雾", "Foggy", R.drawable.ic_fog ),
|
||||
IceRain( "19", "冻雨", "Ice rain", R.drawable.ic_heavy_rain ),
|
||||
Duststorm( "20", "沙尘暴", "Duststorm", R.drawable.ic_duststorm ),
|
||||
|
||||
LightToModerateRain( "21", "小到中雨", "Light to moderate rain" ),
|
||||
ModerateToHeavyRain( "22", "中到大雨", "Moderate to heavy rain" ),
|
||||
HeavyRainToStorm( "23", "大到大雨", "Heavy rain to storm" ),
|
||||
StormToHeavyStorm( "24", "暴雨到大暴雨", "Storm to heavy storm" ),
|
||||
HeavyToSevereStorm( "25", "大暴雨到特大暴雨", "Heavy to severe storm" ),
|
||||
LightToModerateRain( "21", "小到中雨", "Light to moderate rain", R.drawable.ic_moderate_rain ),
|
||||
ModerateToHeavyRain( "22", "中到大雨", "Moderate to heavy rain", R.drawable.ic_heavy_rain ),
|
||||
HeavyRainToStorm( "23", "大到大雨", "Heavy rain to storm", R.drawable.ic_heavy_rain ),
|
||||
StormToHeavyStorm( "24", "暴雨到大暴雨", "Storm to heavy storm", R.drawable.ic_severe_storm ),
|
||||
HeavyToSevereStorm( "25", "大暴雨到特大暴雨", "Heavy to severe storm", R.drawable.ic_severe_storm ),
|
||||
|
||||
LightToModerateSnow( "26", "小到中雪", "Light to moderate snow" ),
|
||||
ModerateToHeavySnow( "27", "中到大雪", "Moderate to heavy snow" ),
|
||||
HeavySnowToSnowStorm( "28", "大到暴雪", "Heavy snow to snowstorm" ),
|
||||
LightToModerateSnow( "26", "小到中雪", "Light to moderate snow", R.drawable.ic_snow ),
|
||||
ModerateToHeavySnow( "27", "中到大雪", "Moderate to heavy snow", R.drawable.ic_snow ),
|
||||
HeavySnowToSnowStorm( "28", "大到暴雪", "Heavy snow to snowstorm", R.drawable.ic_snow ),
|
||||
|
||||
Dust( "29", "浮尘", "Dust" ),
|
||||
Sand( "30", "扬沙", "Sand" ),
|
||||
SandStorm( "31", "强沙尘暴", "Sandstorm" ),
|
||||
Dust( "29", "浮尘", "Dust", R.drawable.ic_dust_sand ),
|
||||
Sand( "30", "扬沙", "Sand", R.drawable.ic_dust_sand ),
|
||||
SandStorm( "31", "强沙尘暴", "Sandstorm", R.drawable.ic_duststorm ),
|
||||
|
||||
Densefog( "32", "浓雾", "Dense fog" ),
|
||||
StrongFog( "49", "强浓雾", "Strong fog" ),
|
||||
DenseFog( "57", "大雾", "Dense fog" ),
|
||||
ExtraHeavyFog( "58", "特强浓雾", "Extra heavy fog" ),
|
||||
Densefog( "32", "浓雾", "Dense fog", R.drawable.ic_fog ),
|
||||
StrongFog( "49", "强浓雾", "Strong fog", R.drawable.ic_fog ),
|
||||
DenseFog( "57", "大雾", "Dense fog", R.drawable.ic_fog ),
|
||||
ExtraHeavyFog( "58", "特强浓雾", "Extra heavy fog", R.drawable.ic_fog ),
|
||||
|
||||
Haze( "53", "霾", "Haze" ),
|
||||
ModerateHaze( "54", "中度霾", "Moderate haze" ),
|
||||
Severehaze( "55", "重度霾", "Severe haze" ),
|
||||
SevereHaze( "56", "严重霾", "Severe haze" ),
|
||||
Haze( "53", "霾", "Haze", R.drawable.ic_haze ),
|
||||
ModerateHaze( "54", "中度霾", "Moderate haze", R.drawable.ic_haze ),
|
||||
Severehaze( "55", "重度霾", "Severe haze", R.drawable.ic_haze ),
|
||||
SevereHaze( "56", "严重霾", "Severe haze", R.drawable.ic_haze ),
|
||||
|
||||
Unknown( "99", "无", "Unknown" ),
|
||||
Unknown( "99", "无", "Unknown", R.drawable.ic_unknown ),
|
||||
|
||||
Rain( "301", "雨", "rain" ),
|
||||
Snow( "302", "雪", "snow" );
|
||||
Rain( "301", "雨", "rain", R.drawable.ic_heavy_rain ),
|
||||
Snow( "302", "雪", "snow", R.drawable.ic_snow );
|
||||
|
||||
public final String id;
|
||||
public final String nameCn;
|
||||
public final String nameEn;
|
||||
public final int resId;
|
||||
|
||||
Phenomena( String id, String nameCn, String nameEn ) {
|
||||
Phenomena( String id, String nameCn, String nameEn, int resId ) {
|
||||
this.id = id;
|
||||
this.nameCn = nameCn;
|
||||
this.nameEn = nameEn;
|
||||
this.resId = resId;
|
||||
}
|
||||
|
||||
static Map< String, Phenomena > mPhenomenas;
|
||||
|
||||
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_cloudy.png
Executable file
|
After Width: | Height: | Size: 988 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_dust_sand.png
Executable file
|
After Width: | Height: | Size: 551 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_duststorm.png
Executable file
|
After Width: | Height: | Size: 754 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_fog.png
Executable file
|
After Width: | Height: | Size: 449 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_haze.png
Executable file
|
After Width: | Height: | Size: 934 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_heavy_rain.png
Executable file
|
After Width: | Height: | Size: 801 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_light_rain.png
Executable file
|
After Width: | Height: | Size: 631 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_moderate_rain.png
Executable file
|
After Width: | Height: | Size: 631 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_overcast.png
Executable file
|
After Width: | Height: | Size: 929 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_severe_storm.png
Executable file
|
After Width: | Height: | Size: 987 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_shower.png
Executable file
|
After Width: | Height: | Size: 967 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_snow.png
Executable file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_sunny.png
Executable file
|
After Width: | Height: | Size: 913 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_thunder.png
Executable file
|
After Width: | Height: | Size: 772 B |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_thundershower.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
modules/mogo-module-extensions/src/main/res/drawable-xhdpi/ic_unknown.png
Executable file
|
After Width: | Height: | Size: 906 B |
|
After Width: | Height: | Size: 737 B |
|
After Width: | Height: | Size: 831 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
<solid android:color="#3F4057" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<corners android:bottomLeftRadius="@dimen/dp_20" android:bottomRightRadius="@dimen/dp_20" />
|
||||
<solid android:color="#F1F1F1" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<corners android:radius="@dimen/dp_20" />
|
||||
<solid android:color="#FFFFFF" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<gradient android:angle="90" android:endColor="#5CC1FF" android:startColor="#256BFF" />
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:background="@drawable/module_map_dw_common_corner_bkg"
|
||||
android:drawableLeft="@drawable/module_map_ic_search"
|
||||
android:drawablePadding="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/dp_26"
|
||||
android:paddingRight="@dimen/dp_26"
|
||||
android:text="@string/module_map_str_search_hint"
|
||||
android:textColor="#99FFFFFF"
|
||||
android:textSize="@dimen/dp_32"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_map_id_common_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:background="@drawable/module_map_dw_common_corner_bkg"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="@dimen/dp_22"
|
||||
android:paddingTop="@dimen/dp_17"
|
||||
android:paddingRight="@dimen/dp_22"
|
||||
android:paddingBottom="@dimen/dp_17"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_map_id_search"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_map_id_home"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/module_map_ic_home" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_2"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginLeft="@dimen/dp_21"
|
||||
android:layout_marginRight="@dimen/dp_21"
|
||||
android:background="#1ED8D8D8" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_map_id_company"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/module_map_ic_company" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.mogo.module.extensions.navi.NaviInfoView
|
||||
android:id="@+id/module_map_id_navi_info_panel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_map_id_operation_panel"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_32"
|
||||
android:layout_marginBottom="@dimen/dp_60"
|
||||
android:background="@drawable/module_map_dw_common_corner_bkg"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/module_map_id_vr_mode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_92"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/module_map_ic_move2_current_location"
|
||||
android:text="实景"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_2"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#1ED8D8D8" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_map_id_move2_current_location"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/module_map_ic_move2_current_location" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_upload_road_condition"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
android:background="@drawable/module_map_dw_upload_road_condition_bkg"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_map_str_upload_road_condition"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_24"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_map_id_operation_panel"
|
||||
app:layout_constraintRight_toRightOf="@+id/module_map_id_operation_panel"
|
||||
app:layout_goneMarginBottom="@dimen/dp_32"
|
||||
app:layout_goneMarginRight="@dimen/dp_32" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_exit_navi"
|
||||
android:layout_width="@dimen/dp_200"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:layout_marginLeft="@dimen/dp_32"
|
||||
android:layout_marginBottom="@dimen/dp_60"
|
||||
android:background="@drawable/module_map_dw_common_corner_bkg"
|
||||
android:gravity="center"
|
||||
android:text="退出导航"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:background="#0C0C0C "
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/dp_70"
|
||||
android:paddingRight="@dimen/dp_70">
|
||||
@@ -13,6 +14,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/module_ext_ic_voice"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -24,9 +26,9 @@
|
||||
android:text="@string/module_ext_str_voice_msg"
|
||||
android:textColor="@color/module_ext_color_voice_text"
|
||||
android:textSize="@dimen/dp_32"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_ext_id_voice"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/module_ext_id_voice"
|
||||
app:layout_constraintTop_toTopOf="@+id/module_ext_id_voice" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_ext_id_time"
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/dp_458"
|
||||
android:layout_height="@dimen/dp_318"
|
||||
android:background="@drawable/module_map_dw_navi_info_panel_bkg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_map_id_navi_next_info_road_turn_icon"
|
||||
android:layout_width="@dimen/dp_159"
|
||||
android:layout_height="@dimen/dp_159"
|
||||
android:layout_marginLeft="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:scaleType="fitCenter"
|
||||
tools:src="@drawable/ic_11" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_next_info_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/module_map_id_navi_next_info_road_turn_icon"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_toRightOf="@+id/module_map_id_navi_next_info_road_turn_icon"
|
||||
android:textColor="#282828"
|
||||
android:textSize="@dimen/dp_60"
|
||||
tools:text="53" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_next_info_distance_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/module_map_id_navi_next_info_distance"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:layout_toRightOf="@+id/module_map_id_navi_next_info_distance"
|
||||
android:textColor="#282828"
|
||||
android:textSize="@dimen/dp_28"
|
||||
tools:text="米" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_next_info_road"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/module_map_id_navi_next_info_distance"
|
||||
android:layout_alignLeft="@+id/module_map_id_navi_next_info_distance"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="#282828"
|
||||
android:textSize="@dimen/dp_28"
|
||||
tools:text="北三环东路辅路" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_map_id_navi_arrive_destination_estimate_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/module_map_id_navi_next_info_road_turn_icon"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:background="@drawable/module_map_dw_navi_info_extras_bkg"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:textColor="#282828"
|
||||
android:textSize="@dimen/dp_28"
|
||||
tools:text="剩余2000.8公里 1000小时59分钟59秒 \n1天后达到达到达到达到" />
|
||||
</RelativeLayout>
|
||||
@@ -14,4 +14,7 @@
|
||||
<item>周六</item>
|
||||
</string-array>
|
||||
<string name="module_ext_str_dots">···</string>
|
||||
|
||||
<string name="module_map_str_search_hint">搜索目的地</string>
|
||||
<string name="module_map_str_upload_road_condition">上报\n路况</string>
|
||||
</resources>
|
||||
|
||||