修改f/m 导航 周边事件 目的车友UI

This commit is contained in:
zhuangyan
2020-11-19 17:13:09 +08:00
parent 3019fcd7e4
commit 6a65e87be0
35 changed files with 123 additions and 56 deletions

View File

@@ -67,16 +67,16 @@ public abstract class BaseNaviInfoView {
protected String getFormatSurplusTime( int seconds ) {
if ( seconds > 60 * 60 ) {
mFormatSurplusTimeUnit = "h";
mFormatSurplusTimeUnit = "小时";
return String.format( "%.1f", ( ( float ) seconds ) / ( 60 * 60 ) );
}
if ( seconds > 60 ) {
mFormatSurplusTimeUnit = "min";
mFormatSurplusTimeUnit = "分钟";
return String.format( "%.1f", ( ( float ) seconds ) / 60 );
}
mFormatSurplusTimeUnit = "s";
mFormatSurplusTimeUnit = "";
return String.format( "%d", seconds );
}

View File

@@ -47,6 +47,7 @@ import com.mogo.module.service.launchercard.LauncherCardRefresher;
import com.mogo.module.service.marker.MapMarkerManager;
import com.mogo.module.service.network.RefreshCallback;
import com.mogo.module.service.network.RefreshModel;
import com.mogo.module.service.network.bean.TtsConfigEntity;
import com.mogo.module.service.ttsConfig.TtsConfigModleData;
import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushData;
import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushResponse;
@@ -332,10 +333,8 @@ public class MogoServices implements IMogoMapListener,
}
mIsMainPageFirstResume = false;
LauncherCardRefresher.getInstance(mContext).stop();
mTtsModle.playTts();
// playAppTts();
playAppTts();
} else {
unregisterInternalUnWakeupWords();
@@ -390,7 +389,7 @@ public class MogoServices implements IMogoMapListener,
if (DebugConfig.isLauncher()) {
return;
}
mTtsModle.playTts();
}
/**

View File

@@ -22,7 +22,6 @@ import com.mogo.module.service.MarkerServiceHandler;
import com.mogo.module.service.R;
import com.mogo.module.service.Utils;
import com.mogo.utils.ResourcesHelper;
import com.mogo.utils.WindowUtils;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.logger.Logger;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
@@ -67,7 +66,6 @@ class OnlineCarPanelAdapter extends RecyclerView.Adapter<OnlineCarPanelAdapter.V
public void onBindViewHolder(@NonNull OnlineCarPanelAdapter.VH holder, int position) {
holder.bind(mDatums.get(position), mToLon, mToLat);
holder.call.setOnClickListener(view -> {
//TODO 拨打电话
Map<String, String> params = new HashMap<>();
MarkerUserInfo userInfo = mDatums.get(position).getUserInfo();
params.put(CallChattingProviderConstant.CCPROVIDER_SN, userInfo.getSn());
@@ -123,11 +121,6 @@ class OnlineCarPanelAdapter extends RecyclerView.Adapter<OnlineCarPanelAdapter.V
Logger.e(TAG, e, "detail.OnClick");
}
});
// call.setOnClickListener(view -> {
// //TODO 拨打电话
//
//
// });
}
private String getDistanceStr(MarkerLocation location, double lon, double lat) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_pannel_call_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_pannel_call_nomal" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_pannel_call_nomal" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_pannel_call_pressed_light" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_pannel_call_nomal_light" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_pannel_call_nomal_light" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_pannel_detials_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_pannel_detials_nomal" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_pannel_detials_nomal" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_pannel_detials_pressed_light" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_pannel_detials_nomal_light" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_pannel_detials_nomal_light" />
</selector>

View File

@@ -57,12 +57,11 @@
<TextView
android:id="@+id/module_services_id_panel_item_call"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:background="@drawable/module_services_panel_item_detail_bkg"
android:layout_width="@dimen/modle_car_panel_call"
android:layout_height="@dimen/modle_car_panel_call"
android:layout_marginEnd="@dimen/modle_car_panel_call_margin"
android:background="@drawable/selector_service_car_pannel_call"
android:padding="@dimen/module_services_panel_item_detail_padding"
android:text="@string/module_services_panel_item_call"
android:textColor="@color/module_services_panel_item_detail_textColor"
android:textSize="@dimen/module_services_panel_item_detail_textSize"
android:textStyle="bold"
@@ -74,14 +73,14 @@
<TextView
android:id="@+id/module_services_id_panel_item_detail"
android:layout_width="wrap_content"
android:background="@drawable/module_services_panel_item_detail_bkg"
android:layout_height="wrap_content"
android:layout_width="@dimen/modle_car_panel_call"
android:background="@drawable/selector_service_car_pannel_detials"
android:layout_height="@dimen/modle_car_panel_call"
android:padding="@dimen/module_services_panel_item_detail_padding"
android:text="@string/module_services_panel_item_detail_text"
android:textStyle="bold"
android:textColor="@color/module_services_panel_item_detail_textColor"
android:textSize="@dimen/module_services_panel_item_detail_textSize"
android:layout_marginEnd="@dimen/dp_46"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@@ -22,6 +22,13 @@
<dimen name="module_service_content_minWidth">64px</dimen>
<dimen name="module_service_id_marker_content_paddingRight">6.5px</dimen>
<dimen name="module_service_id_marker_content_paddingRight_widthoutCall">10px</dimen>
<dimen name="modle_car_panel_call">54px</dimen>
<dimen name="modle_car_panel_call_margin">20px</dimen>
<dimen name="modle_car_panel_call_margin_left">22px</dimen>
<dimen name="module_v2x_surrounding_list_margin_left">12px</dimen>
<dimen name="module_v2x_surrounding_item_margin_left">16px</dimen>
<dimen name="module_services_online_car_panel_marginTop">2px</dimen>
<dimen name="module_services_online_car_panel_marginBottom">2px</dimen>

View File

@@ -22,6 +22,12 @@
<dimen name="module_service_content_minWidth">64px</dimen>
<dimen name="module_service_id_marker_content_paddingRight">6.5px</dimen>
<dimen name="module_service_id_marker_content_paddingRight_widthoutCall">10px</dimen>
<dimen name="modle_car_panel_call">54px</dimen>
<dimen name="modle_car_panel_call_margin">20px</dimen>
<dimen name="modle_car_panel_call_margin_left">22px</dimen>
<dimen name="module_v2x_surrounding_list_margin_left">12px</dimen>
<dimen name="module_v2x_surrounding_item_margin_left">16px</dimen>
<dimen name="module_services_online_car_panel_marginTop">2px</dimen>
<dimen name="module_services_online_car_panel_marginBottom">2px</dimen>

View File

@@ -23,6 +23,11 @@
<dimen name="module_service_content_minWidth">120px</dimen>
<dimen name="module_service_id_marker_content_paddingRight_widthoutCall">20px</dimen>
<dimen name="modle_car_panel_call">98px</dimen>
<dimen name="modle_car_panel_call_margin">46px</dimen>
<dimen name="modle_car_panel_call_margin_left">40px</dimen>
<dimen name="module_services_online_car_panel_marginTop">20px</dimen>
<dimen name="module_services_online_car_panel_marginBottom">20px</dimen>
<dimen name="module_services_online_car_panel_marginRight">20px</dimen>

View File

@@ -29,6 +29,11 @@
<dimen name="module_services_online_car_panel_paddingLeft">50px</dimen>
<dimen name="module_services_online_car_panel_paddingBottom">28px</dimen>
<dimen name="modle_car_panel_call">98px</dimen>
<dimen name="modle_car_panel_call_margin">46px</dimen>
<dimen name="modle_car_panel_call_margin_left">40px</dimen>
<dimen name="module_services_online_car_panel_close_margin_top">36px</dimen>
<dimen name="module_services_online_car_panel_title_margin_top">50px</dimen>
<dimen name="module_services_online_car_panel_title_text_size">36px</dimen>

View File

@@ -23,6 +23,11 @@
<dimen name="module_service_content_minWidth">120px</dimen>
<dimen name="module_service_id_marker_content_paddingRight_widthoutCall">20px</dimen>
<dimen name="modle_car_panel_call">98px</dimen>
<dimen name="modle_car_panel_call_margin">46px</dimen>
<dimen name="modle_car_panel_call_margin_left">40px</dimen>
<dimen name="module_services_online_car_panel_marginTop">2px</dimen>
<dimen name="module_services_online_car_panel_marginBottom">2px</dimen>
<dimen name="module_services_online_car_panel_marginRight">0px</dimen>

View File

@@ -209,11 +209,13 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
//总条数
String originStr = String.format(getContext().getResources().getString(R.string.v2x_surrounding_top_brief), exploreWayList.size());
SpannableString spannableString = new SpannableString(originStr);
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#459DFF")), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#459DFF")),
7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//设置字体大小true表示前面的字体大小 dip
spannableString.setSpan(new AbsoluteSizeSpan((int) getContext().getResources().getDimension(R.dimen.module_v2x_surrounding_top), true),
7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new StyleSpan(Typeface.NORMAL), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new StyleSpan(Typeface.BOLD), 7,
originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mTotalTv.setText(spannableString);
} else {
mTopLayout.setVisibility(View.GONE);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/v2x_panel_close_press" android:state_pressed="true" />
<item android:drawable="@drawable/v2x_panel_close" android:state_pressed="false" />
<item android:drawable="@drawable/v2x_panel_close" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/v2x_panel_close_press_light" android:state_pressed="true" />
<item android:drawable="@drawable/v2x_panel_close_light" android:state_pressed="false" />
<item android:drawable="@drawable/v2x_panel_close_light" />
</selector>

View File

@@ -28,23 +28,32 @@
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:gravity="center_vertical"
android:text="周围5公里共15条交通信息"
android:textColor="@color/v2x_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
<!-- android:layout_centerInParent="true"-->
<TextView
android:id="@+id/tv_top_refresh"
<RelativeLayout
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/module_v2x_surrounding_margin_left"
android:background="@drawable/bg_v2x_refresh"
android:gravity="center"
android:text="@string/v2x_surrounding_refresh"
android:textColor="@color/v2x_item_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
android:textStyle="bold" />
android:gravity="center">
<TextView
android:id="@+id/tv_top_refresh"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center|center_horizontal"
android:text="@string/v2x_surrounding_refresh"
android:textColor="@color/v2x_item_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
<!--列表相关-->
@@ -146,9 +155,9 @@
<!--周边详情-->
<RelativeLayout
android:id="@+id/layout_surrounding_event_detail"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:visibility="gone">
<!--顶部layout-->
<RelativeLayout
@@ -158,20 +167,20 @@
<ImageView
android:id="@+id/back_image"
android:layout_alignParentTop="true"
android:src="@drawable/icon_report_err"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:layout_centerVertical="true"
android:layout_width="25px"
android:layout_height="25px"/>
android:layout_height="25px"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:src="@drawable/icon_report_err" />
<TextView
android:id="@+id/tv_brief_detail"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/back_image"
android:layout_marginLeft="10px"
android:layout_toRightOf="@+id/back_image"
android:text="周围5公里共15条交通信息"
android:textColor="@color/v2x_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
@@ -180,9 +189,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/surrounding_detail_recycleview"
android:layout_marginTop="30dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="30dp"
android:visibility="visible" />
</RelativeLayout>

View File

@@ -87,7 +87,7 @@
android:layout_width="@dimen/dp_79"
android:layout_height="@dimen/dp_79"
android:layout_marginRight="@dimen/dp_50"
android:background="@drawable/v2x_panel_close"
android:background="@drawable/v2x_selector_colse"
app:layout_constraintBottom_toBottomOf="@+id/rgTabSelect"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/rgTabSelect" />

View File

@@ -43,7 +43,7 @@
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">8px</dimen>
<dimen name="module_v2x_panel_surrounding_marginbottom">2px</dimen>
<dimen name="module_v2x_panel_surrounding_stance">30px</dimen>
<dimen name="module_v2x_surrounding_top">34px</dimen>
<dimen name="module_v2x_surrounding_top">22px</dimen>
<dimen name="module_v2x_surrounding_list_margin_left">12px</dimen>
<dimen name="module_v2x_surrounding_item_margin_left">16px</dimen>

View File

@@ -44,7 +44,7 @@
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">8px</dimen>
<dimen name="module_v2x_panel_surrounding_marginbottom">2px</dimen>
<dimen name="module_v2x_panel_surrounding_stance">30px</dimen>
<dimen name="module_v2x_surrounding_top">34px</dimen>
<dimen name="module_v2x_surrounding_top">22px</dimen>
<dimen name="module_v2x_surrounding_list_margin_left">12px</dimen>
<dimen name="module_v2x_surrounding_item_margin_left">16px</dimen>

View File

@@ -41,13 +41,13 @@
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">16px</dimen>
<dimen name="module_v2x_panel_surrounding_marginbottom">5px</dimen>
<dimen name="module_v2x_panel_surrounding_stance">80px</dimen>
<dimen name="module_v2x_surrounding_top">33px</dimen>
<dimen name="module_v2x_surrounding_top">22px</dimen>
<dimen name="module_v2x_surrounding_list_margin_left">20px</dimen>
<dimen name="module_v2x_surrounding_item_margin_left">30px</dimen>
<dimen name="module_v2x_surrounding_refresh_bt_radius">42px</dimen>
<dimen name="module_v2x_surrounding_top_textsize">32px</dimen>
<dimen name="module_v2x_surrounding_top_textsize">30px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">36px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">30px</dimen>
<dimen name="module_v2x_surrounding_item_maigin_left">50px</dimen>

View File

@@ -23,8 +23,8 @@
<dimen name="module_v2x_map_right">200px</dimen>
<dimen name="module_v2x_map_bottom">100px</dimen>
<dimen name="module_v2x_surrounding_top_height">90px</dimen>
<dimen name="module_v2x_surrounding_top_bt_width">162px</dimen>
<dimen name="module_v2x_surrounding_top_bt_height">64px</dimen>
<dimen name="module_v2x_surrounding_top_bt_width">168px</dimen>
<dimen name="module_v2x_surrounding_top_bt_height">68px</dimen>
<dimen name="module_v2x_surrounding_empty_iv_margin_top">80px</dimen>
<dimen name="module_v2x_surrounding_empty_tv_margin_top">26px</dimen>
<dimen name="module_v2x_surrounding_empty_bt_width">270px</dimen>
@@ -41,13 +41,13 @@
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">16px</dimen>
<dimen name="module_v2x_panel_surrounding_marginbottom">5px</dimen>
<dimen name="module_v2x_panel_surrounding_stance">80px</dimen>
<dimen name="module_v2x_surrounding_top">33px</dimen>
<dimen name="module_v2x_surrounding_top">22px</dimen>
<dimen name="module_v2x_surrounding_list_margin_left">20px</dimen>
<dimen name="module_v2x_surrounding_item_margin_left">30px</dimen>
<dimen name="module_v2x_surrounding_refresh_bt_radius">42px</dimen>
<dimen name="module_v2x_surrounding_top_textsize">32px</dimen>
<dimen name="module_v2x_surrounding_top_textsize">30px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">36px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">30px</dimen>
<dimen name="module_v2x_surrounding_item_maigin_left">50px</dimen>

View File

@@ -24,8 +24,8 @@
<dimen name="module_v2x_map_right">200px</dimen>
<dimen name="module_v2x_map_bottom">100px</dimen>
<dimen name="module_v2x_surrounding_top_height">50px</dimen>
<dimen name="module_v2x_surrounding_top_bt_width">90px</dimen>
<dimen name="module_v2x_surrounding_top_bt_height">36px</dimen>
<dimen name="module_v2x_surrounding_top_bt_width">168px</dimen>
<dimen name="module_v2x_surrounding_top_bt_height">68px</dimen>
<dimen name="module_v2x_surrounding_empty_iv_margin_top">40px</dimen>
<dimen name="module_v2x_surrounding_empty_tv_margin_top">15px</dimen>
<dimen name="module_v2x_surrounding_empty_bt_width">150px</dimen>
@@ -41,14 +41,15 @@
<dimen name="module_v2x_surrounding_item_marigin_bottom_left">8px</dimen>
<dimen name="module_v2x_panel_surrounding_marginbottom">2px</dimen>
<dimen name="module_v2x_panel_surrounding_stance">30px</dimen>
<dimen name="module_v2x_surrounding_top">50px</dimen>
<dimen name="module_v2x_surrounding_top">22px</dimen>
<dimen name="module_v2x_surrounding_refresh_bt_radius">24px</dimen>
<dimen name="module_v2x_surrounding_top_textsize">18px</dimen>
<dimen name="module_v2x_surrounding_top_textsize">30px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_left_textsize">20px</dimen>
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">16px</dimen>
<dimen name="module_v2x_surrounding_item_maigin_left">28px</dimen>
<dimen name="module_v2x_panel_width">82px</dimen>
<dimen name="module_v2x_panel_icon_cor">16px</dimen>
<dimen name="share_empty_icon_width">117px</dimen>