UI问题
This commit is contained in:
@@ -29,6 +29,9 @@ public class WindowUtils {
|
||||
return ( int ) ( dpValue * scale + 0.5f );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据手机的分辨率从 px(像素) 的单位 转成为 dp
|
||||
*/
|
||||
|
||||
@@ -29,8 +29,9 @@ dependencies {
|
||||
api rootProject.ext.dependencies.amapnavi3dmap
|
||||
api rootProject.ext.dependencies.amapsearch
|
||||
api rootProject.ext.dependencies.amaplocation
|
||||
compile project(path: ':foudations:mogo-commons')
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
} else {
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
|
||||
import com.amap.api.navi.model.RouteOverlayOptions;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.map.impl.amap.R;
|
||||
import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.WindowUtils;
|
||||
@@ -40,7 +41,7 @@ public class MapStyleUtils {
|
||||
public static RouteOverlayOptions getRouteOverlayOptions() {
|
||||
RouteOverlayOptions options = new RouteOverlayOptions();
|
||||
// 设置导航线路的宽度
|
||||
options.setLineWidth( 10 );
|
||||
options.setLineWidth( AbsMogoApplication.getApp().getResources().getDimension(R.dimen.path_width) );
|
||||
// 设置交通状况情况良好下的纹理位图
|
||||
options.setSmoothTraffic( colorToBitmap( ColorEnum.route_overlay_line_normal.getColor() ) );
|
||||
// 设置路线的图标
|
||||
|
||||
4
libraries/map-amap/src/main/res/values-ldpi/dimens.xml
Normal file
4
libraries/map-amap/src/main/res/values-ldpi/dimens.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="path_width">10px</dimen>
|
||||
</resources>
|
||||
4
libraries/map-amap/src/main/res/values/dimens.xml
Normal file
4
libraries/map-amap/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="path_width">18px</dimen>
|
||||
</resources>
|
||||
@@ -3,6 +3,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_790"
|
||||
android:layout_height="@dimen/dp_440"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="#3F4057"
|
||||
app:cardCornerRadius="@dimen/dp_20"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
package="com.mogo.module.navi">
|
||||
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
|
||||
<application>
|
||||
<activity android:name=".ui.NaviActivity"></activity>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_790"
|
||||
android:layout_height="@dimen/dp_440"
|
||||
app:cardPreventCornerOverlap="false"
|
||||
|
||||
android:orientation="vertical"
|
||||
app:cardBackgroundColor="#3F4057"
|
||||
app:cardCornerRadius="@dimen/dp_20"
|
||||
|
||||
Reference in New Issue
Block a user