Merge remote-tracking branch 'origin/r3.7'
This commit is contained in:
commit
40bedafeb1
13 changed files with 21 additions and 35 deletions
|
@ -4,7 +4,7 @@
|
||||||
<item android:drawable="@color/map_background_color_light"/>
|
<item android:drawable="@color/map_background_color_light"/>
|
||||||
<item android:top="@dimen/splash_screen_logo_top">
|
<item android:top="@dimen/splash_screen_logo_top">
|
||||||
<bitmap
|
<bitmap
|
||||||
android:gravity="center_horizontal|top"
|
android:gravity="center"
|
||||||
android:src="@drawable/ic_logo_splash_osmand"/>
|
android:src="@drawable/ic_logo_splash_osmand"/>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
|
@ -4,7 +4,7 @@
|
||||||
<item android:drawable="@color/map_background_color_light"/>
|
<item android:drawable="@color/map_background_color_light"/>
|
||||||
<item android:top="@dimen/splash_screen_logo_top">
|
<item android:top="@dimen/splash_screen_logo_top">
|
||||||
<bitmap
|
<bitmap
|
||||||
android:gravity="center_horizontal|top"
|
android:gravity="center"
|
||||||
android:src="@drawable/ic_logo_splash_osmand"/>
|
android:src="@drawable/ic_logo_splash_osmand"/>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
|
@ -4,7 +4,7 @@
|
||||||
<item android:drawable="@color/map_background_color_light"/>
|
<item android:drawable="@color/map_background_color_light"/>
|
||||||
<item android:top="@dimen/splash_screen_logo_top">
|
<item android:top="@dimen/splash_screen_logo_top">
|
||||||
<bitmap
|
<bitmap
|
||||||
android:gravity="center_horizontal|top"
|
android:gravity="center"
|
||||||
android:src="@drawable/ic_logo_splash_osmand_plus"/>
|
android:src="@drawable/ic_logo_splash_osmand_plus"/>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
|
@ -17,7 +17,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/actionModeBackground"
|
android:background="?attr/actionModeBackground"
|
||||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
android:minHeight="@dimen/toolbar_height"
|
||||||
android:theme="?attr/toolbar_theme"
|
android:theme="?attr/toolbar_theme"
|
||||||
app:contentInsetLeft="54dp"
|
app:contentInsetLeft="54dp"
|
||||||
app:contentInsetStart="54dp">
|
app:contentInsetStart="54dp">
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/app_mode_icon"
|
android:id="@+id/app_mode_icon"
|
||||||
android:layout_width="@dimen/map_widget_icon"
|
android:layout_width="@dimen/standard_icon_size"
|
||||||
android:layout_height="@dimen/map_widget_icon"
|
android:layout_height="@dimen/standard_icon_size"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
tools:src="@drawable/ic_dashboard_dark"
|
tools:src="@drawable/ic_dashboard_dark"
|
||||||
android:background="?attr/dashboard_button" />
|
android:background="?attr/dashboard_button" />
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/app_mode_icon"
|
android:id="@+id/app_mode_icon"
|
||||||
android:layout_width="@dimen/map_widget_icon"
|
android:layout_width="@dimen/standard_icon_size"
|
||||||
android:layout_height="@dimen/map_widget_icon"
|
android:layout_height="@dimen/standard_icon_size"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
tools:src="@drawable/ic_dashboard_dark" />
|
tools:src="@drawable/ic_dashboard_dark" />
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/osmand_orange"
|
android:background="@color/osmand_orange"
|
||||||
android:minHeight="@dimen/dashboard_map_toolbar"
|
android:minHeight="@dimen/toolbar_height"
|
||||||
android:theme="?attr/toolbar_theme"
|
android:theme="?attr/toolbar_theme"
|
||||||
app:contentInsetLeft="54dp"
|
app:contentInsetLeft="54dp"
|
||||||
app:contentInsetStart="54dp"
|
app:contentInsetStart="54dp"
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="map_go_button_width">200dp</dimen>
|
<dimen name="splash_screen_logo_top">22dp</dimen>
|
||||||
|
|
||||||
<dimen name="splash_screen_logo_top">12dp</dimen>
|
|
||||||
<dimen name="splash_screen_text_bottom">12dp</dimen>
|
<dimen name="splash_screen_text_bottom">12dp</dimen>
|
||||||
<dimen name="splash_screen_osm_text_bottom">12dp</dimen>
|
<dimen name="splash_screen_osm_text_bottom">12dp</dimen>
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,6 @@
|
||||||
<dimen name="context_menu_main_actions_padding_top">11dp</dimen>
|
<dimen name="context_menu_main_actions_padding_top">11dp</dimen>
|
||||||
<dimen name="context_menu_main_actions_padding_bottom">9dp</dimen>
|
<dimen name="context_menu_main_actions_padding_bottom">9dp</dimen>
|
||||||
<dimen name="context_menu_main_actions_icon_margin">5dp</dimen>
|
<dimen name="context_menu_main_actions_icon_margin">5dp</dimen>
|
||||||
<dimen name="context_menu_big_icon_size">54dp</dimen>
|
|
||||||
|
|
||||||
<dimen name="fab_size_with_shadow">90dp</dimen>
|
<dimen name="fab_size_with_shadow">90dp</dimen>
|
||||||
<dimen name="fab_margin_right">18dp</dimen>
|
<dimen name="fab_margin_right">18dp</dimen>
|
||||||
|
@ -101,12 +100,9 @@
|
||||||
<dimen name="route_info_button_go_drawable_padding">21dp</dimen>
|
<dimen name="route_info_button_go_drawable_padding">21dp</dimen>
|
||||||
<dimen name="route_info_directions_margin">72dp</dimen>
|
<dimen name="route_info_directions_margin">72dp</dimen>
|
||||||
<dimen name="route_info_icon_padding_left">18dp</dimen>
|
<dimen name="route_info_icon_padding_left">18dp</dimen>
|
||||||
<dimen name="route_info_modes_height">72dp</dimen>
|
|
||||||
<dimen name="route_info_details_padding">18dp</dimen>
|
<dimen name="route_info_details_padding">18dp</dimen>
|
||||||
<dimen name="route_info_settings_buttons_height">48dp</dimen>
|
<dimen name="route_info_settings_buttons_height">48dp</dimen>
|
||||||
<dimen name="route_info_app_modes_padding">60dp</dimen>
|
<dimen name="route_info_app_modes_padding">60dp</dimen>
|
||||||
<dimen name="route_info_card_row_min_height">90dp</dimen>
|
|
||||||
<dimen name="route_info_card_item_height">84dp</dimen>
|
|
||||||
<dimen name="route_info_list_text_padding">78dp</dimen>
|
<dimen name="route_info_list_text_padding">78dp</dimen>
|
||||||
<dimen name="route_info_warning_padding">27dp</dimen>
|
<dimen name="route_info_warning_padding">27dp</dimen>
|
||||||
<dimen name="route_info_button_bg_line_radius">27dp</dimen>
|
<dimen name="route_info_button_bg_line_radius">27dp</dimen>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="splash_screen_logo_top">120dp</dimen>
|
<dimen name="splash_screen_logo_top">-48dp</dimen>
|
||||||
<dimen name="splash_screen_text_bottom">12dp</dimen>
|
<dimen name="splash_screen_text_bottom">12dp</dimen>
|
||||||
<dimen name="splash_screen_osm_text_bottom">24dp</dimen>
|
<dimen name="splash_screen_osm_text_bottom">24dp</dimen>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="splash_screen_logo_top">240dp</dimen>
|
<dimen name="splash_screen_logo_top">-48dp</dimen>
|
||||||
<dimen name="splash_screen_text_bottom">36dp</dimen>
|
<dimen name="splash_screen_text_bottom">36dp</dimen>
|
||||||
<dimen name="splash_screen_osm_text_bottom">24dp</dimen>
|
<dimen name="splash_screen_osm_text_bottom">24dp</dimen>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.content.res.AppCompatResources;
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
@ -36,15 +37,6 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
||||||
return (MapActivity) getActivity();
|
return (MapActivity) getActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasNavBar() {
|
|
||||||
int id = getResources().getIdentifier("config_showNavigationBar", "bool", "android");
|
|
||||||
if (id > 0) {
|
|
||||||
return getResources().getBoolean(id);
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getStatusBarHeight() {
|
private int getStatusBarHeight() {
|
||||||
int statusBarHeight = 0;
|
int statusBarHeight = 0;
|
||||||
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
|
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||||
|
@ -55,7 +47,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getNavigationBarHeight() {
|
private int getNavigationBarHeight() {
|
||||||
if (!hasNavBar())
|
if (!AndroidUtils.hasNavBar(getContext()) && !AndroidUtils.isNavBarVisible(getMapActivity()))
|
||||||
return 0;
|
return 0;
|
||||||
int orientation = getResources().getConfiguration().orientation;
|
int orientation = getResources().getConfiguration().orientation;
|
||||||
if (isSmartphone() && Configuration.ORIENTATION_LANDSCAPE == orientation)
|
if (isSmartphone() && Configuration.ORIENTATION_LANDSCAPE == orientation)
|
||||||
|
@ -67,7 +59,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getNavigationBarWidth() {
|
private int getNavigationBarWidth() {
|
||||||
if (!hasNavBar())
|
if (!AndroidUtils.hasNavBar(getContext()) && !AndroidUtils.isNavBarVisible(getMapActivity()))
|
||||||
return 0;
|
return 0;
|
||||||
int orientation = getResources().getConfiguration().orientation;
|
int orientation = getResources().getConfiguration().orientation;
|
||||||
if (orientation == Configuration.ORIENTATION_LANDSCAPE && isSmartphone()) {
|
if (orientation == Configuration.ORIENTATION_LANDSCAPE && isSmartphone()) {
|
||||||
|
@ -80,7 +72,7 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
OsmandApplication app = requireMyApplication();
|
OsmandApplication app = requireMyApplication();
|
||||||
FragmentActivity activity = requireActivity();
|
FragmentActivity activity = requireActivity();
|
||||||
|
|
||||||
|
@ -131,10 +123,10 @@ public class SecondSplashScreenFragment extends BaseOsmAndFragment {
|
||||||
osmTextLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
|
osmTextLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
|
||||||
osmTextLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
|
osmTextLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
|
||||||
|
|
||||||
int defaultLogoMarginTop = (int) getResources().getDimension(R.dimen.splash_screen_logo_top);
|
int defaultLogoMarginTop = getResources().getDimensionPixelSize(R.dimen.splash_screen_logo_top);
|
||||||
int logoMarginTop = defaultLogoMarginTop - (Build.VERSION.SDK_INT >= 21 ? 0 : getStatusBarHeight());
|
int logoMarginTop = defaultLogoMarginTop - (Build.VERSION.SDK_INT >= 21 ? 0 : getStatusBarHeight());
|
||||||
int textMarginBottom = (int) getResources().getDimension(R.dimen.splash_screen_text_bottom);
|
int textMarginBottom = getResources().getDimensionPixelSize(R.dimen.splash_screen_text_bottom);
|
||||||
int osmTextMarginBottom = (int) getResources().getDimension(R.dimen.splash_screen_osm_text_bottom);
|
int osmTextMarginBottom = getResources().getDimensionPixelSize(R.dimen.splash_screen_osm_text_bottom);
|
||||||
int elementsPaddingLeft = 0;
|
int elementsPaddingLeft = 0;
|
||||||
int elementsPaddingRight = 0;
|
int elementsPaddingRight = 0;
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N_MR1) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N_MR1) {
|
||||||
|
|
|
@ -1314,7 +1314,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
final ImageView iconView = (ImageView) view.findViewById(R.id.context_menu_icon_view);
|
final ImageView iconView = (ImageView) view.findViewById(R.id.context_menu_icon_view);
|
||||||
Drawable icon = menu.getRightIcon();
|
Drawable icon = menu.getRightIcon();
|
||||||
int iconId = menu.getRightIconId();
|
int iconId = menu.getRightIconId();
|
||||||
int sizeId = menu.isBigRightIcon() ? R.dimen.context_menu_big_icon_size : R.dimen.map_widget_icon;
|
int sizeId = menu.isBigRightIcon() ? R.dimen.context_menu_big_icon_size : R.dimen.standard_icon_size;
|
||||||
if (menu.getPointDescription().isFavorite() || menu.getPointDescription().isWpt()) {
|
if (menu.getPointDescription().isFavorite() || menu.getPointDescription().isWpt()) {
|
||||||
sizeId = R.dimen.favorites_icon_size;
|
sizeId = R.dimen.favorites_icon_size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue