title: how to share the html content with css style
body: <p>This is on android, and in one adroid app to do sharing the html content via intent.</p>
  
  <p>Having an email html content and would like to open the apps share chooser to share using other app. 
  function to do the sharing:</p>
  
  <pre><code>Intent shareIntent = ShareCompat.IntentBuilder.from(activity)
                  .setType("text/html")
                  .setHtmlText(shareHtmlText)
                  .setSubject(subject)
                  .getIntent();
          if (shareIntent.resolveActivity(activity.getPackageManager()) != null) {
              activity.startActivity(shareIntent);
          }
  </code></pre>
  
  <p>the html content is below.
  but after choose the app to share with the html content’s style part are displayed as plain text (was expecting they should not to be displayed, the body part displayed fine without the html tags).</p>
  
  <p>How to share a html with css part in it?</p>
  
  <p>shareHtmlText is as:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;style&gt;
          .style-header {font-family:sans-serif; width: 100%; padding-bottom: 10px; border-bottom: 1px solid; margin-bottom: 15px;}
          .style-header td {vertical-align: top;}
          .style-header-label {text-align: right; width: 70px; padding-right: 5px; font-weight: bold;}
          .style-header-value {width: 100%;}
          .style-no-cc .style-header-cc, .style-no-bcc .style-header-bcc, .style-no-attachments .style-header-attachments {display: none;}
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body class="style-no-cc style-no-bcc style-no-attachments"&gt;
      &lt;table class="style-header"&gt;
          &lt;tr&gt;
              &lt;td class="style-header-label"&gt;From:&lt;/td&gt;
              &lt;td class="style-header-value"&gt;You Ford&amp;lt;you.ford@gmail.com&amp;gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td class="style-header-label"&gt;To:&lt;/td&gt;
              &lt;td class="style-header-value"&gt;you.you&amp;lt;you.you@aol.com&amp;gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr class="style-header-cc"&gt;
              &lt;td class="style-header-label"&gt;Cc:&lt;/td&gt;
              &lt;td class="style-header-value"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr class="style-header-bcc"&gt;
              &lt;td class="style-header-label"&gt;Bcc:&lt;/td&gt;
              &lt;td class="style-header-value"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td class="style-header-label"&gt;Subject:&lt;/td&gt;
              &lt;td class="style-header-value"&gt;eee888&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td class="style-header-label"&gt;Date:&lt;/td&gt;
              &lt;td class="style-header-value"&gt;Tue, Jun 27, 2017&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr class="style-header-attachments"&gt;
              &lt;td class="style-header-label"&gt;Attachments:&lt;/td&gt;
              &lt;td class="style-header-value"&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  
      &lt;div id="Part_2_13000205-9f10-490b-9376-dec4cd3878ad"&gt;
          &lt;div class="replacedBody"&gt;&lt;div dir="ltr"&gt;111&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p></p>