Android Open Source - android-unittesting To Do






From Project

Back to project page android-unittesting.

License

The source code is released under:

Apache License

If you think the Android project android-unittesting 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.devfest.dagger.data;
//from www  .  j a v a 2  s  .  c  o m
import android.os.Parcel;
import android.os.Parcelable;

public class ToDo implements Parcelable {

    private Long mId;

    private String mTitle;

    /*
     * Default constructor for general object creation
     */
    public ToDo() {

    }

    /*
     * Constructor needed for parcelable object creation
     */
    public ToDo(Parcel item) {
        mId = item.readLong();
        mTitle = item.readString();
    }

    public Long getId() {
        return mId;
    }

    public void setId(Long id) {
        this.mId = id;
    }

    public String getTitle() {
        return mTitle;
    }

    public void setTitle(String title) {
        this.mTitle = title;
    }

    /*
     * Used to generate parcelable classes from a parcel
     */
    public static final Parcelable.Creator<ToDo> CREATOR
            = new Parcelable.Creator<ToDo>() {
        public ToDo createFromParcel(Parcel in) {
            return new ToDo(in);
        }

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

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        if(mId != null) {
            parcel.writeLong(mId);
        }
        else {
            parcel.writeLong(-1);
        }
        parcel.writeString(mTitle);
    }
}




Java Source Code List

com.devfest.dagger.app.DataModule.java
com.devfest.dagger.app.MainActivity.java
com.devfest.dagger.app.MainApplication.java
com.devfest.dagger.app.ToDoAdapter.java
com.devfest.dagger.data.DataProvider.java
com.devfest.dagger.data.SqlLiteProvider.java
com.devfest.dagger.data.ToDo.java
com.hp.mvp.DataModule.java
com.hp.mvp.MainActivity.java
com.hp.mvp.MainApplication.java
com.hp.mvp.MainPresenter.java
com.hp.mvp.ToDoAdapter.java
com.hp.mvp.ToDoPresenter.java
com.hp.mvp.ToDoView.java
com.hp.mvp.data.DataProvider.java
com.hp.mvp.data.SqlLiteProvider.java
com.hp.mvp.data.ToDo.java