From 106fd654474da27609d219947bf2d4ec75fd6518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Jans=C3=B8n=20Engvik?= Date: Sun, 13 Jan 2013 22:03:10 +0100 Subject: [PATCH] Fixed main screen buttons. --- TODO | 2 - res/layout/main_tile_join.xml | 8 +- res/layout/main_tile_news.xml | 7 +- res/layout/main_tile_program.xml | 8 +- res/layout/main_tile_tickets.xml | 8 +- .../app/JSONParserProgram.java | 74 +++++++++---------- .../app/network/ImageLoader.java | 13 +++- 7 files changed, 72 insertions(+), 48 deletions(-) diff --git a/TODO b/TODO index ce6511b..d507a0d 100644 --- a/TODO +++ b/TODO @@ -2,8 +2,6 @@ Prioriteringer fra 0-100. Før lansering: [0] Dersom ingen billetter tilgjengelig for online kjøp, si ifra om dette. -[0] Få knappene til å se pene ut. -[0] Fiks bilde URL. [5] Skrive om "bli med" til om oss, ha med bli med tekst, evt. egen BLI MED KNAPP som går til JoinUsActivity. Etter: diff --git a/res/layout/main_tile_join.xml b/res/layout/main_tile_join.xml index abb00f9..488b109 100644 --- a/res/layout/main_tile_join.xml +++ b/res/layout/main_tile_join.xml @@ -2,9 +2,15 @@ + + + + + + + { try { HttpURLConnection con = (HttpURLConnection)new URL(params[0]).openConnection(); InputStream is = con.getInputStream(); - - d = Drawable.createFromStream(is, params[0].toString()); + + // + if (is == null) + return null; + d = Drawable.createFromStream(is, params[0].toString()); + + if (d == null) + return null; cache.put(params[0], d); + } catch (IOException e) { - Log.e("DNSapp", "An exception has occured while downloading images!", e); + Log.e("DNSapp", "An exception has occured while downloading images!"); } return d; }