How to show multiple image in a google glass timeline

198 views Asked by At

I have a table and want set multiple image in columns like

    <table>
     <tr>
      <td><img src="img1"/></td>
      <td>image 1 Name</td>
     </tr>
     <tr>
      <td><img src="img2"/></td>
      <td>image 2 Name</td>
     </tr>
    <table>

/**********************/ I want to add image dynamically, what I did.

   String cardHtml = "<article><section><table class=\"align-justify\"><thead>"
                + "<tr><td><h1>Image</h1></td><td><h1>Name</h1></td>"
                + "<tr></tr></thead><tbody><tr>";
        if (imgList != null) {
            for (String img : imgList) {
                imgUrl = appBaseUrl + "static/images/"
                        + img.getImgName();


                cardHtml += "<td><img src=\"" + imgUrl + "\"/>"
                        + img.getImgName() + "</td>";


            }
        }
        cardHtml += "</tr></tbody></table></section></article>";

I got image icon, but not image in the timeline card. But Image Name is showing properly, How can i solve it?

1

There are 1 answers

5
Devrim On BEST ANSWER
<article>
  <section>
    <table>
      <tbody>
        <tr>
          <td>
            <img src="https://mirror-api-playground.appspot.com/links/movie.jpg" height="80px" width="80px">            
          </td>
          <td>
           image 1 Name
          </td>
        </tr>
        <tr>
          <td>
            <img src="https://mirror-api-playground.appspot.com/links/movie.jpg" height="80px" width="80px">            
          </td>
          <td>
            image 2 Name
          </td>
        </tr>        
      </tbody>
    </table>
  </section>
</article>

Output:
enter image description here

I strongly recommend you to use google's playground site. Edit those templates and have fun:)