【问题标题】:HTML format looking fine on android but not on iphoneHTML 格式在 android 上看起来不错,但在 iphone 上却不行
【发布时间】:2012-11-25 12:31:57
【问题描述】:

我正在发送html格式的邮件,格式如下

    nameValuePairs.add(new BasicNameValuePair("message", "<b> Your Last Alert: </b> <br/><br/>  On " + "<font color=\"red\"> " + mDate
                + "</font>" + " at " + "<font color=\"red\"> " + mTime + "</font>" + ", " + "\"<font color=\"red\">" + model + "</font>\""
                + " reported that its battery level was down to " + "<font color=\"red\"> " + batteryLevel + "%.</font>"
                + "<br/> You might want to get it on a charger before it's too late! <br/><br/><br/><br/><b> Do you know where \""
                + "<font color=\"red\">" + model + "</font>\"" + " is? </b><br/><br/> Click " + "<a href=\"" + s + "\"> here </a>"
                + " to view in Google Maps.<br/> To find \"<font color=\"red\">"+ model +"</font>\" with the Last Alert app on another iOS device, click <a href = \"" + linkForiPhone
                + "\"> here </a>. <br/>" + "Android users, Click <a href = \"" + linkForAndroid
                + "\"> here </a>. <br/><br/><br/><b><u> Last Known Location : </u></b><br/> " + address
                + "<br/><br/><br/><br/><br/><b><u>GPS Coordinates</b></u> <br/>" + cutLat + ", " + cutLong
                + "<br/><br/><b><u>Altitude</b></u><br/>" + alt + " " + "<br/><br/><b><u>Location Accuracy</b></u>" + "<br/>" + diameter
                + " Diameter"));

当我在 android 上打开这封邮件时,它看起来很棒 但在 iphone 上,它的格式不正确 它显示如下

在 Android 中它看起来很好,如下所示

怎么了?

【问题讨论】:

标签: android iphone html ios


【解决方案1】:

您可以直接链接到地图应用以获取地址

<a href=http://maps.google.com/maps?q=address>address</a>

并且可能避免邮件应用的自动格式化。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-04
    • 2021-09-21
    • 1970-01-01
    • 2015-05-09
    • 1970-01-01
    • 1970-01-01
    • 2023-03-10
    • 2022-01-15
    相关资源
    最近更新 更多