Fix layout
This commit is contained in:
parent
1137b4e840
commit
4c6d0cd79e
10 changed files with 49 additions and 19 deletions
5
OsmAnd/res/drawable/btn_inset_circle_trans.xml
Normal file
5
OsmAnd/res/drawable/btn_inset_circle_trans.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@drawable/btn_inset_circle_p" android:state_pressed="true"/>
|
||||||
|
<item android:drawable="@drawable/btn_inset_circle_trans_n"></item>
|
||||||
|
</selector>
|
18
OsmAnd/res/drawable/btn_inset_circle_trans_n.xml
Normal file
18
OsmAnd/res/drawable/btn_inset_circle_trans_n.xml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<item>
|
||||||
|
<bitmap android:src="@drawable/map_bt_round_2_shadow" android:gravity="center" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<inset
|
||||||
|
android:insetBottom="@dimen/map_button_inset"
|
||||||
|
android:insetLeft="@dimen/map_button_inset"
|
||||||
|
android:insetRight="@dimen/map_button_inset"
|
||||||
|
android:insetTop="@dimen/map_button_inset" >
|
||||||
|
<shape android:shape="oval" >
|
||||||
|
<solid android:color="@color/map_widget_light_trans" />
|
||||||
|
</shape>
|
||||||
|
</inset>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
|
@ -165,15 +165,16 @@
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/map_layers_button"
|
android:id="@+id/map_layers_button"
|
||||||
android:layout_width="@dimen/map_button_size"
|
android:layout_width="@dimen/map_small_button_size"
|
||||||
android:layout_height="@dimen/map_button_size"
|
android:layout_height="@dimen/map_small_button_size"
|
||||||
android:background="@drawable/btn_inset_circle"
|
android:background="@drawable/btn_inset_circle"
|
||||||
android:src="@drawable/ic_action_test_light" />
|
android:src="@drawable/ic_action_test_light" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/map_compass_button"
|
android:id="@+id/map_compass_button"
|
||||||
android:layout_width="@dimen/map_button_size"
|
android:layout_width="@dimen/map_small_button_size"
|
||||||
android:layout_height="@dimen/map_button_size"
|
android:layout_marginLeft="@dimen/map_small_button_margin"
|
||||||
|
android:layout_height="@dimen/map_small_button_size"
|
||||||
android:background="@drawable/btn_inset_circle"
|
android:background="@drawable/btn_inset_circle"
|
||||||
android:src="@drawable/ic_action_test_light" />
|
android:src="@drawable/ic_action_test_light" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -207,8 +208,8 @@
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/map_collapse_button"
|
android:id="@+id/map_collapse_button"
|
||||||
android:layout_width="@dimen/map_button_size"
|
android:layout_width="@dimen/map_small_button_size"
|
||||||
android:layout_height="@dimen/map_button_size"
|
android:layout_height="@dimen/map_small_button_size"
|
||||||
android:layout_gravity="top|center_horizontal"
|
android:layout_gravity="top|center_horizontal"
|
||||||
android:background="@drawable/btn_inset_circle"
|
android:background="@drawable/btn_inset_circle"
|
||||||
android:src="@drawable/ic_action_test_light" />
|
android:src="@drawable/ic_action_test_light" />
|
||||||
|
|
|
@ -134,7 +134,8 @@
|
||||||
android:id="@+id/map_compass_button"
|
android:id="@+id/map_compass_button"
|
||||||
android:layout_width="@dimen/map_small_button_size"
|
android:layout_width="@dimen/map_small_button_size"
|
||||||
android:layout_height="@dimen/map_small_button_size"
|
android:layout_height="@dimen/map_small_button_size"
|
||||||
android:background="@drawable/btn_inset_circle"
|
android:layout_marginLeft="@dimen/map_small_button_margin"
|
||||||
|
android:background="@drawable/btn_inset_circle_trans"
|
||||||
android:src="@drawable/ic_action_test_light" />
|
android:src="@drawable/ic_action_test_light" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
android:layout_width="@dimen/map_widget_icon"
|
android:layout_width="@dimen/map_widget_icon"
|
||||||
android:layout_height="@dimen/map_widget_icon"
|
android:layout_height="@dimen/map_widget_icon"
|
||||||
android:layout_gravity="left|center_vertical"
|
android:layout_gravity="left|center_vertical"
|
||||||
|
android:layout_marginLeft="@dimen/map_widget_icon_margin"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:src="@drawable/ic_action_test_light" />
|
android:src="@drawable/ic_action_test_light" />
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_marginBottom="@dimen/map_widget_text_bottom_margin"
|
android:layout_marginBottom="@dimen/map_widget_text_bottom_margin"
|
||||||
android:layout_marginLeft="4dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:minWidth="10dp"
|
android:minWidth="10dp"
|
||||||
|
|
|
@ -11,10 +11,11 @@
|
||||||
<dimen name="map_address_height">60dp</dimen>
|
<dimen name="map_address_height">60dp</dimen>
|
||||||
<dimen name="map_button_size">78dp</dimen>
|
<dimen name="map_button_size">78dp</dimen>
|
||||||
<dimen name="map_small_button_size">66dp</dimen>
|
<dimen name="map_small_button_size">66dp</dimen>
|
||||||
|
<dimen name="map_small_button_margin">9dp</dimen>
|
||||||
<dimen name="map_ruler_width">180dp</dimen>
|
<dimen name="map_ruler_width">180dp</dimen>
|
||||||
<dimen name="map_ruler_bottom_margin">14dp</dimen>
|
<dimen name="map_ruler_bottom_margin">17dp</dimen>
|
||||||
<dimen name="map_button_shadow_height">112dp</dimen>
|
<dimen name="map_button_shadow_height">112dp</dimen>
|
||||||
<dimen name="map_button_shadow_margin">7dp</dimen>
|
<dimen name="map_button_shadow_margin">6dp</dimen>
|
||||||
<dimen name="map_button_shadow_width">84dp</dimen>
|
<dimen name="map_button_shadow_width">84dp</dimen>
|
||||||
<dimen name="map_alarm_size">116dp</dimen>
|
<dimen name="map_alarm_size">116dp</dimen>
|
||||||
<dimen name="map_alarm_text_size">35sp</dimen>
|
<dimen name="map_alarm_text_size">35sp</dimen>
|
||||||
|
@ -34,7 +35,8 @@
|
||||||
<dimen name="map_button_inset_shadow">3dp</dimen>
|
<dimen name="map_button_inset_shadow">3dp</dimen>
|
||||||
<dimen name="map_button_inset">3dp</dimen>
|
<dimen name="map_button_inset">3dp</dimen>
|
||||||
<dimen name="map_button_rect_rad">4dp</dimen>
|
<dimen name="map_button_rect_rad">4dp</dimen>
|
||||||
<dimen name="map_button_stroke">1px</dimen>
|
<dimen name="map_button_stroke">1dp</dimen>
|
||||||
|
|
||||||
|
<dimen name="map_widget_icon_margin">6dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -26,11 +26,11 @@
|
||||||
<color name="list_item_background_dark_pressed">#be39464d</color>
|
<color name="list_item_background_dark_pressed">#be39464d</color>
|
||||||
|
|
||||||
<color name="map_widget_icon_color">#ff8f00</color>
|
<color name="map_widget_icon_color">#ff8f00</color>
|
||||||
<color name="map_widget_stroke">#333333</color>
|
<color name="map_widget_stroke">#4C000000</color>
|
||||||
<color name="map_widget_light">#ffffff</color>
|
<color name="map_widget_light">#ffffff</color>
|
||||||
<color name="map_widget_dark">#bb3f3f3f</color>
|
<color name="map_widget_dark">#bb3f3f3f</color>
|
||||||
<color name="map_widget_dark_pressed">#ddcccccc</color>
|
<color name="map_widget_dark_pressed">#ddcccccc</color>
|
||||||
<color name="map_widget_light_trans">#40ffffff</color>
|
<color name="map_widget_light_trans">#80ffffff</color>
|
||||||
<color name="map_widget_light_pressed">#e5e5e5</color>
|
<color name="map_widget_light_pressed">#e5e5e5</color>
|
||||||
<color name="map_widget_blue">#536dfe</color>
|
<color name="map_widget_blue">#536dfe</color>
|
||||||
<color name="map_widget_blue_pressed">#485dd9</color>
|
<color name="map_widget_blue_pressed">#485dd9</color>
|
||||||
|
|
|
@ -59,9 +59,10 @@
|
||||||
<dimen name="map_address_height">40dp</dimen>
|
<dimen name="map_address_height">40dp</dimen>
|
||||||
<dimen name="map_button_size">52dp</dimen>
|
<dimen name="map_button_size">52dp</dimen>
|
||||||
<dimen name="map_small_button_size">44dp</dimen>
|
<dimen name="map_small_button_size">44dp</dimen>
|
||||||
|
<dimen name="map_small_button_margin">5dp</dimen>
|
||||||
|
|
||||||
<dimen name="map_ruler_width">120dp</dimen>
|
<dimen name="map_ruler_width">120dp</dimen>
|
||||||
<dimen name="map_ruler_bottom_margin">7dp</dimen>
|
<dimen name="map_ruler_bottom_margin">9dp</dimen>
|
||||||
<dimen name="map_alarm_size">78dp</dimen>
|
<dimen name="map_alarm_size">78dp</dimen>
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
<dimen name="map_alarm_bottom_margin_land">57dp</dimen>
|
<dimen name="map_alarm_bottom_margin_land">57dp</dimen>
|
||||||
<dimen name="map_button_shadow_height">85dp</dimen>
|
<dimen name="map_button_shadow_height">85dp</dimen>
|
||||||
<dimen name="map_button_shadow_width">56dp</dimen>
|
<dimen name="map_button_shadow_width">56dp</dimen>
|
||||||
<dimen name="map_button_shadow_margin">5dp</dimen>
|
<dimen name="map_button_shadow_margin">4dp</dimen>
|
||||||
<dimen name="map_widget_icon">24dp</dimen>
|
<dimen name="map_widget_icon">24dp</dimen>
|
||||||
<dimen name="map_widget_height">32dp</dimen>
|
<dimen name="map_widget_height">32dp</dimen>
|
||||||
<dimen name="map_widget_image">80dp</dimen>
|
<dimen name="map_widget_image">80dp</dimen>
|
||||||
|
@ -82,13 +83,14 @@
|
||||||
<dimen name="map_button_inset_shadow">2dp</dimen>
|
<dimen name="map_button_inset_shadow">2dp</dimen>
|
||||||
<dimen name="map_button_inset">2dp</dimen>
|
<dimen name="map_button_inset">2dp</dimen>
|
||||||
<dimen name="map_button_rect_rad">3dp</dimen>
|
<dimen name="map_button_rect_rad">3dp</dimen>
|
||||||
<dimen name="map_button_stroke">1px</dimen>
|
<dimen name="map_button_stroke">1dp</dimen>
|
||||||
|
|
||||||
<dimen name="map_widget_text_size">23sp</dimen>
|
<dimen name="map_widget_text_size">23sp</dimen>
|
||||||
<dimen name="map_widget_text_size_small">15sp</dimen>
|
<dimen name="map_widget_text_size_small">15sp</dimen>
|
||||||
<dimen name="map_button_text_size">18sp</dimen>
|
<dimen name="map_button_text_size">18sp</dimen>
|
||||||
<dimen name="map_alarm_text_size">25sp</dimen>
|
<dimen name="map_alarm_text_size">25sp</dimen>
|
||||||
<dimen name="map_widget_text_bottom_margin">0sp</dimen>
|
<dimen name="map_widget_text_bottom_margin">1sp</dimen>
|
||||||
|
<dimen name="map_widget_icon_margin">4dp</dimen>
|
||||||
|
|
||||||
<dimen name="dash_margin">2dp</dimen>
|
<dimen name="dash_margin">2dp</dimen>
|
||||||
<dimen name="dash_margin_h">6dp</dimen>
|
<dimen name="dash_margin_h">6dp</dimen>
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
TextInfoWidget alt = mic.createAltitudeControl(map);
|
TextInfoWidget alt = mic.createAltitudeControl(map);
|
||||||
registerSideWidget(alt, R.drawable.ic_action_altitude, R.string.map_widget_altitude, "altitude", false, 20);
|
registerSideWidget(alt, R.drawable.ic_action_altitude, R.string.map_widget_altitude, "altitude", false, 20);
|
||||||
TextInfoWidget plainTime = ric.createPlainTimeControl(map);
|
TextInfoWidget plainTime = ric.createPlainTimeControl(map);
|
||||||
registerSideWidget(plainTime, R.drawable.ic_action_time_to_distance, R.string.map_widget_plain_time, "plain_time", false, 25);
|
registerSideWidget(plainTime, R.drawable.ic_action_time, R.string.map_widget_plain_time, "plain_time", false, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ public class RouteInfoWidgetsFactory {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
plainTimeControl.setText(null, null);
|
plainTimeControl.setText(null, null);
|
||||||
plainTimeControl.setIcons(R.drawable.widget_time_to_distance_day, R.drawable.widget_time_to_distance_night);
|
plainTimeControl.setIcons(R.drawable.widget_time_day, R.drawable.widget_time_night);
|
||||||
return plainTimeControl;
|
return plainTimeControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue