簡體   English   中英

從 XML 中的 html 格式字符串資源中設置 TextView 文本

[英]Set TextView text from html-formatted string resource in XML

我的strings.xml中有一些固定字符串,例如:

<resources>
    <string name="somestring">
        <B>Title</B><BR/>
        Content
    </string>
</resources>

在我的布局中,我有一個TextView ,我想用 html 格式的字符串填充它。

<TextView android:id="@+id/formattedtext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/htmlstring"/>

如果我這樣做, formattedtext文本的內容只是剝離任何 html 標簽的somestring的內容,因此未格式化。

我知道可以通過編程方式設置格式化文本

.setText(Html.fromHtml(somestring));

因為我在我的程序的其他部分使用它,它按預期工作。

要調用這個 function 我需要一個Activity ,但目前我的布局只是一個簡單的或多或少的 static 視圖在普通 XML 中,我寧願保持這種狀態,以避免我創建Activity的開銷只是為了設置一些文本。

我是否忽略了一些明顯的東西? 難道根本不可能嗎? 歡迎任何幫助或解決方法!

編輯:剛剛嘗試了一些事情,似乎 xml 中的 HTML 格式有一些限制:

  • 標簽必須小寫

  • 這里提到的一些標簽不起作用,例如<br/> (可以使用\n代替)

萬一有人發現這個,有一個更好的替代品沒有記錄(我搜索了幾個小時后絆倒了它,最后在Android SDK本身的bug列表中找到它)。 可以在strings.xml中原始的HTML,只要你把它包裝

<![CDATA[ ...raw html... ]]>

例:

<string name="nice_html">
<![CDATA[
<p>This is a html-formatted string with <b>bold</b> and <i>italic</i> text</p>
<p>This is another paragraph of the same string.</p>
]]>
</string>

然后,在您的代碼中:

TextView foo = (TextView)findViewById(R.id.foo);
foo.setText(Html.fromHtml(getString(R.string.nice_html)));

恕我直言,這是幾個數量級更好的工作:-)

由於這里的最佳答案是暗示出錯 (或者至少過於復雜),我覺得應該更新,盡管問題已經很久了:

在Android中使用String資源時,您只需從Java代碼調用getString(...)或在布局XML中使用android:text="@string/..."

即使您想在字符串中使用HTML標記,也不必進行大量更改:

您需要在String資源中轉義的唯一字符是:

  • 雙引號: "變成\\"
  • 單引號: '變成\\'
  • &符號: &變成&#38; 或者&amp;

這意味着您可以添加HTML標記而無需轉義標記:

<string name="my_string"><b>Hello World!</b> This is an example.</string>

但是,可以肯定的是,您應該只使用文檔中列出的<b><i><u>

如果你想使用XML中的HTML字符串,繼續使用android:text="@string/..." ,它將正常工作。

唯一的區別是,如果你想使用Java代碼中的 HTML字符串,你現在必須使用getText(...)而不是getString(...) ,因為前者保留了樣式而后者只是剝離它關了。

就這么簡單。 沒有CDATA,沒有Html.fromHtml(...)

您只需要Html.fromHtml(...)如果你沒有編碼的HTML標記的特殊字符。 然后將它與getString(...)一起使用。 如果要將String傳遞給String.format(...)則可能需String.format(...)

這些都在文檔中描述。

編輯:

getText(...)與未轉義的HTML(正如我所提議的)或CDATA部分和Html.fromHtml(...)之間沒有區別。

請參閱以下圖表以進行比較:

在此輸入圖像描述

轉義HTML標記...

<resources>
    <string name="somestring">
        &lt;B&gt;Title&lt;/B&gt;&lt;BR/&gt;
        Content
    </string>
</resources>

Android沒有指定資源字符串類型的規范(例如text / plain或text / html)。 但是,有一種解決方法可以讓開發人員在XML文件中指定它。

  1. 定義自定義屬性以指定android:text屬性為html。
  2. 使用子類TextView。

一旦定義了這些,就可以用xml文件中的HTML表達自己,而無需再次調用setText(Html.fromHtml(...))。 我很驚訝這種方法不是API的一部分。

此解決方案適用於Android工作室模擬器將文本顯示為呈現HTML的程度。

在此輸入圖像描述

res / values / strings.xml(字符串資源為HTML)

