Hello I am new with Google Glass and am wondering if I can display an image from the web as my background image.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String address = "http://archiveteam.org/images/1/15/Apple-logo.jpg";
Card myCard = new Card(this);
myCard.setText("Hello, World!");
myCard.setFootnote("First Glassware for Glass");
myCard.setImageLayout(Card.ImageLayout.FULL);
myCard.addImage(new URL(address));
View cardView = myCard.getView();
// Display the card we just created
setContentView(cardView);
}
I saw in a few threads that myCard.addImage(new URL(address)) was the solution, but I am getting the following error on that line.
The method addImage(Drawable) in the type Card is not applicable for the arguments (URL)
Any help would be appreciated, thanks in advance!