Android Open Source - circle-timer-widget Circle Timer Saved State






From Project

Back to project page circle-timer-widget.

License

The source code is released under:

Copyright (c) 2014, Nikolai Doronin All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:...

If you think the Android project circle-timer-widget 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.github.lassana.circletimerwidget.widget;
/*from  ww w .j  a v  a 2  s .  c o  m*/
import android.os.Parcel;
import android.os.Parcelable;
import android.preference.Preference;
import android.support.annotation.NonNull;

/**
* @author Nikolai Doronin
* @since 1/2/15.
*/
class CircleTimerSavedState extends Preference.BaseSavedState {
    int position;

    public CircleTimerSavedState(Parcel source) {
        super(source);
    }

    public CircleTimerSavedState(Parcelable superState) {
        super(superState);
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(position);
    }

    public static final Creator<CircleTimerSavedState> CREATOR = new Creator<CircleTimerSavedState>() {
        @Override
        public CircleTimerSavedState createFromParcel(Parcel source) {
            return new CircleTimerSavedState(source);
        }

        @Override
        public CircleTimerSavedState[] newArray(int size) {
            return new CircleTimerSavedState[size];
        }
    };

}




Java Source Code List

com.github.lassana.circletimerwidget.MyActivity.java
com.github.lassana.circletimerwidget.widget.CircleTimerListener.java
com.github.lassana.circletimerwidget.widget.CircleTimerSavedState.java
com.github.lassana.circletimerwidget.widget.CircleTimerTouchHelper.java
com.github.lassana.circletimerwidget.widget.CircleTimerView.java