Archived
Fixed ticket page.
This commit is contained in:
1 parent
106fd65447
commit
04a1c95d1e
4 files changed
+18
-10
No files matched your search
@@ -7,6 +7,8 @@ import java.util.LinkedList;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
public class DataHandler implements Serializable {
|
||||
private static final long serialVersionUID = 6787541405689146002L;
|
||||
|
||||
@@ -30,13 +32,18 @@ public class DataHandler implements Serializable {
|
||||
|
||||
Event event = new Event(intId, title, description, date, location, text, category, imageUri);
|
||||
|
||||
int regularPrice = 0;
|
||||
int memberPrice = 0;
|
||||
try {
|
||||
int regularPrice = Integer.parseInt(priceReg);
|
||||
int memberPrice = Integer.parseInt(priceMem);
|
||||
|
||||
event.setFbUriStr(fbUriStr);
|
||||
event.setTicketsInfo(regularPrice, memberPrice, ticketUriStr);
|
||||
} catch (NumberFormatException e1) { /* Do nothing. */ }
|
||||
regularPrice = Integer.parseInt(priceReg);
|
||||
memberPrice = Integer.parseInt(priceMem);
|
||||
} catch (NumberFormatException e1) {
|
||||
/* Do nothing. */
|
||||
Log.w("TAG", e1.toString());
|
||||
}
|
||||
event.setFbUriStr(fbUriStr);
|
||||
event.setTicketsInfo(regularPrice, memberPrice, ticketUriStr);
|
||||
|
||||
|
||||
|
||||
events.add(event);
|
||||
|
||||
@@ -97,7 +97,8 @@ public class Event implements Serializable {
|
||||
Uri ticketUri = null;
|
||||
|
||||
if (ticketUriStr != null
|
||||
&& ticketUriStr.startsWith("http://")
|
||||
&& (ticketUriStr.startsWith("http://")
|
||||
|| ticketUriStr.startsWith("https://"))
|
||||
&& ticketUriStr.length() > 7) {
|
||||
ticketUri = Uri.parse(ticketUriStr);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class JSONParserProgram implements IParser {
|
||||
category = tempJSON.getString("event");
|
||||
|
||||
tempJSON = tempJSON.getJSONObject("custom_fields");
|
||||
ticketUrl = tempJSON.getJSONArray("_neuf_events_bs_url").getString(0);
|
||||
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);
|
||||
|
||||
@@ -22,10 +22,10 @@ public class ImageLoader extends AsyncTask<String, Void, Drawable> {
|
||||
private final int imageId;
|
||||
private int progressbarId = -1;
|
||||
|
||||
public ImageLoader(ViewGroup parent, int position, int imageId) {
|
||||
public ImageLoader(ViewGroup parent, int position, int imageViewId) {
|
||||
this.parent = parent;
|
||||
this.position = position;
|
||||
this.imageId = imageId;
|
||||
this.imageId = imageViewId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user