Merge remote-tracking branch 'origin/feature/v1.0.0' into feature/v1.0.0
2
.idea/misc.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -7,6 +7,7 @@ import java.util.List;
|
||||
@SuppressWarnings("unused")
|
||||
public class MarkerCardResult implements Serializable {
|
||||
|
||||
private List<String> dataType; // 要查询的类型
|
||||
private List<MarkerCarChat> carChat;
|
||||
private List<MarkerExploreWay> exploreWay;
|
||||
private List<MarkerOnlineCar> onlineCar;
|
||||
@@ -53,10 +54,19 @@ public class MarkerCardResult implements Serializable {
|
||||
this.noveltyInfo = noveltyInfo;
|
||||
}
|
||||
|
||||
public List<String> getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(List<String> dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MarkerCardResult{" +
|
||||
"carChat=" + carChat +
|
||||
"dataType=" + dataType +
|
||||
", carChat=" + carChat +
|
||||
", exploreWay=" + exploreWay +
|
||||
", onlineCar=" + onlineCar +
|
||||
", shareMusic=" + shareMusic +
|
||||
|
||||
@@ -265,14 +265,25 @@ public class MarkerServiceHandler {
|
||||
*/
|
||||
public static void drawMapMarker(MarkerResponse response) {
|
||||
lastMarker = null;
|
||||
getMarkerManager().removeMarkers();
|
||||
|
||||
JSONArray array = new JSONArray();
|
||||
|
||||
// 解析不同的Marker类型,然后对应的进行绘制
|
||||
if (response != null && response.getResult() != null) {
|
||||
|
||||
MarkerCardResult markerCardResult = response.getResult();
|
||||
|
||||
// 语音触发的在线车辆搜索,采用增量的形式绘制
|
||||
if (markerCardResult.getDataType() != null &&
|
||||
markerCardResult.getDataType().size() == 1 &&
|
||||
markerCardResult.getDataType().contains(ServiceConst.CARD_TYPE_USER_DATA)) {
|
||||
getMarkerManager().removeMarkers(ServiceConst.CARD_TYPE_USER_DATA);
|
||||
getMogoCardManager().switch2(ServiceConst.CARD_TYPE_USER_DATA);
|
||||
} else {
|
||||
// 清空所有地图上绘制的Marker
|
||||
getMarkerManager().removeMarkers();
|
||||
}
|
||||
|
||||
List<MarkerCarChat> carChatList = markerCardResult.getCarChat();
|
||||
List<MarkerOnlineCar> onlineCarList = markerCardResult.getOnlineCar();
|
||||
List<MarkerExploreWay> exploreWayList = markerCardResult.getExploreWay();
|
||||
@@ -379,26 +390,26 @@ public class MarkerServiceHandler {
|
||||
break;
|
||||
}
|
||||
}
|
||||
fillNumberTrackEventBody(array,2, num_gas_station);
|
||||
fillNumberTrackEventBody(array,6, num_road_closed);
|
||||
fillNumberTrackEventBody(array,5, num_traffic_check);
|
||||
fillNumberTrackEventBody(array,7, num_shop_discount);
|
||||
fillNumberTrackEventBody(array,8, num_fours_shop);
|
||||
fillNumberTrackEventBody(array, 2, num_gas_station);
|
||||
fillNumberTrackEventBody(array, 6, num_road_closed);
|
||||
fillNumberTrackEventBody(array, 5, num_traffic_check);
|
||||
fillNumberTrackEventBody(array, 7, num_shop_discount);
|
||||
fillNumberTrackEventBody(array, 8, num_fours_shop);
|
||||
}
|
||||
analyticData(array);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void fillNumberTrackEventBody(JSONArray arr, int type, int size){
|
||||
JSONObject object = new JSONObject( );
|
||||
private static void fillNumberTrackEventBody(JSONArray arr, int type, int size) {
|
||||
JSONObject object = new JSONObject();
|
||||
try {
|
||||
object.put( "type", type );
|
||||
object.put( "num", size);
|
||||
if ( arr != null ) {
|
||||
arr.put( object );
|
||||
object.put("type", type);
|
||||
object.put("num", size);
|
||||
if (arr != null) {
|
||||
arr.put(object);
|
||||
}
|
||||
} catch ( JSONException e ) {
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -406,11 +417,11 @@ public class MarkerServiceHandler {
|
||||
/**
|
||||
* 统计地图内数据获取
|
||||
*
|
||||
* @param array 埋点数据
|
||||
* @param array 埋点数据
|
||||
*/
|
||||
private static void analyticData(JSONArray array) {
|
||||
try {
|
||||
if ( array == null || array.length() == 0 ) {
|
||||
if (array == null || array.length() == 0) {
|
||||
return;
|
||||
}
|
||||
final Map<String, Object> properties = new HashMap<>();
|
||||
@@ -432,8 +443,8 @@ public class MarkerServiceHandler {
|
||||
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.owner(markerShowEntity.getMarkerType())
|
||||
.alpha( 0.7f )
|
||||
.object( markerShowEntity )
|
||||
.alpha(0.7f)
|
||||
.object(markerShowEntity)
|
||||
.latitude(markerShowEntity.getMarkerLocation().getLat())
|
||||
.longitude(markerShowEntity.getMarkerLocation().getLon());
|
||||
options.icon(markerView);
|
||||
|
||||
@@ -30,13 +30,13 @@ public class LaucherShareDialog extends Dialog implements View.OnClickListener {
|
||||
|
||||
|
||||
public LaucherShareDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
super(context, R.style.BottomDialog);
|
||||
this.mContext = context;
|
||||
getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
||||
}
|
||||
|
||||
public LaucherShareDialog(@NonNull Context context, int themeResId) {
|
||||
super(context, R.style.Theme_AppCompat_Dialog);
|
||||
super(context, R.style.BottomDialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_1300"
|
||||
android:layout_height="@dimen/dp_600"
|
||||
android:layout_width="@dimen/share_module_width"
|
||||
android:layout_height="@dimen/share_module_height"
|
||||
android:background="@drawable/shape_bg_222533_20px">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_share_title"
|
||||
android:layout_width="1300dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginTop="@dimen/dp_80"
|
||||
android:layout_marginTop="@dimen/share_module_title_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="一 我要分享 一"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_40" />
|
||||
android:textSize="@dimen/share_module_title_content" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/tu_block_layout"
|
||||
@@ -23,30 +23,30 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/btn_share_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_64">
|
||||
android:layout_marginTop="@dimen/share_module_margin_top">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_block_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_150">
|
||||
android:layout_marginLeft="@dimen/share_module_first_margin_left">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/block_up_iv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="@dimen/share_module_image_width"
|
||||
android:src="@drawable/share_block_up" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/block_up_tv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/block_up_iv"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="拥堵"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -54,25 +54,25 @@
|
||||
android:id="@+id/oil_price_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_120"
|
||||
android:layout_marginLeft="@dimen/share_module_margin_left"
|
||||
android:layout_toRightOf="@+id/btn_block_layout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/oil_price_iv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="@dimen/share_module_image_width"
|
||||
android:src="@drawable/share_oil_price" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/oil_price_tv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/oil_price_iv"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="油价"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -80,25 +80,25 @@
|
||||
android:id="@+id/traffic_check_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_120"
|
||||
android:layout_marginLeft="@dimen/share_module_margin_left"
|
||||
android:layout_toRightOf="@+id/oil_price_layout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/traffic_check_iv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="@dimen/share_module_image_width"
|
||||
android:src="@drawable/share_traffic_check" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/traffic_check_tv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/traffic_check_iv"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="交通检查"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -106,25 +106,25 @@
|
||||
android:id="@+id/road_closure_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_120"
|
||||
android:layout_marginLeft="@dimen/share_module_margin_left"
|
||||
android:layout_toRightOf="@+id/traffic_check_layout">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/road_closure_iv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_height="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="@dimen/share_module_image_width"
|
||||
android:src="@drawable/share_road_closure" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/road_closure_tv"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_width="@dimen/share_module_image_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/road_closure_iv"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/share_module_tv_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="封路"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_32"
|
||||
android:textSize="@dimen/share_module_item"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -133,11 +133,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/btn_block_layout"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:layout_marginTop="@dimen/share_module_bottom_margin_top"
|
||||
android:gravity="center"
|
||||
android:text="可以对小智说:分享拥堵、分享油价、分享查车、分享封路"
|
||||
android:textColor="@color/white_40"
|
||||
android:textSize="@dimen/dp_28"
|
||||
android:textSize="@dimen/share_module_bottom_size"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="share_module_width">693px</dimen>
|
||||
<dimen name="share_module_height">320px</dimen>
|
||||
<dimen name="share_module_margin_top">34px</dimen>
|
||||
<dimen name="share_module_title_margin_top">43px</dimen>
|
||||
<dimen name="share_module_first_margin_left">80px</dimen>
|
||||
<dimen name="share_module_margin_left">64px</dimen>
|
||||
<dimen name="share_module_tv_margin_top">15px</dimen>
|
||||
<dimen name="share_module_image_width">85px</dimen>
|
||||
<dimen name="share_module_bottom_margin_top">28px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="share_module_title_content">22px</dimen>
|
||||
<dimen name="share_module_item">18px</dimen>
|
||||
<dimen name="share_module_bottom_size">15px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="share_module_width">1300px</dimen>
|
||||
<dimen name="share_module_height">600px</dimen>
|
||||
<dimen name="share_module_margin_top">64px</dimen>
|
||||
<dimen name="share_module_title_margin_top">80px</dimen>
|
||||
<dimen name="share_module_first_margin_left">150px</dimen>
|
||||
<dimen name="share_module_margin_left">120px</dimen>
|
||||
<dimen name="share_module_tv_margin_top">30px</dimen>
|
||||
<dimen name="share_module_image_width">160px</dimen>
|
||||
<dimen name="share_module_bottom_margin_top">55px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="share_module_title_content">40px</dimen>
|
||||
<dimen name="share_module_item">32px</dimen>
|
||||
<dimen name="share_module_bottom_size">28px</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
@@ -16,5 +16,6 @@
|
||||
<color name="color_666666">#666666</color>
|
||||
<color name="color_999999">#999999</color>
|
||||
<color name="color_000000">#000000</color>
|
||||
<color name="all_transparent_white">#00FFFFFF</color>
|
||||
|
||||
</resources>
|
||||
|
||||
20
modules/mogo-module-share/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="share_module_width">1300px</dimen>
|
||||
<dimen name="share_module_height">600px</dimen>
|
||||
<dimen name="share_module_margin_top">64px</dimen>
|
||||
<dimen name="share_module_title_margin_top">80px</dimen>
|
||||
<dimen name="share_module_first_margin_left">150px</dimen>
|
||||
<dimen name="share_module_margin_left">120px</dimen>
|
||||
<dimen name="share_module_tv_margin_top">30px</dimen>
|
||||
<dimen name="share_module_image_width">160px</dimen>
|
||||
<dimen name="share_module_bottom_margin_top">55px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="share_module_title_content">40px</dimen>
|
||||
<dimen name="share_module_item">32px</dimen>
|
||||
<dimen name="share_module_bottom_size">28px</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||
16
modules/mogo-module-share/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="BottomDialog" parent="AlertDialog.AppCompat">
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:fullBright">@color/all_transparent_white</item>
|
||||
<item name="android:fullDark">@color/all_transparent_white</item>
|
||||
<item name="android:topBright">@color/all_transparent_white</item>
|
||||
<item name="android:topDark">@color/all_transparent_white</item>
|
||||
<item name="android:borderlessButtonStyle">@color/all_transparent_white</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -244,7 +244,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
longit = latLon.getLongitude();
|
||||
lat = latLon.getLatitude();
|
||||
}
|
||||
Log.d(TAG, "geoSearch keywords =" + mKeywords + ">>longitude= " + longit + "--latitude" + lat);
|
||||
Log.d(TAG, "geoSearch keywords =" + mKeywords + ">>longitude= " + longit + "--latitude= " + lat);
|
||||
getVoiceControlRoadData(mKeywords, lat, longit);
|
||||
} else {
|
||||
String cityCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getCityCode();
|
||||
@@ -258,7 +258,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
if (p0.getPois() != null && p0.getPois().size() != 0) {
|
||||
PoiItem poi = p0.getPois().get(0);
|
||||
LatLonPoint latLon = poi.getLatLonPoint();
|
||||
|
||||
Double longit; //经度
|
||||
Double lat; //维度
|
||||
if (mKeywords.equals("附近")) {
|
||||
@@ -356,48 +355,56 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
mMogoRegisterCenter.registerMogoMarkerClickListener(TanluConstants.MODEL_NAME, new IMogoMarkerClickListener() {
|
||||
@Override
|
||||
public boolean onMarkerClicked(IMogoMarker marker) {
|
||||
//点击marker以后,确认他的位置?然后点击下一个操作
|
||||
mEmptyLayout.setVisibility(View.GONE);
|
||||
mRootLayout.setVisibility(View.VISIBLE);
|
||||
|
||||
Log.d(TAG, "onMarkerClicked registerMogoMarkerClickListener --1---- ");
|
||||
MarkerExploreWay exploreWay = extractFromMarker(marker);
|
||||
if (exploreWay == null) {
|
||||
Log.e(TAG, "onMarkerClicked registerMogoMarkerClickListener --2---- ");
|
||||
return false;
|
||||
}
|
||||
|
||||
//TODO 自己打的点,需要重新组装新数据,清理老的
|
||||
if (exploreWay.getFileType() == 0) { //图片
|
||||
refreshPhotoData(exploreWay);
|
||||
} else if (exploreWay.getFileType() == 1) { //视频
|
||||
handleData(exploreWay);
|
||||
}
|
||||
|
||||
Log.d(TAG, "onMarkerClicked registerMogoMarkerClickListener --3----size() = " + markerExploreWayList.size());
|
||||
|
||||
//更新位置currentPosition
|
||||
for (int i = 0; i < markerExploreWayList.size(); i++) {
|
||||
if (markerExploreWayList.get(i) == exploreWay) {
|
||||
currentPosition = i;
|
||||
break;
|
||||
if (exploreWay == null) { // 自己打点数据
|
||||
double lat = marker.getPosition().lat;
|
||||
//更新当前位置
|
||||
for (int i = 0; i < markerExploreWayList.size(); i++) {
|
||||
if (markerExploreWayList.get(i).getLocation().getLat() == lat) {
|
||||
currentPosition = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Logger.d(TAG, "onMarkerClicked currentPosition = " + currentPosition);
|
||||
Log.d(TAG, "onMarkerClicked 自己打点数据 currentPosition = " + currentPosition);
|
||||
handleMarkerExploreWay(markerExploreWayList.get(currentPosition));
|
||||
} else { //大而全数据
|
||||
double lat = exploreWay.getLocation().getLat();
|
||||
for (int i = 0; i < markerExploreWayList.size(); i++) {
|
||||
if (markerExploreWayList.get(i).getLocation().getLat() == lat) {
|
||||
currentPosition = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "onMarkerClicked 大而全数据 currentPosition = " + currentPosition);
|
||||
handleMarkerExploreWay(exploreWay);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void handleMarkerExploreWay(MarkerExploreWay markerExploreWay) {
|
||||
if (markerExploreWay != null) {
|
||||
if (markerExploreWay.getFileType() == 0) { //图片
|
||||
refreshPhotoData(markerExploreWay);
|
||||
} else if (markerExploreWay.getFileType() == 1) { //视频
|
||||
handleData(markerExploreWay);
|
||||
}
|
||||
} else {
|
||||
Log.e(TAG, "handleMarkerExploreWay == null");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理关键词搜索
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private void handleActionFoo(String keywords) {
|
||||
Logger.d(TAG, "handleActionFoo keywords = " + keywords);
|
||||
Log.d(TAG, "handleActionFoo keywords = " + keywords);
|
||||
speakSearchingVoice();
|
||||
GeocodeQuery geocodeQuery;
|
||||
String cityCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getCityCode();
|
||||
@@ -411,7 +418,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
* 注册listener监听
|
||||
*/
|
||||
private void initListener() {
|
||||
//唤醒
|
||||
mogoIntentManager.registerIntentListener(TanluConstants.UPLOAD_ROAD_CONDITION, mogoIntentListener);
|
||||
mogoIntentManager.registerIntentListener(TanluConstants.SPECIFIEDROAD_SEARCH, mogoIntentListener);
|
||||
mogoIntentManager.registerIntentListener(TanluConstants.SHARE_ROAD_CLOSURE, mogoIntentListener);
|
||||
@@ -419,6 +425,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
mogoIntentManager.registerIntentListener(TanluConstants.GO_TO_SHARE, mogoIntentListener);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 唤醒语音
|
||||
*/
|
||||
@@ -461,7 +468,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
private IMogoVoiceCmdCallBack mogoVoiceListener = new IMogoVoiceCmdCallBack() {
|
||||
@Override
|
||||
public void onCmdSelected(String cmd) {
|
||||
Logger.d(TAG, "免唤醒 onCmdSelected mogoVoiceListener cmd =" + cmd);
|
||||
if (cmd.equals(TanluConstants.PLAY_VIDEO)) { //播放路况 --ok
|
||||
FullMediaActivity.Companion.launch(getActivity(), mVideoUrl, mImageUrl, mTitle, mGenerateTime);
|
||||
}
|
||||
@@ -506,6 +512,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
return ((MarkerExploreWay) showEntity.getBindObj());
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -518,28 +525,28 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
int id = view.getId();
|
||||
if (id == R.id.tv_previous_res) { //上一个
|
||||
//判断是图片还是视频,第一个时,上一个不可点击
|
||||
Logger.d(TAG, " tv_previous_res --1-> currentPosition =" + currentPosition + ">> size= " + markerExploreWayList.size());
|
||||
Log.e(TAG, " tv_previous_res --1-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size());
|
||||
if (currentPosition < 0) {
|
||||
return;
|
||||
// return;
|
||||
currentPosition = markerExploreWayList.size();
|
||||
}
|
||||
currentPosition--;
|
||||
Logger.d(TAG, " tv_previous_res --2-> currentPosition =" + currentPosition + ">> size= " + markerExploreWayList.size());
|
||||
Log.d(TAG, " tv_previous_res --2-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size());
|
||||
if (markerExploreWayList.size() > currentPosition && currentPosition >= 0) {
|
||||
handleData(markerExploreWayList.get(currentPosition));
|
||||
}
|
||||
|
||||
} else if (id == R.id.tv_next_res) { //下一个
|
||||
//判断是图片还是视频,最后一个时,下一个不可点击
|
||||
Logger.d(TAG, " tv_next_res --1-> currentPosition =" + currentPosition + ">> size= " + markerExploreWayList.size());
|
||||
if (currentPosition > markerExploreWayList.size()) {
|
||||
return;
|
||||
Log.e(TAG, " tv_next_res --1-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size());
|
||||
if (currentPosition >= markerExploreWayList.size()) {
|
||||
// return;
|
||||
currentPosition = 0;
|
||||
}
|
||||
currentPosition++;
|
||||
Logger.d(TAG, " tv_next_res --2-> currentPosition =" + currentPosition + ">> size= " + markerExploreWayList.size());
|
||||
Log.d(TAG, " tv_next_res --2-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size());
|
||||
if (markerExploreWayList.size() > currentPosition) {
|
||||
handleData(markerExploreWayList.get(currentPosition));
|
||||
}
|
||||
|
||||
} else if (id == R.id.tv_main_empty) { //上报路况
|
||||
sendShareReceiver("1");
|
||||
}
|
||||
@@ -664,7 +671,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* TODO
|
||||
* C位事件,如何获取数据,需要有默认数据
|
||||
* 如果只有一个数据,不显示上下切换按钮,没有数据显示空页面
|
||||
*/
|
||||
@@ -801,13 +808,13 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onMarkerInfo(final MarkerInfo event) {
|
||||
Logger.d(TAG, "onMarkerInfo ------------>");
|
||||
Log.d(TAG, "onMarkerInfo ------------>");
|
||||
if (event == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String poiType = "";
|
||||
if (event.type.equals("1")) { //上报路况 TODO 修改探路
|
||||
if (event.type.equals("1")) { //上报路况
|
||||
mMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up);
|
||||
} else if (event.type.equals("2")) { //交通检查 10002
|
||||
poiType = "10002";
|
||||
@@ -819,13 +826,13 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
mMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up);
|
||||
}
|
||||
|
||||
Logger.d(TAG, "onMarkerInfo share onCompleted ------>");
|
||||
Log.d(TAG, "onMarkerInfo share onCompleted ------>");
|
||||
MogoMarkerOptions options = new MogoMarkerOptions()
|
||||
.icon(mMarkerIcon)
|
||||
.latitude(event.lat)
|
||||
.owner(TanluConstants.MODEL_NAME)
|
||||
.longitude(event.lon);
|
||||
IMogoMarker marker = mMarkerManager.addMarker("share_tag", options); //随便传tag,不可点击
|
||||
mMarkerManager.addMarker("share_tag", options); //随便传tag,不可点击
|
||||
//请求分享接口
|
||||
MarkerExploreWay markerExploreWay = markerExploreWayList.get(0);
|
||||
if (markerExploreWay.getUserInfo() != null) {
|
||||
@@ -989,7 +996,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
@Override
|
||||
public void onSuccess(VoiceSearchResult o) {
|
||||
String discription = o.getResult().getDescription();
|
||||
Logger.d(TAG, "getVoiceControlRoadData discription = " + discription);
|
||||
if (o.getResult().getInformations() != null && o.getResult().getInformations().size() > 0) {
|
||||
if (markerExploreWayList != null && markerExploreWayList.size() > 0) {
|
||||
markerExploreWayList.clear(); //刷新之前先删除之前的,然后再添加成请求的
|
||||
@@ -1015,7 +1021,6 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
for (int i = 0; i < informationList.size(); i++) {
|
||||
//根据type确定添加的图片
|
||||
String trafficType = informationList.get(i).trafficInfoType;
|
||||
Log.e(TAG, "trafficType =" + trafficType);
|
||||
if (trafficType.equals("traffic_jam")) { //拥堵
|
||||
multiMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up);
|
||||
} else if (trafficType.equals("car_checking")) { //查车
|
||||
@@ -1059,7 +1064,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
* 将探路的数据结构转换成 MarkerExploreWay的列表
|
||||
*/
|
||||
private void convertData(List<Information> informations) {
|
||||
for (int i = 0 ; i < informations.size(); i++) {
|
||||
for (int i = 0; i < informations.size(); i++) {
|
||||
MarkerExploreWay markerExploreWay = new MarkerExploreWay();
|
||||
markerExploreWay.setAddr(informations.get(i).addr);
|
||||
markerExploreWay.setCityName(informations.get(i).cityName);
|
||||
@@ -1076,6 +1081,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
|
||||
|
||||
/**
|
||||
* 转换媒体数据
|
||||
*
|
||||
* @param items
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.mogo.module.tanlu.receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.module.tanlu.model.event.VoiceRoadInfo
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
/**
|
||||
* xx堵不堵,接收关键字,应该在哪里接收关键字请求接口?
|
||||
*/
|
||||
class RoadInfoReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
if (intent.action == "com.zhidao.roadcondition.roadinfo"){
|
||||
var keyWords = intent.getStringExtra("keywords")
|
||||
var city = intent.getStringExtra("city")
|
||||
Log.d("RoadInfoReceiver", "keyWords = $keyWords ---->city = $city")
|
||||
EventBus.getDefault().post(VoiceRoadInfo(keyWords, city))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 347 B |
|
Before Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 341 B |
|
Before Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 702 B |
|
Before Width: | Height: | Size: 910 B |
|
Before Width: | Height: | Size: 941 B |
|
Before Width: | Height: | Size: 865 B |
|
Before Width: | Height: | Size: 883 B |
|
Before Width: | Height: | Size: 949 B |
|
Before Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 742 B |
|
Before Width: | Height: | Size: 699 B |
|
Before Width: | Height: | Size: 712 B |
|
Before Width: | Height: | Size: 711 B |
|
Before Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 832 B |
|
Before Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 824 B |
|
Before Width: | Height: | Size: 942 B |
|
Before Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 601 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 393 B |
|
After Width: | Height: | Size: 385 B |
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 943 B After Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 708 B |
@@ -94,11 +94,11 @@
|
||||
android:layout_width="@dimen/tanlu_module_card_previous_width"
|
||||
android:layout_height="@dimen/tanlu_module_card_previous_height"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingLeft="@dimen/dp_40"
|
||||
android:paddingLeft="@dimen/tanlu_module_card_previous_margin_left"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:drawableLeft="@drawable/media_previous"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="@dimen/dp_40"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:text="@string/tanlu_previous"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/tanlu_module_card_next_size" />
|
||||
@@ -110,11 +110,12 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingRight="@dimen/dp_80"
|
||||
android:paddingLeft="@dimen/dp_70"
|
||||
android:paddingRight="@dimen/tanlu_module_card_next_margin_left"
|
||||
android:paddingLeft="@dimen/tanlu_module_card_next_margin_left"
|
||||
android:background="@drawable/shape_bg_222533"
|
||||
android:drawableRight="@drawable/media_next"
|
||||
android:gravity="center_vertical"
|
||||
android:drawablePadding="@dimen/dp_20"
|
||||
android:text="@string/tanlu_next"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/tanlu_module_card_next_size" />
|
||||
@@ -138,7 +139,7 @@
|
||||
android:layout_marginLeft="@dimen/tanlu_module_card_empty_maginleft"
|
||||
android:layout_marginRight="@dimen/tanlu_module_card_empty_maginleft"
|
||||
android:layout_marginTop="@dimen/tanlu_module_card_empty_magintop"
|
||||
android:src="@mipmap/main_view_empty_bg" />
|
||||
android:src="@drawable/main_view_empty_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_empty"
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB |
@@ -37,6 +37,8 @@
|
||||
<dimen name="tanlu_module_card_empty_magintop">65px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_maginleft">109px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop">28px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_margin_left">45px</dimen>
|
||||
<dimen name="tanlu_module_card_next_margin_left">45px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="tanlu_module_full_title_content">20px</dimen>
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
<dimen name="tanlu_module_card_empty_magintop">75px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_maginleft">205px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop">25px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_margin_left">90px</dimen>
|
||||
<dimen name="tanlu_module_card_next_margin_left">80px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="tanlu_module_full_title_content">38px</dimen>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<color name="color_A2A2A2">#A2A2A2</color>
|
||||
<color name="color_5a979797">#5a979797</color>
|
||||
<color name="half_transparent_white">#80FFFFFF</color>
|
||||
<color name="all_transparent_white">#00FFFFFF</color>
|
||||
<color name="color_b3000000">#b3000000</color>
|
||||
<color name="color_0DFFFFFF">#0DFFFFFF</color>
|
||||
<color name="color_000000">#000000</color>
|
||||
|
||||
54
modules/mogo-module-tanlu/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!--bottom top -->
|
||||
<dimen name="tanlu_module_start_width">106px</dimen>
|
||||
<dimen name="tanlu_module_start_height">106px</dimen>
|
||||
<dimen name="tanlu_module_loading_width">48px</dimen>
|
||||
<dimen name="tanlu_module_loading_height">48px</dimen>
|
||||
<dimen name="tanlu_module_bottom_height">72px</dimen>
|
||||
<dimen name="tanlu_module_bottom_margin">5px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_start_width">106px</dimen>
|
||||
<dimen name="tanlu_module_full_start_height">106px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_width">96px</dimen>
|
||||
<dimen name="tanlu_module_full_loading_height">96px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_height">144px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_width">760px</dimen>
|
||||
<dimen name="tanlu_module_full_bottom_margin">10px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_full_top_height">135px</dimen>
|
||||
<dimen name="tanlu_module_full_back_width">50px</dimen>
|
||||
<dimen name="tanlu_module_full_back_height">50px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_left">30px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_right">92px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_top">40px</dimen>
|
||||
<dimen name="tanlu_module_full_margin_width">800px</dimen>
|
||||
|
||||
<dimen name="tanlu_module_card_width">660px</dimen>
|
||||
<dimen name="tanlu_module_card_margin_left">24px</dimen>
|
||||
<dimen name="tanlu_module_card_address_margin_top">58px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_bottom">8px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_margin_top">2px</dimen>
|
||||
<dimen name="tanlu_module_card_video_width">613px</dimen>
|
||||
<dimen name="tanlu_module_card_video_height">355px</dimen>
|
||||
<dimen name="tanlu_module_card_video_marginbottom">20px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_width">300px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_height">90px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_magintop">75px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_maginleft">205px</dimen>
|
||||
<dimen name="tanlu_module_card_empty_tv_magintop">25px</dimen>
|
||||
<dimen name="tanlu_module_card_previous_margin_left">90px</dimen>
|
||||
<dimen name="tanlu_module_card_next_margin_left">80px</dimen>
|
||||
|
||||
<!--字体-->
|
||||
<dimen name="tanlu_module_full_title_content">38px</dimen>
|
||||
<dimen name="tanlu_module_full_title_time">26px</dimen>
|
||||
<dimen name="tanlu_module_card_address_size">34px</dimen>
|
||||
<dimen name="tanlu_module_card_distance_size">26px</dimen>
|
||||
<dimen name="tanlu_module_card_next_size">28px</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
|
||||