<resources>
<string name="app_name">TextViewEx</string>
<string name="string_with_html"><![CDATA[
       <em>Hello</em> <strong>World</strong>!
 ]]></string>
</resources>

layout.xml(只有相關部分)

聲明自定義屬性命名空間,並添加android_ex:isHtml屬性。 還可以使用TextView的子類。

<RelativeLayout
...
xmlns:android_ex="http://schemas.android.com/apk/res-auto"
...>

<tv.twelvetone.samples.textviewex.TextViewEx
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/string_with_html"
    android_ex:isHtml="true"
    />
 </RelativeLayout>

res / values / attrs.xml(定義子類的自定義屬性)

 <resources>
<declare-styleable name="TextViewEx">
    <attr name="isHtml" format="boolean"/>
    <attr name="android:text" />
</declare-styleable>
</resources>

TextViewEx.java(TextView的子類)

 package tv.twelvetone.samples.textviewex;

 import android.content.Context;
 import android.content.res.TypedArray;
 import android.support.annotation.Nullable;
 import android.text.Html;
 import android.util.AttributeSet;
 import android.widget.TextView;

public TextViewEx(Context context, @Nullable AttributeSet attrs) {
    super(context, attrs);
    TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TextViewEx, 0, 0);
    try {
        boolean isHtml = a.getBoolean(R.styleable.TextViewEx_isHtml, false);
        if (isHtml) {
            String text = a.getString(R.styleable.TextViewEx_android_text);
            if (text != null) {
                setText(Html.fromHtml(text));
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        a.recycle();
    }
}
}

最近更新:

Html.fromHtml(string); //在Android N版本之后棄用..

以下代碼支持android N及以上版本...

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
textView.setText(Html.fromHtml(yourHtmlString,Html.FROM_HTML_MODE_LEGACY));
}

else 
{
textView.setText(Html.fromHtml(yourHtmlString));
}
  String termsOfCondition="<font color=#cc0029>Terms of Use </font>";
  String commma="<font color=#000000>, </font>";
  String privacyPolicy="<font color=#cc0029>Privacy Policy </font>";
  Spanned text=Html.fromHtml("I am of legal age and I have read, understood, agreed and accepted the "+termsOfCondition+commma+privacyPolicy);
        secondCheckBox.setText(text);

我有另一種情況,當我從服務器收到字符串HTML時,我沒有機會將CDATA放入xml。

這是我從服務器得到的:

<p>The quick brown&nbsp;<br />
fox jumps&nbsp;<br />
 over the lazy dog<br />
</p>

它似乎更復雜,但解決方案更簡單。

private TextView textView;

protected void onCreate(Bundle savedInstanceState) { 
.....
textView = (TextView) findViewById(R.id.text); //need to define in your layout
String htmlFromServer = getHTMLContentFromAServer(); 
textView.setText(Html.fromHtml(htmlFromServer).toString());

}

希望能幫助到你!

如果你想在 android 應用程序中顯示 html 股票 喜歡 TextView

請遵循此代碼

Kotlin

var stringvalue = "Your Sting"

yourTextVew.text = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            Html.fromHtml(stringvalue, Html.FROM_HTML_MODE_COMPACT)
        } else {
            Html.fromHtml(stringvalue)
        }

Java

String stringvalue = "Your String";

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
                   yourTextVew.setText(Html.fromHtml(stringvalue, Html.FROM_HTML_MODE_COMPACT))
                } else {
                   yourTextVew.setText( Html.fromHtml(stringvalue))
                }

