Android Open Source - scala1_android Struct_ Event






From Project

Back to project page scala1_android.

License

The source code is released under:

Copyright (c) 2012, Magnetic Bear Studios Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditio...

If you think the Android project scala1_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.magneticbear.scala1;
/*from   w w w. j  av a  2 s . c om*/
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import android.text.format.Time;

public class Struct_Event 
{
  public Boolean isSeparator;
  
  public String event_or_seperator_title;
  public Date   start_date;
  public String location;
  public int    eventid;
  
  public Struct_Event(String Title, String Start, String Location, int EventID)
  {
    isSeparator = false;
    event_or_seperator_title = Title;
    location    = Location;
    eventid     = EventID;
    start_date  = readDate(Start);
  }
  public Struct_Event(String Title)
  {
    isSeparator = true;
    event_or_seperator_title       = Title;
  }
  
  private Date readDate(String DateString)
  {
    // pull date and time from start string
    //                      9   10   11      16    19     23
    // SAMPLE::    2012-10-02    T    10:00   :00   .000   Z
    //
    // FIRST 10 CHARS ARE SIMPLE DATE
    String datestring = DateString.substring(0, 10);
    
    // CHARS 11->16 ARE TIME HH:MM
    String timestring =  DateString.substring(11, 16); 
     
    // Format date
    Date date = null;
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd:kk:mm"); 
    try 
    {
      date = simpleDateFormat.parse(datestring + ":" + timestring);
    } 
    catch (ParseException e) 
    {
      e.printStackTrace();
    } 
    
    return date;
  }
}




Java Source Code List

com.koushikdutta.urlimageviewhelper.Constants.java
com.koushikdutta.urlimageviewhelper.DiskLruCache.java
com.koushikdutta.urlimageviewhelper.LruCache.java
com.koushikdutta.urlimageviewhelper.SoftReferenceHashTable.java
com.koushikdutta.urlimageviewhelper.UrlImageCache.java
com.koushikdutta.urlimageviewhelper.UrlImageViewCallback.java
com.koushikdutta.urlimageviewhelper.UrlImageViewHelper.java
com.koushikdutta.urlimageviewhelper.UrlLruCache.java
com.koushikdutta.urlimageviewhelper.WrapperDrawable.java
com.magneticbear.scala1.About.java
com.magneticbear.scala1.EventInfo.java
com.magneticbear.scala1.Events.java
com.magneticbear.scala1.Favourites.java
com.magneticbear.scala1.Home.java
com.magneticbear.scala1.OpenAllSSLSocketFactory.java
com.magneticbear.scala1.Playground.java
com.magneticbear.scala1.ServerData.java
com.magneticbear.scala1.SpeakersInfo.java
com.magneticbear.scala1.Speakers.java
com.magneticbear.scala1.Splash.java
com.magneticbear.scala1.Struct_Event_Adapter.java
com.magneticbear.scala1.Struct_Event.java
com.magneticbear.scala1.Struct_Speaker_Adapter.java
com.magneticbear.scala1.Struct_Speaker.java
com.magneticbear.scala1.UserData.java