dev
@@ -11,59 +11,59 @@ import java.util.Map;
|
||||
* @author Lzq
|
||||
*/
|
||||
public enum Phenomena {
|
||||
Sunny( "00", "晴", "Sunny", R.drawable.ic_sunny ),
|
||||
Cloudy( "01", "多云", "Cloudy", R.drawable.ic_cloudy ),
|
||||
Overcast( "02", "阴", "Overcast", R.drawable.ic_overcast ),
|
||||
Sunny( "00", "晴", "Sunny", R.drawable.module_ext_ic_sunny ),
|
||||
Cloudy( "01", "多云", "Cloudy", R.drawable.module_ext_ic_cloudy ),
|
||||
Overcast( "02", "阴", "Overcast", R.drawable.module_ext_ic_overcast ),
|
||||
|
||||
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 ),
|
||||
Shower( "03", "阵雨", "Shower", R.drawable.module_ext_ic_shower ),
|
||||
Thundershower( "04", "雷阵雨", "Thundershower", R.drawable.module_ext_ic_thundershower ),
|
||||
ThundershowerWithHail( "05", "雷阵雨伴有冰雹", "Thundershower with hail", R.drawable.module_ext_ic_thundershower ),
|
||||
Sleet( "06", "雨夹雪", "Sleet", R.drawable.module_ext_ic_snow ),
|
||||
LightRain( "07", "小雨", "Light rain", R.drawable.module_ext_ic_light_rain ),
|
||||
ModerateRain( "08", "中雨", "Moderate rain", R.drawable.module_ext_ic_light_rain ),
|
||||
HeavyRain( "09", "大雨", "Heavy rain", R.drawable.module_ext_ic_heavy_rain ),
|
||||
Storm( "10", "暴雨", "Storm", R.drawable.module_ext_ic_heavy_rain ),
|
||||
HeavyStorm( "11", "大暴雨", "Heavy storm", R.drawable.module_ext_ic_heavy_rain ),
|
||||
SevereStorm( "12", "特大暴雨", "Severe storm", R.drawable.module_ext_ic_severe_storm ),
|
||||
|
||||
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 ),
|
||||
SnowFlurry( "13", "阵雪", "Snow flurry", R.drawable.module_ext_ic_snow ),
|
||||
LightSnow( "14", "小雪", "Light snow", R.drawable.module_ext_ic_snow ),
|
||||
ModerateSnow( "15", "中雪", "Moderate snow", R.drawable.module_ext_ic_snow ),
|
||||
HeavySnow( "16", "大雪", "Heavy snow", R.drawable.module_ext_ic_snow ),
|
||||
Snowstorm( "17", "暴雪", "Snowstorm", R.drawable.module_ext_ic_snow ),
|
||||
|
||||
Foggy( "18", "雾", "Foggy", R.drawable.ic_fog ),
|
||||
IceRain( "19", "冻雨", "Ice rain", R.drawable.ic_heavy_rain ),
|
||||
Duststorm( "20", "沙尘暴", "Duststorm", R.drawable.ic_duststorm ),
|
||||
Foggy( "18", "雾", "Foggy", R.drawable.module_ext_ic_fog ),
|
||||
IceRain( "19", "冻雨", "Ice rain", R.drawable.module_ext_ic_heavy_rain ),
|
||||
Duststorm( "20", "沙尘暴", "Duststorm", R.drawable.module_ext_ic_duststorm ),
|
||||
|
||||
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 ),
|
||||
LightToModerateRain( "21", "小到中雨", "Light to moderate rain", R.drawable.module_ext_ic_moderate_rain ),
|
||||
ModerateToHeavyRain( "22", "中到大雨", "Moderate to heavy rain", R.drawable.module_ext_ic_heavy_rain ),
|
||||
HeavyRainToStorm( "23", "大到大雨", "Heavy rain to storm", R.drawable.module_ext_ic_heavy_rain ),
|
||||
StormToHeavyStorm( "24", "暴雨到大暴雨", "Storm to heavy storm", R.drawable.module_ext_ic_severe_storm ),
|
||||
HeavyToSevereStorm( "25", "大暴雨到特大暴雨", "Heavy to severe storm", R.drawable.module_ext_ic_severe_storm ),
|
||||
|
||||
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 ),
|
||||
LightToModerateSnow( "26", "小到中雪", "Light to moderate snow", R.drawable.module_ext_ic_snow ),
|
||||
ModerateToHeavySnow( "27", "中到大雪", "Moderate to heavy snow", R.drawable.module_ext_ic_snow ),
|
||||
HeavySnowToSnowStorm( "28", "大到暴雪", "Heavy snow to snowstorm", R.drawable.module_ext_ic_snow ),
|
||||
|
||||
Dust( "29", "浮尘", "Dust", R.drawable.ic_dust_sand ),
|
||||
Sand( "30", "扬沙", "Sand", R.drawable.ic_dust_sand ),
|
||||
SandStorm( "31", "强沙尘暴", "Sandstorm", R.drawable.ic_duststorm ),
|
||||
Dust( "29", "浮尘", "Dust", R.drawable.module_ext_ic_dust_sand ),
|
||||
Sand( "30", "扬沙", "Sand", R.drawable.module_ext_ic_dust_sand ),
|
||||
SandStorm( "31", "强沙尘暴", "Sandstorm", R.drawable.module_ext_ic_duststorm ),
|
||||
|
||||
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 ),
|
||||
Densefog( "32", "浓雾", "Dense fog", R.drawable.module_ext_ic_fog ),
|
||||
StrongFog( "49", "强浓雾", "Strong fog", R.drawable.module_ext_ic_fog ),
|
||||
DenseFog( "57", "大雾", "Dense fog", R.drawable.module_ext_ic_fog ),
|
||||
ExtraHeavyFog( "58", "特强浓雾", "Extra heavy fog", R.drawable.module_ext_ic_fog ),
|
||||
|
||||
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 ),
|
||||
Haze( "53", "霾", "Haze", R.drawable.module_ext_ic_haze ),
|
||||
ModerateHaze( "54", "中度霾", "Moderate haze", R.drawable.module_ext_ic_haze ),
|
||||
Severehaze( "55", "重度霾", "Severe haze", R.drawable.module_ext_ic_haze ),
|
||||
SevereHaze( "56", "严重霾", "Severe haze", R.drawable.module_ext_ic_haze ),
|
||||
|
||||
Unknown( "99", "无", "Unknown", R.drawable.ic_unknown ),
|
||||
Unknown( "99", "无", "Unknown", R.drawable.module_ext_ic_unknown ),
|
||||
|
||||
Rain( "301", "雨", "rain", R.drawable.ic_heavy_rain ),
|
||||
Snow( "302", "雪", "snow", R.drawable.ic_snow );
|
||||
Rain( "301", "雨", "rain", R.drawable.module_ext_ic_heavy_rain ),
|
||||
Snow( "302", "雪", "snow", R.drawable.module_ext_ic_snow );
|
||||
|
||||
public final String id;
|
||||
public final String nameCn;
|
||||
|
||||
|
Before Width: | Height: | Size: 510 B After Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 454 B |
|
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 268 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 408 B |
|
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
|
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 541 B |
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 521 B |
|
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 534 B |
|
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 464 B |
|
Before Width: | Height: | Size: 988 B After Width: | Height: | Size: 988 B |
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 551 B |
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
|
Before Width: | Height: | Size: 934 B After Width: | Height: | Size: 934 B |
|
Before Width: | Height: | Size: 801 B After Width: | Height: | Size: 801 B |
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 929 B After Width: | Height: | Size: 929 B |
|
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 987 B |
|
Before Width: | Height: | Size: 967 B After Width: | Height: | Size: 967 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 913 B After Width: | Height: | Size: 913 B |
|
Before Width: | Height: | Size: 772 B After Width: | Height: | Size: 772 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 906 B After Width: | Height: | Size: 906 B |
@@ -59,7 +59,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/module_ext_weather_marginRight"
|
||||
android:gravity="bottom"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/module_ext_id_date"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- module_ext_layout_entrance.xml-->
|
||||
<dimen name="module_ext_search_height">58px</dimen>
|
||||
<dimen name="module_ext_search_marginLeft">18px</dimen>
|
||||
<dimen name="module_ext_search_marginTop">8px</dimen>
|
||||
<dimen name="module_ext_search_marginTop">1px</dimen>
|
||||
<dimen name="module_ext_search_drawablePadding">11.2px</dimen>
|
||||
<dimen name="module_ext_search_paddingLeft">10.8px</dimen>
|
||||
<dimen name="module_ext_search_paddingRight">17px</dimen>
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<dimen name="module_ext_common_address_height">58px</dimen>
|
||||
<dimen name="module_ext_common_address_marginLeft">19px</dimen>
|
||||
<dimen name="module_ext_common_address_marginTop">8px</dimen>
|
||||
<dimen name="module_ext_common_address_marginTop">1px</dimen>
|
||||
<dimen name="module_ext_common_address_home_width">64.2px</dimen>
|
||||
<dimen name="module_ext_common_address_home_height">58px</dimen>
|
||||
<dimen name="module_ext_common_address_divider_width">1px</dimen>
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
<dimen name="module_ext_speed_limit_width">96px</dimen>
|
||||
<dimen name="module_ext_speed_limit_height">96px</dimen>
|
||||
<dimen name="module_ext_speed_limit_marginTop">8px</dimen>
|
||||
<dimen name="module_ext_speed_limit_marginTop">1px</dimen>
|
||||
<dimen name="module_ext_speed_limit_marginRight">32px</dimen>
|
||||
<dimen name="module_ext_speed_limit_value_textSize">32px</dimen>
|
||||
<dimen name="module_ext_speed_limit_unit_textSize">15px</dimen>
|
||||
|
||||
<dimen name="module_ext_navi_panel_marginLeft">20px</dimen>
|
||||
<dimen name="module_ext_navi_panel_marginTop">8px</dimen>
|
||||
<dimen name="module_ext_navi_panel_marginTop">1px</dimen>
|
||||
|
||||
<dimen name="module_ext_operation_panel_width">58px</dimen>
|
||||
<dimen name="module_ext_operation_panel_marginRight">20px</dimen>
|
||||
@@ -53,7 +53,7 @@
|
||||
<dimen name="module_ext_navi_exit_textSize">22px</dimen>
|
||||
|
||||
<!-- module_ext_layout_extensions.xml-->
|
||||
<dimen name="module_ext_height">640px</dimen>
|
||||
<dimen name="module_ext_height">64px</dimen>
|
||||
<dimen name="module_ext_paddingRight">32px</dimen>
|
||||
<dimen name="module_ext_paddingLeft">32px</dimen>
|
||||
<dimen name="module_ext_voice_icon_width">64px</dimen>
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.mogo.module.main.R;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
|
||||
public class VerticalStackTransformer extends VerticalBaseTransformer {
|
||||
@@ -14,6 +15,8 @@ public class VerticalStackTransformer extends VerticalBaseTransformer {
|
||||
|
||||
public VerticalStackTransformer( Context context ) {
|
||||
this.context = context;
|
||||
spaceBetweenFirAndSecHeight = context.getResources().getDimensionPixelSize( R.dimen.module_main_card_card_shadow_height_div );
|
||||
spaceBetweenFirAndSecWith = context.getResources().getDimensionPixelSize( R.dimen.module_main_card_card_shadow_width_div );
|
||||
}
|
||||
|
||||
public VerticalStackTransformer( Context context, int spaceBetweenFirAndSecWith, int spaceBetweenFirAndSecHeight ) {
|
||||
@@ -30,7 +33,7 @@ public class VerticalStackTransformer extends VerticalBaseTransformer {
|
||||
//控制停止滑动切换的时候,只有最上面的一张卡片可以点击
|
||||
page.setClickable( true );
|
||||
} else {
|
||||
float scale = ( float ) ( page.getWidth() - WindowUtils.dip2px( context, spaceBetweenFirAndSecWith * position ) ) / ( float ) ( page.getWidth() );
|
||||
float scale = ( float ) ( page.getWidth() - spaceBetweenFirAndSecWith * position ) / ( float ) ( page.getWidth() );
|
||||
//控制下面卡片的可见度
|
||||
page.setAlpha( 1.0f );
|
||||
//控制停止滑动切换的时候,只有最上面的一张卡片可以点击
|
||||
@@ -39,7 +42,7 @@ public class VerticalStackTransformer extends VerticalBaseTransformer {
|
||||
page.setPivotY( page.getHeight() / 2f );
|
||||
page.setScaleX( scale );
|
||||
page.setScaleY( scale );
|
||||
page.setTranslationY( -page.getHeight() * position + ( page.getHeight() * 0.5f ) * ( 1 - scale ) + WindowUtils.dip2px( context, spaceBetweenFirAndSecHeight ) * position );
|
||||
page.setTranslationY( -page.getHeight() * position + ( page.getHeight() * 0.5f ) * ( 1 - scale ) + spaceBetweenFirAndSecHeight * position );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/module_main_card_container_marginTop">
|
||||
android:layout_marginTop="@dimen/module_main_card_container_marginTop"
|
||||
android:layout_height="match_parent">
|
||||
<!-- 卡片-->
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/module_main_card_container_width"
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- module_main_activity_main.xml-->
|
||||
<dimen name="module_main_map_shadow_frame_width">720px</dimen>
|
||||
<dimen name="module_main_card_container_marginTop">10px</dimen>
|
||||
<dimen name="module_main_card_container_width">660px</dimen>
|
||||
<dimen name="module_main_card_container_marginLeft">60px</dimen>
|
||||
<dimen name="module_main_card_container_marginBottom">211px</dimen>
|
||||
<dimen name="module_main_card_container_paddingBottom">20px</dimen>
|
||||
<dimen name="module_main_map_shadow_frame_width">384px</dimen>
|
||||
<dimen name="module_main_card_container_marginTop">8px</dimen>
|
||||
<dimen name="module_main_card_container_width">352px</dimen>
|
||||
<dimen name="module_main_card_container_marginLeft">32px</dimen>
|
||||
<dimen name="module_main_card_container_marginBottom">140.5px</dimen>
|
||||
<dimen name="module_main_card_container_paddingBottom">18px</dimen>
|
||||
<dimen name="module_main_card_card_shadow_width_div">20px</dimen>
|
||||
<dimen name="module_main_card_card_shadow_height_div">10px</dimen>
|
||||
</resources>
|
||||
@@ -6,5 +6,7 @@
|
||||
<dimen name="module_main_card_container_width">660px</dimen>
|
||||
<dimen name="module_main_card_container_marginLeft">60px</dimen>
|
||||
<dimen name="module_main_card_container_marginBottom">211px</dimen>
|
||||
<dimen name="module_main_card_container_paddingBottom">20px</dimen>
|
||||
<dimen name="module_main_card_container_paddingBottom">30px</dimen>
|
||||
<dimen name="module_main_card_card_shadow_width_div">30px</dimen>
|
||||
<dimen name="module_main_card_card_shadow_height_div">15px</dimen>
|
||||
</resources>
|
||||
@@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- module_main_activity_main.xml-->
|
||||
<dimen name="module_main_map_shadow_frame_width">384px</dimen>
|
||||
<dimen name="module_main_card_container_marginTop">8px</dimen>
|
||||
<dimen name="module_main_card_container_width">352px</dimen>
|
||||
<dimen name="module_main_card_container_marginLeft">32px</dimen>
|
||||
<dimen name="module_main_card_container_marginBottom">140.5px</dimen>
|
||||
<dimen name="module_main_card_container_paddingBottom">20px</dimen>
|
||||
<dimen name="module_main_map_shadow_frame_width">720px</dimen>
|
||||
<dimen name="module_main_card_container_marginTop">10px</dimen>
|
||||
<dimen name="module_main_card_container_width">660px</dimen>
|
||||
<dimen name="module_main_card_container_marginLeft">60px</dimen>
|
||||
<dimen name="module_main_card_container_marginBottom">211px</dimen>
|
||||
<dimen name="module_main_card_container_paddingBottom">30px</dimen>
|
||||
<dimen name="module_main_card_card_shadow_width_div">30px</dimen>
|
||||
<dimen name="module_main_card_card_shadow_height_div">15px</dimen>
|
||||
</resources>
|
||||
@@ -77,3 +77,5 @@ dependencies {
|
||||
}
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
GROUP=com.mogo.module
|
||||
POM_ARTIFACT_ID=module-navi
|
||||
POM_ARTIFACT_ID=module-search
|
||||
VERSION_CODE=1
|
||||
|
||||
@@ -466,7 +466,7 @@ public class MogoServiceProvider implements IMogoModuleProvider,
|
||||
}
|
||||
Logger.d( TAG, mAutoRefreshCallback == callback ? "触发自动刷新" : "触发手动刷新" );
|
||||
Logger.i( TAG, "刷新半径 = %d, 点 = %s", radius, latLng );
|
||||
mRefreshModel.refreshData( latLng, radius, callback );
|
||||
mRefreshModel.refreshData( latLng, radius, mLastZoomLevel >= 10 ? 5 : 10, callback );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,7 +52,7 @@ public class RefreshModel {
|
||||
}
|
||||
}
|
||||
|
||||
public void refreshData(MogoLatLng latLng, int radius, final RefreshCallback callback) {
|
||||
public void refreshData(MogoLatLng latLng, int radius, int limit, final RefreshCallback callback) {
|
||||
if (mRefreshApiService != null) {
|
||||
final Map<String, Object> query = new ParamsProvider.Builder(mContext).build();
|
||||
final RefreshBody refreshBody = new RefreshBody();
|
||||
|
||||