Erroring with Bundle of HTML Pages

橙三吉。 提交于 2019-12-24 06:59:09

问题


I am trying to create a tree structure that is more than 3 levels (Bundle Cover -> Bundled Cards -> Menu Items) by using HTML pages.

I have a bundle of cards with a cover that displays appropriately all using setText().

Then I changed one of the cards to setHtml() instead of setText() and used the HTML template from the playground to test.

Then I added HTML pages to that card using an ArrayList<String>. Using the playground, I get the card below. When I access on Glass, I get "Stopped unexpectedly."

This is definitely a bug but I want to know if there is plans to allow this 4 level tree (Bundle Cover -> HTML Cover -> HTML Pages -> Menu Items).

{
  "kind": "mirror#timelineItem",
  "id": "b599da0d-494c-4ac9-ac24-bb5bddc1a209",
  "bundleId": "customBundle",
  "created": "2013-06-12T17:32:30.636Z",
  "updated": "2013-06-12T17:32:30.636Z",
  "etag": "\"r3ghbVW9Rp1kDP4UexS05_pFx4E/T3Df9IBGUombFb5U_Y1rda4CWwM\"",
  "html": "<article>\n  <section>\n    <div class=\"text-x-large\">\n      <p class=\"yellow\">8:00<sub>PM</sub></p>\n      <p>Dinner with folks tonight</p>\n    </div>\n  </section>\n  <footer>\n    <div>Their place</div>\n  </footer>\n</article>\n",
  "htmlPages": [
    "<article>\n  <section>\n    <table class=\"align-justify\"> \n      <tbody>\n        <tr>\n          <td>AAPL</td>\n          <td>503.73</td>\n          <td class=\"red\">-16.57 (3.18%)</td>\n        </tr>\n        <tr>\n          <td>AMZN</td>\n          <td>274.03</td>\n          <td class=\"green\">+6.09 (2.27%)</td>\n        </tr>\n        <tr>\n          <td>GOOG</td>\n          <td>727.58</td>\n          <td class=\"red\">-12.41 (1.68%)</td>\n        </tr>\n      </tbody>\n    </table>\n  </section>\n</article>\n",
    "<article>\n  <section>\n    <ul class=\"text-x-small\">\n      <li>Gingerbread</li>\n      <li>Chocolate Chip Cookies</li>\n      <li>Tiramisu</li>\n      <li>Donuts</li>\n      <li>Sugar Plum Gummies</li>\n    </ul>\n  </section>\n  <footer>\n    <p>Grocery list</p>\n  </footer>\n</article>\n"
  ],
  "menuItems": [
    {
      "action": "REPLY"
    },
    {
      "id": "moreInfo",
      "action": "CUSTOM",
      "values": [
        {
          "displayName": "Get More Info",
          "iconUrl": "https://MYAPP.appspot.com/static/images/drill.png"
        }
      ]
    },
    {
      "action": "TOGGLE_PINNED"
    }
  ],
  "notification": {
    "level": "DEFAULT"
  }
}

回答1:


You are correct that if you try to both paginate and thread bundles, you get some wonky behavior. You will see the bundle cover, but upon pressing into it, Glass reports an unexpected stop.

It doesn't explicitly say that you can't do this in the docs, and we can expect this to work in the future, even though it does not work now, based on ...

Your exact issue has already been reported as a bug in the issue tracker:

https://code.google.com/p/google-glass-api/issues/detail?id=77

I would go star that issue and wait for updates. In the meantime, you will have to live with 3 levels of nesting with either paging or threading. In the future it does appear that four levels will be possible as follows:

cover -> items in the bundle -> their pages -> their actions



来源:https://stackoverflow.com/questions/17072031/erroring-with-bundle-of-html-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!