Android Open Source - XKCD-Reader Comic






From Project

Back to project page XKCD-Reader.

License

The source code is released under:

Apache License

If you think the Android project XKCD-Reader 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.davidtpate.xkcd.model;
//from   w  w w  .  ja v  a 2 s. c o m
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;

public class Comic implements Parcelable {
    @SerializedName("num") Integer number;
    @SerializedName("title") String title;
    @SerializedName("safe_title") String safeTitle;
    @SerializedName("alt") String subTitle;
    @SerializedName("img") String imageUrl;
    @SerializedName("transcript") String transcript;
    @SerializedName("link") String link;
    @SerializedName("month") String month;
    @SerializedName("day") String day;
    @SerializedName("year") String year;

    public Comic(Parcel source) {
        if (source != null) {
            number = source.readInt();
            title = source.readString();
            safeTitle = source.readString();
            subTitle = source.readString();
            imageUrl = source.readString();
            transcript = source.readString();
            link = source.readString();
            month = source.readString();
            day = source.readString();
            year = source.readString();
        }
    }

    public Integer getNumber() {
        return number;
    }

    public String getTitle() {
        return title;
    }

    public String getSafeTitle() {
        return safeTitle;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public String getTranscript() {
        return transcript;
    }

    public String getLink() {
        return link;
    }

    public String getMonth() {
        return month;
    }

    public String getDay() {
        return day;
    }

    public String getYear() {
        return year;
    }

    /**
     * Describe the kinds of special objects contained in this Parcelable's
     * marshalled representation.
     *
     * @return a bitmask indicating the set of special object types marshalled
     * by the Parcelable.
     */
    @Override public int describeContents() {
        return 0;
    }

    /**
     * Flatten this object in to a Parcel.
     *
     * @param dest The Parcel in which the object should be written.
     * @param flags Additional flags about how the object should be written.
     * May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
     */
    @Override public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(number);
        dest.writeString(title);
        dest.writeString(safeTitle);
        dest.writeString(subTitle);
        dest.writeString(imageUrl);
        dest.writeString(transcript);
        dest.writeString(link);
        dest.writeString(month);
        dest.writeString(day);
        dest.writeString(year);
    }

    public static final Parcelable.Creator<Comic> CREATOR = new Parcelable.Creator<Comic>() {

        @Override
        public Comic createFromParcel(Parcel source) {
            return new Comic(source);
        }

        public Comic[] newArray(int size) {
            return new Comic[size];
        }

        ;
    };
}




Java Source Code List

android.support.v4.app.FixedFragmentStatePagerAdapter.java
com.android.debug.hv.ViewServer.java
com.davidtpate.xkcd.BaseApplication.java
com.davidtpate.xkcd.adapter.ComicPagerAdapter.java
com.davidtpate.xkcd.model.Comic.java
com.davidtpate.xkcd.model.Constants.java
com.davidtpate.xkcd.preferences.SharedPreferencesHelper.java
com.davidtpate.xkcd.provider.SystemUiStateProvider.java
com.davidtpate.xkcd.ui.About.java
com.davidtpate.xkcd.ui.ComicFragmentActivity.java
com.davidtpate.xkcd.ui.ComicFragment.java
com.davidtpate.xkcd.ui.CurrentComic.java
com.davidtpate.xkcd.ui.base.BaseActivity.java
com.davidtpate.xkcd.ui.base.BaseFragmentActivity.java
com.davidtpate.xkcd.ui.base.BaseFragment.java
com.davidtpate.xkcd.ui.base.BaseListActivity.java
com.davidtpate.xkcd.ui.base.BaseListFragment.java
com.davidtpate.xkcd.ui.dialog.JumpToDialogFragment.java
com.davidtpate.xkcd.util.AndroidUtil.java
com.davidtpate.xkcd.util.ComicUtil.java
com.davidtpate.xkcd.util.Ln.java
com.davidtpate.xkcd.util.MathUtil.java
com.davidtpate.xkcd.util.Strings.java