summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Dankov <tryagain@navit-project.org>2016-07-10 15:57:39 +0300
committerMichael Dankov <tryagain@navit-project.org>2016-07-10 15:57:39 +0300
commitf18e9dfb5110db7943d719ffe90171ac888326aa (patch)
tree1b99bb86b17ef428b5664c6e1e63d8cd91ac070a
parent810748762a446cfa7355036c66c4b85fca06b4db (diff)
downloadnavit-f18e9dfb5110db7943d719ffe90171ac888326aa.tar.gz
Fix:port_android:Hide osd buttons during map scrollR6693
Setting use_overlay attr of <osd type="button"> now is supported and enabled in default config.
-rw-r--r--navit/android/src/org/navitproject/navit/NavitGraphics.java2
-rw-r--r--navit/xslt/android.xslt1
-rw-r--r--navit/xslt/osd_android.xslt2
-rw-r--r--navit/xslt/osd_minimum.xslt7
4 files changed, 7 insertions, 5 deletions
diff --git a/navit/android/src/org/navitproject/navit/NavitGraphics.java b/navit/android/src/org/navitproject/navit/NavitGraphics.java
index cb50bb90c..031331f68 100644
--- a/navit/android/src/org/navitproject/navit/NavitGraphics.java
+++ b/navit/android/src/org/navitproject/navit/NavitGraphics.java
@@ -1094,7 +1094,7 @@ public class NavitGraphics
//Log.e("NavitGraphics","draw_image");
// float fx = x;
// float fy = y;
- draw_canvas.drawBitmap(bitmap, x, y, paint);
+ draw_canvas.drawBitmap(bitmap, x, y, null);
}
/* takes an image and draws it on the screen as a prerendered maptile
diff --git a/navit/xslt/android.xslt b/navit/xslt/android.xslt
index 29802fee2..19b0855f8 100644
--- a/navit/xslt/android.xslt
+++ b/navit/xslt/android.xslt
@@ -4,6 +4,7 @@
<xsl:param name="ICON_SMALL" select="32"/>
<xsl:param name="ICON_MEDIUM" select="32"/>
<xsl:param name="ICON_BIG" select="64"/>
+ <xsl:param name="OSD_USE_OVERLAY">yes</xsl:param>
<xsl:output method="xml" doctype-system="navit.dtd" cdata-section-elements="gui"/>
<xsl:include href="default_plugins.xslt"/>
diff --git a/navit/xslt/osd_android.xslt b/navit/xslt/osd_android.xslt
index c5f4afb4d..a15d4f34d 100644
--- a/navit/xslt/osd_android.xslt
+++ b/navit/xslt/osd_android.xslt
@@ -3,6 +3,6 @@
<xsl:template match="/config/navit/osd[last()]">
<xsl:copy><xsl:copy-of select="@*|node()"/></xsl:copy>
<xsl:text>&#x0A; </xsl:text>
- <osd type="button" src="gui_android_menu_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="graphics.menu()" x="{round(-60*number($OSD_SIZE))}" y="{round(48*number($OSD_SIZE))}" enable_expression="!has_menu_button"/>
+ <osd type="button" src="gui_android_menu_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="graphics.menu()" x="{round(-60*number($OSD_SIZE))}" y="{round(48*number($OSD_SIZE))}" enable_expression="!has_menu_button" use_overlay="yes"/>
</xsl:template>
</xsl:transform>
diff --git a/navit/xslt/osd_minimum.xslt b/navit/xslt/osd_minimum.xslt
index 5b42769f4..d392a7cce 100644
--- a/navit/xslt/osd_minimum.xslt
+++ b/navit/xslt/osd_minimum.xslt
@@ -3,6 +3,7 @@
<xsl:template match="/config/navit/osd[1]">
<xsl:param name="NEXT_TURN_SIZE"><xsl:value-of select="round(12*number($OSD_SIZE)+number($ICON_BIG))"/></xsl:param>
<xsl:param name="NEXT_TURN_TEXT_HIGHT"><xsl:value-of select="round(20*number($OSD_SIZE))"/></xsl:param>
+ <xsl:param name="OSD_USE_OVERLAY"><xsl:value-of select="$OSD_USE_OVERLAY='yes' or $OSD_USE_OVERLAY='true' or $OSD_USE_OVERLAY='1'"/></xsl:param>
<osd type="compass" enabled="yes" x="{round(-60*number($OSD_SIZE))}" y="{round(-80*number($OSD_SIZE))}" w="{round(60*number($OSD_SIZE))}" h="{round(80*number($OSD_SIZE))}" font_size="{round(200*number($OSD_SIZE))}" enable_expression="vehicle.position_valid"/>
<xsl:text>&#x0A; </xsl:text>
@@ -14,11 +15,11 @@
<xsl:text>&#x0A; </xsl:text>
<osd type="text" label="${{navigation.item[1].length[named]}}" x="0" y="{-$NEXT_TURN_TEXT_HIGHT}" w="{$NEXT_TURN_SIZE+$NEXT_TURN_TEXT_HIGHT}" h="{$NEXT_TURN_TEXT_HIGHT}" font_size="{round(200*number($OSD_SIZE))}" enable_expression="navigation.nav_status>=3"/>
<xsl:text>&#x0A; </xsl:text>
- <osd type="button" src="gui_zoom_in_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="zoom_in()" x="0" y="0" osd_configuration="1"/>
+ <osd type="button" src="gui_zoom_in_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="zoom_in()" x="0" y="0" osd_configuration="1" use_overlay="{$OSD_USE_OVERLAY}"/>
<xsl:text>&#x0A; </xsl:text>
- <osd type="button" src="gui_zoom_out_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="zoom_out()" x="0" y="{round(number($ICON_BIG)+8*number($OSD_SIZE))}" osd_configuration="1"/>
+ <osd type="button" src="gui_zoom_out_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="zoom_out()" x="0" y="{round(number($ICON_BIG)+8*number($OSD_SIZE))}" osd_configuration="1" use_overlay="{$OSD_USE_OVERLAY}"/>
<xsl:text>&#x0A; </xsl:text>
- <osd type="button" src="cursor_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="follow=0;set_center_cursor()" x="{round(number($ICON_BIG)+8*number($OSD_SIZE))}" y="0" enable_expression="follow>1"/>
+ <osd type="button" src="cursor_{number($ICON_BIG)}_{number($ICON_BIG)}.png" command="follow=0;set_center_cursor()" x="{round(number($ICON_BIG)+8*number($OSD_SIZE))}" y="0" enable_expression="follow>1" use_overlay="{$OSD_USE_OVERLAY}"/>
<xsl:text>&#x0A; </xsl:text>
<xsl:copy><xsl:copy-of select="@*|node()"/></xsl:copy>
</xsl:template>