轉換無序列表 (<ul> ) 轉換為 HTML 格式的表格 (<div id="text_translate"><p> 我以前一直在尋求一種解決方案,允許我將無序列表轉換為格式化的 HTML 表。</p><p> 當時,一位好心的用戶提出了一個解決方案,我在下面附上了。</p><p> 該解決方案將無序列表轉變為 Google 表格中的常規表格,其中不同的值被划分到它們自己的單元格中。 相反,我希望將無序列表轉換為僅放在一個單元格中的格式化 html 表列表。</p><p> 如果可能的話,除此之外,我希望能夠將數百個無序列表放入腳本中,然后將其轉換為各自的 HTML 格式的表格。</p><p> 請參閱下面我從另一個用戶那里獲得的先前解決方案。</p><p> 希望這一切都有意義。</p><p> <strong>編輯:</strong>我還在這篇文章的最底部添加了輸入和首選 output。</p><pre> In your situation, how about the following sample script? Sample script 1: This script parses your value using the regex. function myFunction1() { // This sample value is from your question. const sample = `<ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Water column pressure: 4000mm</li> <li>Fit: Regular unisex</li> <li>Elasticated waistband with drawstring</li> <li>Elasticated cuffs with tonal coated zips</li> <li>Single back pocket with eyelet</li> <li>Concealed side pockets</li> <li>Ultrasonically welded seams</li> <li>Reflective accents</li> </ul>`; // Parse list. const obj = sample.matchAll(/<li>([\w\S\s]+?)<\/li>/g); const values = [...obj].map(e => { if (e && e.length > 1) { const temp = e[1].split(":"); return temp.length == 1? [temp[0].trim(), ""]: temp.map(f => f.trim()); } return ["", ""]; }); // Put the values to the sheet. const sheetName = "Sheet1"; // Please set the sheet name. const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName); sheet.getRange(1, 1, values.length, values[0].length).setValues(values); } When this script is run, your sample value is parsed. And, the values are put to the sheet. Sample script 2: This script parses your value using XmlService. function myFunction1() { // This sample value is from your question. const sample = `<ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Water column pressure: 4000mm</li> <li>Fit: Regular unisex</li> <li>Elasticated waistband with drawstring</li> <li>Elasticated cuffs with tonal coated zips</li> <li>Single back pocket with eyelet</li> <li>Concealed side pockets</li> <li>Ultrasonically welded seams</li> <li>Reflective accents</li> </ul>`; // Parse list. const root = XmlService.parse(sample).getRootElement(); const values = root.getChildren("li", root.getNamespace()).map(e => { const temp = e.getValue().split(":"); return temp.length == 1? [temp[0].trim(), ""]: temp.map(f => f.trim()); }); // Put the values to the sheet. const sheetName = "Sheet1"; // Please set the sheet name. const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName); sheet.getRange(1, 1, values.length, values[0].length).setValues(values); } References: map() setValues(values) Added: From your following additional question, That does the job for doing it on one single product. Let's say I have a batch of product details for several different products. Like here below. Is there a way to run the script on all three at once so it becomes three different tables? In this case, how about the following sample script? Sample script: function myFunction2() { // This is from your new question. const samples = [ "<ul><li>Material: 100% polyester with polyurethane coating</li><li>Lining: 100% polyester</li><li>Insulation: 100% polyester</li><li>Measurements: H160cm x W140cm x D1cm / H63 x W55.1 x 0.4 inches</li><li>When packed: H13cm x W47cm x D25cm / H5.1 x W18.5 x D9.8 inc </li><li>Pack-carry-store system with buckles and adjustable webbing straps</li><li>Soft, quilted and padded side</li><li>Waterproof upper on reverse</li></ul>", "<ul><li>Material: 100% polyester with polyurethane coating</li><li>Water column pressure: 4000mm</li><li>Soft mesh lining</li><li>Circumference: S1 – 61.5 cm / 24.2 inches, / S2 - 66 cm / 26 inches</li></ul>", "<ul><li>Material: 100% polyester with polyurethane coating</li><li>Lining: 100% polyester </li><li>Water column pressure: 8000mm</li><li>Measurements: H16 x W21 x D8.5cm / H6.3 x W8.3 x D3.3 inches</li><li>Volume: 3 liters / 0.8 gallons</li><li>Coated tonal zip closure</li><li>Single main compartment </li><li>Detachable adjustable webbing shoulder strap </li><li>Carry handle</li></ul>" ]; const sheetNames = ["Sheet1", "Sheet2", "Sheet3"]; // Please set the sheet names. samples.forEach((sample, i) => { const root = XmlService.parse(sample).getRootElement(); const values = root.getChildren("li", root.getNamespace()).map(e => { const temp = e.getValue().split(":"); return temp.length == 1? [temp[0].trim(), ""]: temp.map(f => f.trim()); }); const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetNames[i]); sheet.getRange(1, 1, values.length, values[0].length).setValues(values); }); }</pre><p> 請參閱下面的輸入和首選 output。</p><p> 每當有一行帶有冒號的文本時,比如“材料:100% 聚酯與聚氨酯塗層”,我希望它在表中分成兩列,這樣“材料:”在第 1 列,“帶聚氨酯塗層的 100% 聚酯”在第 2 欄中。</p><p> <strong>輸入:</strong></p><pre> /** List 1 **/ <ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Lining: 100% polyester</li> <li>Insulation: 100% polyester</li> <li>Measurements: H160cm x W140cm x D1cm / H63 x W55.1 x 0.4 inches</li> <li>When packed: H13cm x W47cm x D25cm / H5.1 x W18.5 x D9.8 inc </li> <li>Pack-carry-store system with buckles and adjustable webbing straps</li> <li>Soft, quilted and padded side</li> <li>Waterproof upper on reverse</li> </ul> /** List 2 **/ <ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Water column pressure: 4000mm</li> <li>Circumference: S1 – 61.5 cm / 24.2 inches, / S2 - 66 cm / 26 inches</li> <li>Soft mesh lining</li> </ul> /** List 3 **/ <ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Lining: 100% polyester </li> <li>Water column pressure: 8000mm</li> <li>Measurements: H16 x W21 x D8.5cm / H6.3 x W8.3 x D3.3 inches</li> <li>Volume: 3 liters / 0.8 gallons</li> <li>Coated tonal zip closure</li> <li>Single main compartment </li> <li>Detachable adjustable webbing shoulder strap </li> <li>Carry handle</li> </ul></pre><p> <strong>通緝output:</strong></p><pre> /** Table 1 (converted from List 1) **/ <table> <tbody> <tr> <td>Material:</td> <td>100% polyester with polyurethane coating</td> </tr> <tr> <td>Lining:</td> <td>100% polyester</td> </tr> <tr> <td>Insulation:</td> <td>100% polyester</td> </tr> <tr> <td>Measurements:</td> <td>H160cm x W140cm x D1cm / H63 x W55.1 x 0.4 inches</td> </tr> <tr> <td>When packed:</td> <td>H13cm x W47cm x D25cm / H5.1 x W18.5 x D9.8 inc</td> </tr> <tr> <td>Pack-carry-store system with buckles and adjustable webbing straps</td> <td></td> </tr> <tr> <td>Soft, quilted and padded side</td> <td></td> </tr> <tr> <td>Waterproof upper on reverse</td> <td></td> </tr> </tbody> </table> /** Table 2 (converted from List 2) **/ <table> <tbody> <tr> <td>Material:</td> <td>100% polyester with polyurethane coating</td> </tr> <tr> <td>Water column pressure:</td> <td>4000mm</td> </tr> <tr> <td>Circumference:</td> <td>S1 – 61.5 cm / 24.2 inches, / S2 - 66 cm / 26 inches</td> </tr> <tr> <td>Soft mesh lining</td> <td></td> </tr> </tbody> </table> /** Table 3 (converted from List 3) **/ <table> <tbody> <tr> <td>Material:</td> <td>100% polyester with polyurethane coating</td> </tr> <tr> <td>Lining:</td> <td>100% polyester</td> </tr> <tr> <td>Water column pressure:</td> <td>8000mm</td> </tr> <tr> <td>Measurements:</td> <td>H16 x W21 x D8.5cm / H6.3 x W8.3 x D3.3 inches</td> </tr> <tr> <td>Volume:</td> <td>3 liters / 0.8 gallons</td> </tr> <tr> <td>Coated tonal zip closure</td> <td></td> </tr> <tr> <td>Single main compartment</td> <td></td> </tr> <tr> <td>Detachable adjustable webbing shoulder strap</td> <td></td> </tr> <tr> <td>Carry handle</td> <td></td> </tr> </tbody> </table></pre></div>)<table> </table></ul>

[英]Convert unordered lists (<ul>) into HTML-formatted tables (<table>)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

相關問題 將 html 格式的文本保存到數據庫 在Android TextView中插入HTML格式的字符串(不是資源) 如何將HTML格式的String解析為純字符串? 是否有一個XmlWriter可以編寫色彩鮮艷的HTML格式的輸出以在網頁中顯示XML? Android:加快(html格式)文本的顯示 C#將HTML格式的表復制到剪貼板 我應該避免使用HTML格式的通知電子郵件嗎? 轉換無序列表 (<ul> ) 轉換為 HTML 格式的表格 (<div id="text_translate"><p> 我以前一直在尋求一種解決方案,允許我將無序列表轉換為格式化的 HTML 表。</p><p> 當時,一位好心的用戶提出了一個解決方案,我在下面附上了。</p><p> 該解決方案將無序列表轉變為 Google 表格中的常規表格,其中不同的值被划分到它們自己的單元格中。 相反,我希望將無序列表轉換為僅放在一個單元格中的格式化 html 表列表。</p><p> 如果可能的話,除此之外,我希望能夠將數百個無序列表放入腳本中,然后將其轉換為各自的 HTML 格式的表格。</p><p> 請參閱下面我從另一個用戶那里獲得的先前解決方案。</p><p> 希望這一切都有意義。</p><p> <strong>編輯:</strong>我還在這篇文章的最底部添加了輸入和首選 output。</p><pre> In your situation, how about the following sample script? Sample script 1: This script parses your value using the regex. function myFunction1() { // This sample value is from your question. const sample = `<ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Water column pressure: 4000mm</li> <li>Fit: Regular unisex</li> <li>Elasticated waistband with drawstring</li> <li>Elasticated cuffs with tonal coated zips</li> <li>Single back pocket with eyelet</li> <li>Concealed side pockets</li> <li>Ultrasonically welded seams</li> <li>Reflective accents</li> </ul>`; // Parse list. const obj = sample.matchAll(/<li>([\w\S\s]+?)<\/li>/g); const values = [...obj].map(e => { if (e && e.length > 1) { const temp = e[1].split(":"); return temp.length == 1? [temp[0].trim(), ""]: temp.map(f => f.trim()); } return ["", ""]; }); // Put the values to the sheet. const sheetName = "Sheet1"; // Please set the sheet name. const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName); sheet.getRange(1, 1, values.length, values[0].length).setValues(values); } When this script is run, your sample value is parsed. And, the values are put to the sheet. Sample script 2: This script parses your value using XmlService. function myFunction1() { // This sample value is from your question. const sample = `<ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Water column pressure: 4000mm</li> <li>Fit: Regular unisex</li> <li>Elasticated waistband with drawstring</li> <li>Elasticated cuffs with tonal coated zips</li> <li>Single back pocket with eyelet</li> <li>Concealed side pockets</li> <li>Ultrasonically welded seams</li> <li>Reflective accents</li> </ul>`; // Parse list. const root = XmlService.parse(sample).getRootElement(); const values = root.getChildren("li", root.getNamespace()).map(e => { const temp = e.getValue().split(":"); return temp.length == 1? [temp[0].trim(), ""]: temp.map(f => f.trim()); }); // Put the values to the sheet. const sheetName = "Sheet1"; // Please set the sheet name. const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName); sheet.getRange(1, 1, values.length, values[0].length).setValues(values); } References: map() setValues(values) Added: From your following additional question, That does the job for doing it on one single product. Let's say I have a batch of product details for several different products. Like here below. Is there a way to run the script on all three at once so it becomes three different tables? In this case, how about the following sample script? Sample script: function myFunction2() { // This is from your new question. const samples = [ "<ul><li>Material: 100% polyester with polyurethane coating</li><li>Lining: 100% polyester</li><li>Insulation: 100% polyester</li><li>Measurements: H160cm x W140cm x D1cm / H63 x W55.1 x 0.4 inches</li><li>When packed: H13cm x W47cm x D25cm / H5.1 x W18.5 x D9.8 inc </li><li>Pack-carry-store system with buckles and adjustable webbing straps</li><li>Soft, quilted and padded side</li><li>Waterproof upper on reverse</li></ul>", "<ul><li>Material: 100% polyester with polyurethane coating</li><li>Water column pressure: 4000mm</li><li>Soft mesh lining</li><li>Circumference: S1 – 61.5 cm / 24.2 inches, / S2 - 66 cm / 26 inches</li></ul>", "<ul><li>Material: 100% polyester with polyurethane coating</li><li>Lining: 100% polyester </li><li>Water column pressure: 8000mm</li><li>Measurements: H16 x W21 x D8.5cm / H6.3 x W8.3 x D3.3 inches</li><li>Volume: 3 liters / 0.8 gallons</li><li>Coated tonal zip closure</li><li>Single main compartment </li><li>Detachable adjustable webbing shoulder strap </li><li>Carry handle</li></ul>" ]; const sheetNames = ["Sheet1", "Sheet2", "Sheet3"]; // Please set the sheet names. samples.forEach((sample, i) => { const root = XmlService.parse(sample).getRootElement(); const values = root.getChildren("li", root.getNamespace()).map(e => { const temp = e.getValue().split(":"); return temp.length == 1? [temp[0].trim(), ""]: temp.map(f => f.trim()); }); const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetNames[i]); sheet.getRange(1, 1, values.length, values[0].length).setValues(values); }); }</pre><p> 請參閱下面的輸入和首選 output。</p><p> 每當有一行帶有冒號的文本時,比如“材料:100% 聚酯與聚氨酯塗層”,我希望它在表中分成兩列,這樣“材料:”在第 1 列,“帶聚氨酯塗層的 100% 聚酯”在第 2 欄中。</p><p> <strong>輸入:</strong></p><pre> /** List 1 **/ <ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Lining: 100% polyester</li> <li>Insulation: 100% polyester</li> <li>Measurements: H160cm x W140cm x D1cm / H63 x W55.1 x 0.4 inches</li> <li>When packed: H13cm x W47cm x D25cm / H5.1 x W18.5 x D9.8 inc </li> <li>Pack-carry-store system with buckles and adjustable webbing straps</li> <li>Soft, quilted and padded side</li> <li>Waterproof upper on reverse</li> </ul> /** List 2 **/ <ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Water column pressure: 4000mm</li> <li>Circumference: S1 – 61.5 cm / 24.2 inches, / S2 - 66 cm / 26 inches</li> <li>Soft mesh lining</li> </ul> /** List 3 **/ <ul> <li>Material: 100% polyester with polyurethane coating</li> <li>Lining: 100% polyester </li> <li>Water column pressure: 8000mm</li> <li>Measurements: H16 x W21 x D8.5cm / H6.3 x W8.3 x D3.3 inches</li> <li>Volume: 3 liters / 0.8 gallons</li> <li>Coated tonal zip closure</li> <li>Single main compartment </li> <li>Detachable adjustable webbing shoulder strap </li> <li>Carry handle</li> </ul></pre><p> <strong>通緝output:</strong></p><pre> /** Table 1 (converted from List 1) **/ <table> <tbody> <tr> <td>Material:</td> <td>100% polyester with polyurethane coating</td> </tr> <tr> <td>Lining:</td> <td>100% polyester</td> </tr> <tr> <td>Insulation:</td> <td>100% polyester</td> </tr> <tr> <td>Measurements:</td> <td>H160cm x W140cm x D1cm / H63 x W55.1 x 0.4 inches</td> </tr> <tr> <td>When packed:</td> <td>H13cm x W47cm x D25cm / H5.1 x W18.5 x D9.8 inc</td> </tr> <tr> <td>Pack-carry-store system with buckles and adjustable webbing straps</td> <td></td> </tr> <tr> <td>Soft, quilted and padded side</td> <td></td> </tr> <tr> <td>Waterproof upper on reverse</td> <td></td> </tr> </tbody> </table> /** Table 2 (converted from List 2) **/ <table> <tbody> <tr> <td>Material:</td> <td>100% polyester with polyurethane coating</td> </tr> <tr> <td>Water column pressure:</td> <td>4000mm</td> </tr> <tr> <td>Circumference:</td> <td>S1 – 61.5 cm / 24.2 inches, / S2 - 66 cm / 26 inches</td> </tr> <tr> <td>Soft mesh lining</td> <td></td> </tr> </tbody> </table> /** Table 3 (converted from List 3) **/ <table> <tbody> <tr> <td>Material:</td> <td>100% polyester with polyurethane coating</td> </tr> <tr> <td>Lining:</td> <td>100% polyester</td> </tr> <tr> <td>Water column pressure:</td> <td>8000mm</td> </tr> <tr> <td>Measurements:</td> <td>H16 x W21 x D8.5cm / H6.3 x W8.3 x D3.3 inches</td> </tr> <tr> <td>Volume:</td> <td>3 liters / 0.8 gallons</td> </tr> <tr> <td>Coated tonal zip closure</td> <td></td> </tr> <tr> <td>Single main compartment</td> <td></td> </tr> <tr> <td>Detachable adjustable webbing shoulder strap</td> <td></td> </tr> <tr> <td>Carry handle</td> <td></td> </tr> </tbody> </table></pre></div>)<table> </table></ul> HTML字符串到Swift中的格式化文本 將Html和Set文本轉換為Textview
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM