2

I've just updated my glasses to XE12. Since then the Card doesn't behave in the same way as before.

I want to display a card of text. Here is my current code, I had to change "setFullScreenImages" by "setImageLayout()" as it was deprecated.

card = new Card(this);
card.setText("Ce chocolat contient :\nSucre, beurre de cacao, cacao (min 31.5%), lait en poudre entier, liqueur de cacao, lécithine, vanilline.");
card.setImageLayout(ImageLayout.FULL);
card.addImage(R.drawable.card_chocolate_background);
card.setFootnote("Info produit");

The result I got with XE11 was: XE11 result

The result with XE12: XE12 result

Can someone tell me how to display the text correctly ? I have a demo tomorrow and I'm a bit stucked with this autoupdate.

Thanks !

Kara
  • 6,115
  • 16
  • 50
  • 57
Hrk
  • 2,725
  • 5
  • 29
  • 44

1 Answers1

1

This was indeed a change in the full-screen image layout in XE12, to match other card styles used on Glass.

If you're just using the Card to generate views, you can duplicate the old look with a custom layout for the time being. If you need it to insert static cards, on the other hand, you'll either need to use the new layout or switch to ImageLayout.LEFT to fit some more text on the card. You may want to follow issue 315 on our issue tracker, since it sounds like that functionality would help you with creating more customized layouts.

Tony Allevato
  • 6,429
  • 1
  • 29
  • 34