Android Open Source - infinite-grid Record Descriptor






From Project

Back to project page infinite-grid.

License

The source code is released under:

Apache License

If you think the Android project infinite-grid 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.kennethmaffei.infinitegrid;
/*from   w  w w  . j av a  2  s. c o  m*/
import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * Descriptor class for a database image
 * Note that we do not include the image as a parcelable item. It's not necessary
 * 
 * @author Kenneth Maffei
 *
 */
public class RecordDescriptor implements Parcelable{
  Bitmap image;  //The image
  String url;    //The image source
  String description; //The description from the db
  String link; //The webview url that this record links to
  
  private void readFromParcel(Parcel in) {        
        url = in.readString();   
        description = in.readString();   
        link = in.readString();   
    }   
  
  @Override
  public int describeContents() {
    return 0;
  }
  
  @Override
  public void writeToParcel(Parcel out, int flags) {   
        out.writeString(url);   
        out.writeString(description); 
        out.writeString(link);
  }
  
  public static final Parcelable.Creator<RecordDescriptor> CREATOR = new Parcelable.Creator<RecordDescriptor>() {   
       
        public RecordDescriptor createFromParcel(Parcel in) {   
            RecordDescriptor record = new RecordDescriptor();  
            record.readFromParcel(in);
            return record;
        }   
    
        public RecordDescriptor[] newArray(int size) {   
            return new RecordDescriptor[size];   
        }   
           
    }; 
}




Java Source Code List

com.kennethmaffei.infinitegrid.Constants.java
com.kennethmaffei.infinitegrid.HTTPCommManager.java
com.kennethmaffei.infinitegrid.HTTPRequest.java
com.kennethmaffei.infinitegrid.MainActivity.java
com.kennethmaffei.infinitegrid.MainView.java
com.kennethmaffei.infinitegrid.RecordDescriptor.java
com.kennethmaffei.infinitegrid.TaskFragment.java
com.kennethmaffei.infinitegrid.Tile.java
com.kennethmaffei.infinitegrid.Tiles.java
disklrucache.DiskLruCache.java
disklrucache.DiskLruOperations.java
disklrucache.StrictLineReader.java
disklrucache.Util.java
webview.WebViewActivity.java