Archived
Fixed main screen buttons.
This commit is contained in:
1 parent
a47b9f23ee
commit
106fd65447
7 files changed
+72
-48
No files matched your search
@@ -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:
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_menu_join"
|
||||
style="@style/MetroTile"
|
||||
android:background="@drawable/blimed"
|
||||
android:onClick="joinButton" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/blimed"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<TextView
|
||||
style="@style/MetroTileText_bg"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_menu_news"
|
||||
style="@style/MetroTile"
|
||||
android:background="@drawable/nyheter"
|
||||
android:onClick="newsButton" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/nyheter"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitCenter" />
|
||||
<TextView
|
||||
style="@style/MetroTileText_bg"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_menu_program"
|
||||
style="@style/MetroTile"
|
||||
android:background="@drawable/program"
|
||||
android:onClick="programButton" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/program"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<TextView
|
||||
style="@style/MetroTileText_bg"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_menu_tickets"
|
||||
style="@style/MetroTile"
|
||||
android:background="@drawable/billett"
|
||||
android:onClick="ticketButton" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/billett"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<TextView
|
||||
style="@style/MetroTileText_bg"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -50,51 +50,47 @@ public class JSONParserProgram implements IParser {
|
||||
|
||||
for (int i = 0;i < count;i++) {
|
||||
// Variables directly from the JSONObject
|
||||
tempJSON = eventArray.getJSONObject(i);
|
||||
id = tempJSON.getString("id");
|
||||
title = tempJSON.getString("title");
|
||||
description = tempJSON.getString("excerpt");
|
||||
date = tempJSON.getString("date");
|
||||
text = tempJSON.getString("content");
|
||||
image = tempJSON.getString("thumbnail");
|
||||
Log.d("TMB", image);
|
||||
category = tempJSON.getString("event");
|
||||
|
||||
tempJSON = tempJSON.getJSONObject("custom_fields");
|
||||
ticketUrl = tempJSON.getJSONArray("_neuf_events_bs_url").getString(0);
|
||||
fbUrl = tempJSON.getJSONArray("_neuf_events_fb_url").getString(0);
|
||||
location = tempJSON.getJSONArray("_neuf_events_venue").getString(0);
|
||||
priceReg = tempJSON.getJSONArray("_neuf_events_price_regular").getString(0);
|
||||
priceMem = tempJSON.getJSONArray("_neuf_events_price_member").getString(0);
|
||||
date = tempJSON.getJSONArray("_neuf_events_starttime").getString(0);
|
||||
|
||||
// This is as ugly as it gets. Refactor?
|
||||
dh.insertEvent(id,
|
||||
title,
|
||||
description,
|
||||
date,
|
||||
location,
|
||||
text,
|
||||
category,
|
||||
image,
|
||||
priceReg,
|
||||
priceMem,
|
||||
ticketUrl,
|
||||
fbUrl);
|
||||
try {
|
||||
tempJSON = eventArray.getJSONObject(i);
|
||||
id = tempJSON.getString("id");
|
||||
title = tempJSON.getString("title");
|
||||
description = tempJSON.getString("excerpt");
|
||||
date = tempJSON.getString("date");
|
||||
text = tempJSON.getString("content");
|
||||
image = tempJSON.getString("thumbnail");
|
||||
category = tempJSON.getString("event");
|
||||
|
||||
tempJSON = tempJSON.getJSONObject("custom_fields");
|
||||
ticketUrl = tempJSON.getJSONArray("_neuf_events_bs_url").getString(0);
|
||||
fbUrl = tempJSON.getJSONArray("_neuf_events_fb_url").getString(0);
|
||||
location = tempJSON.getJSONArray("_neuf_events_venue").getString(0);
|
||||
priceReg = tempJSON.getJSONArray("_neuf_events_price_regular").getString(0);
|
||||
priceMem = tempJSON.getJSONArray("_neuf_events_price_member").getString(0);
|
||||
date = tempJSON.getJSONArray("_neuf_events_starttime").getString(0);
|
||||
|
||||
// This is as ugly as it gets. Refactor?
|
||||
dh.insertEvent(id,
|
||||
title,
|
||||
description,
|
||||
date,
|
||||
location,
|
||||
text,
|
||||
category,
|
||||
image,
|
||||
priceReg,
|
||||
priceMem,
|
||||
ticketUrl,
|
||||
fbUrl);
|
||||
} catch (JSONException e) {
|
||||
Log.e("json-parser", e.getMessage());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
Log.e("json-parser", e.getMessage());
|
||||
return dh;
|
||||
} catch (JSONException e) {
|
||||
Log.e("json-parser", e.getMessage());
|
||||
return dh;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return dh;
|
||||
}
|
||||
}
|
||||
@@ -40,11 +40,18 @@ public class ImageLoader extends AsyncTask<String, Void, Drawable> {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user