修复UI问题
This commit is contained in:
@@ -40,7 +40,7 @@ public class MapStyleUtils {
|
||||
public static RouteOverlayOptions getRouteOverlayOptions() {
|
||||
RouteOverlayOptions options = new RouteOverlayOptions();
|
||||
// 设置导航线路的宽度
|
||||
options.setLineWidth( 16 );
|
||||
options.setLineWidth( 10 );
|
||||
// 设置交通状况情况良好下的纹理位图
|
||||
options.setSmoothTraffic( colorToBitmap( ColorEnum.route_overlay_line_normal.getColor() ) );
|
||||
// 设置路线的图标
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.map.navi;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import java.util.List;
|
||||
|
||||
@@ -56,6 +57,11 @@ public class MogoCalculatePath {
|
||||
}
|
||||
|
||||
public String getStrategyName() {
|
||||
if (!TextUtils.isEmpty(mStrategyName)&&mStrategyName.contains(",")) {
|
||||
String[] split = mStrategyName.split(",");
|
||||
return split[0];
|
||||
}
|
||||
|
||||
return mStrategyName;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
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/module_ext_navi_info_panel_next_info_distance_marginTop"
|
||||
android:layout_toRightOf="@+id/module_map_id_navi_next_info_road_turn_icon"
|
||||
android:textColor="#282828"
|
||||
|
||||
@@ -16,8 +16,8 @@ import java.util.List;
|
||||
*/
|
||||
public class CalculatePathAdapter extends RecycleBaseAdapter<MogoCalculatePath> {
|
||||
|
||||
|
||||
private String selectTag;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -35,18 +35,24 @@ public class CalculatePathAdapter extends RecycleBaseAdapter<MogoCalculatePath>
|
||||
|
||||
holder.itemView.setTag(R.id.tag_item, item);
|
||||
holder.itemView.setOnClickListener(onClickListener);
|
||||
holder.itemView.setSelected(TextUtils.equals(item.getTagId(),selectTag));
|
||||
holder.itemView.setSelected(TextUtils.equals(item.getTagId(), selectTag));
|
||||
|
||||
View mName = holder.getView(R.id.amap_calculate_item_strategy_name);
|
||||
holder.setText(R.id.amap_calculate_item_strategy_name, item.getStrategyName());
|
||||
mName.setBackgroundResource(getStrategyNameBkgResId(holder.getLayoutPosition()));
|
||||
|
||||
if (holder.getLayoutPosition()>=2) {
|
||||
if (holder.getLayoutPosition() >= 2) {
|
||||
mName.setVisibility(View.GONE);
|
||||
}
|
||||
holder.setText(R.id.amap_calculate_item_strategy_time, item.getTime());
|
||||
holder.setText(R.id.amap_calculate_item_strategy_distance, item.getDistance());
|
||||
holder.setText(R.id.amap_calculate_item_strategy_desc, item.getDesc());
|
||||
|
||||
if (TextUtils.isEmpty(item.getDesc())) {
|
||||
holder.getView(R.id.amap_calculate_item_strategy_desc).setVisibility(View.GONE);
|
||||
} else {
|
||||
holder.getView(R.id.amap_calculate_item_strategy_desc).setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void setOnClickListener(View.OnClickListener onClickListener) {
|
||||
|
||||
@@ -175,6 +175,9 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
mAdapter.setOnClickListener {
|
||||
var item = it.getTag(R.id.tag_item) as MogoCalculatePath
|
||||
selectPath(item)
|
||||
|
||||
// rv_search_result.scroto
|
||||
|
||||
}
|
||||
|
||||
SearchServiceHolder.getMarkerManger()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="#36599D"/>
|
||||
<corners android:radius="@dimen/dp_16"/>
|
||||
</shape>
|
||||
|
||||
@@ -205,6 +205,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_navi_park"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_navi_gas"
|
||||
android:text="@string/navi_setting"
|
||||
android:background="@drawable/shape_round_blue"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
style="@style/txt_navi_style"
|
||||
/>
|
||||
|
||||
@@ -12,12 +12,13 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginLeft="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:background="@drawable/amap_calculate_navi_strategy_name_bkg"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="8.5dp"
|
||||
android:paddingRight="8.5dp"
|
||||
android:textColor="#ccffffff"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/amap_calculate_item_strategy_time"
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -32,7 +33,8 @@
|
||||
android:textSize="@dimen/dp_50"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_40"
|
||||
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/amap_calculate_item_strategy_desc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/amap_calculate_item_strategy_name"
|
||||
tools:text="40小时55分" />
|
||||
|
||||
@@ -70,6 +72,8 @@
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textColor="@color/white_80"
|
||||
android:textSize="@dimen/dp_30"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/amap_calculate_item_strategy_time"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user