// Path: app/src/main/java/de/mygrades/main/events/ScrapeProgressEvent.java
// public class ScrapeProgressEvent {
//     private int currentStep;
//     private int stepCount;
//     private boolean isScrapeForOverview;
//     private String gradeHash;
// 
//     public ScrapeProgressEvent(int currentStep, int stepCount) {
//         this.currentStep = currentStep;
//         this.stepCount = stepCount;
//         this.isScrapeForOverview = false;
//         this.gradeHash = null;
//     }
// 
//     public ScrapeProgressEvent(int currentStep, int stepCount, boolean isScrapeForOverview) {
//         this(currentStep, stepCount);
//         this.isScrapeForOverview = isScrapeForOverview;
//     }
// 
//     public ScrapeProgressEvent(int currentStep, int stepCount, boolean isScrapeForOverview, String gradeHash) {
//         this(currentStep, stepCount, isScrapeForOverview);
//         this.gradeHash = gradeHash;
//     }
// 
//     public int getCurrentStep() {
//         return currentStep;
//     }
// 
//     public void setCurrentStep(int currentStep) {
//         this.currentStep = currentStep;
//     }
// 
//     public int getStepCount() {
//         return stepCount;
//     }
// 
//     public void setStepCount(int stepCount) {
//         this.stepCount = stepCount;
//     }
// 
//     public boolean isScrapeForOverview() {
//         return isScrapeForOverview;
//     }
// 
//     public void setIsScrapeForOverview(boolean isScrapeForOverview) {
//         this.isScrapeForOverview = isScrapeForOverview;
//     }
// 
//     public String getGradeHash() {
//         return gradeHash;
//     }
// 
//     public void setGradeHash(String gradeHash) {
//         this.gradeHash = gradeHash;
//     }
// }
// 
// Path: app/src/main/java/de/mygrades/util/Constants.java
// public class Constants {
// 
//     // secure preferences constants
//     public static final String NOT_SO_SECURE_PREF_FILE = "userdata";
//     public static final String PREF_KEY_USERNAME = "username";
//     public static final String PREF_KEY_PASSWORD = "password";
// 
//     // normal preferences constants
//     public static final String PREF_KEY_UNIVERSITY_ID = "university_id";
//     public static final String PREF_KEY_RULE_ID = "rule_id";
//     public static final String PREF_KEY_INITIAL_LOADING_DONE = "initial_loading_done";
//     public static final String PREF_KEY_LAST_UPDATED_AT = "last_updated_at";
//     public static final String PREF_KEY_SCRAPING_FAILS_INTERVAL = "scraping_fails_interval";
//     public static final String PREF_KEY_ALARM_ERROR_SCRAPING_COUNT = "alarm_error_scraping_count";
//     public static final String PREF_KEY_DISMISSED_NOTIFICATION_INFO = "dismissed_notification_info";
//     public static final String PREF_KEY_DISMISSED_DONATION_INFO = "dismissed_donation_info";
//     public static final String PREF_KEY_DISMISSED_RATING_INFO = "dismissed_rating_info";
//     public static final String PREF_KEY_DISMISSED_EDIT_MODE_INFO = "dismissed_edit_mode_info";
//     public static final String PREF_KEY_APPLICATION_LAUNCHES_COUNTER = "application_launches_counter";
// 
//     // Scraping status instance state
//     public static final String INSTANCE_IS_SCRAPING_STATE = "is_scraping_state";
//     public static final String INSTANCE_PROGRESS_STATE = "progress_state";
// 
//     // grade entry 'seen' state
//     public static final int GRADE_ENTRY_SEEN = 0;
//     public static final int GRADE_ENTRY_NEW = 1;
//     public static final int GRADE_ENTRY_UPDATED = 2;
// }


import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.FrameLayout;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Date;
import de.greenrobot.event.EventBus;
import de.mygrades.R;
import de.mygrades.main.events.ScrapeProgressEvent;
import de.mygrades.util.Constants;
import in.srain.cube.views.ptr.PtrFrameLayout;
import in.srain.cube.views.ptr.PtrUIHandler;
import in.srain.cube.views.ptr.indicator.PtrIndicator;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.pnikosis.materialishprogress.ProgressWheel;
import org.w3c.dom.Text;
import in.srain.cube.views.ptr.indicator.PtrIndicator;
import java.text.SimpleDateFormat;
import java.util.Date;
                tvHeaderText.setText(R.string.ptr_header_release_to_refresh);
            }
        }
    }

    /**
     * Increases progress on progressWheel.
     *
     * @param currentStep current step
     * @param stepCount count of steps
     */
    public void increaseProgress(int currentStep, int stepCount) {
        progressWheel.increaseProgress(currentStep, stepCount);
    }


    /**
     * Set progress on progressWheel.
     *
     * @param progress Progress of Loading
     */
    public void setProgress(float progress) {
        progressWheel.setProgress(progress);
    }

    /**
     * Save attributes regarding ptr to instance state.
     * @param outState instance state bundle
     */
    public void saveInstanceState(Bundle outState) {
// Path: app/src/main/java/de/mygrades/main/events/ScrapeProgressEvent.java
// public class ScrapeProgressEvent {
//     private int currentStep;
//     private int stepCount;
//     private boolean isScrapeForOverview;
//     private String gradeHash;
// 
//     public ScrapeProgressEvent(int currentStep, int stepCount) {
//         this.currentStep = currentStep;
//         this.stepCount = stepCount;
//         this.isScrapeForOverview = false;
//         this.gradeHash = null;
//     }
// 
//     public ScrapeProgressEvent(int currentStep, int stepCount, boolean isScrapeForOverview) {
//         this(currentStep, stepCount);
//         this.isScrapeForOverview = isScrapeForOverview;
//     }
// 
//     public ScrapeProgressEvent(int currentStep, int stepCount, boolean isScrapeForOverview, String gradeHash) {
//         this(currentStep, stepCount, isScrapeForOverview);
//         this.gradeHash = gradeHash;
//     }
// 
//     public int getCurrentStep() {
//         return currentStep;
//     }
// 
//     public void setCurrentStep(int currentStep) {
//         this.currentStep = currentStep;
//     }
// 
//     public int getStepCount() {
//         return stepCount;
//     }
// 
//     public void setStepCount(int stepCount) {
//         this.stepCount = stepCount;
//     }
// 
//     public boolean isScrapeForOverview() {
//         return isScrapeForOverview;
//     }
// 
//     public void setIsScrapeForOverview(boolean isScrapeForOverview) {
//         this.isScrapeForOverview = isScrapeForOverview;
//     }
// 
//     public String getGradeHash() {
//         return gradeHash;
//     }
// 
//     public void setGradeHash(String gradeHash) {
//         this.gradeHash = gradeHash;
//     }
// }
// 
// Path: app/src/main/java/de/mygrades/util/Constants.java
// public class Constants {
// 
//     // secure preferences constants
//     public static final String NOT_SO_SECURE_PREF_FILE = "userdata";
//     public static final String PREF_KEY_USERNAME = "username";
//     public static final String PREF_KEY_PASSWORD = "password";
// 
//     // normal preferences constants
//     public static final String PREF_KEY_UNIVERSITY_ID = "university_id";
//     public static final String PREF_KEY_RULE_ID = "rule_id";
//     public static final String PREF_KEY_INITIAL_LOADING_DONE = "initial_loading_done";
//     public static final String PREF_KEY_LAST_UPDATED_AT = "last_updated_at";
//     public static final String PREF_KEY_SCRAPING_FAILS_INTERVAL = "scraping_fails_interval";
//     public static final String PREF_KEY_ALARM_ERROR_SCRAPING_COUNT = "alarm_error_scraping_count";
//     public static final String PREF_KEY_DISMISSED_NOTIFICATION_INFO = "dismissed_notification_info";
//     public static final String PREF_KEY_DISMISSED_DONATION_INFO = "dismissed_donation_info";
//     public static final String PREF_KEY_DISMISSED_RATING_INFO = "dismissed_rating_info";
//     public static final String PREF_KEY_DISMISSED_EDIT_MODE_INFO = "dismissed_edit_mode_info";
//     public static final String PREF_KEY_APPLICATION_LAUNCHES_COUNTER = "application_launches_counter";
// 
//     // Scraping status instance state
//     public static final String INSTANCE_IS_SCRAPING_STATE = "is_scraping_state";
//     public static final String INSTANCE_PROGRESS_STATE = "progress_state";
// 
//     // grade entry 'seen' state
//     public static final int GRADE_ENTRY_SEEN = 0;
//     public static final int GRADE_ENTRY_NEW = 1;
//     public static final int GRADE_ENTRY_UPDATED = 2;
// }


// Path: app/src/main/java/de/mygrades/view/PtrHeader.java
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.FrameLayout;
import android.widget.TextView;
import java.text.SimpleDateFormat;
import java.util.Date;
import de.greenrobot.event.EventBus;
import de.mygrades.R;
import de.mygrades.main.events.ScrapeProgressEvent;
import de.mygrades.util.Constants;
import in.srain.cube.views.ptr.PtrFrameLayout;
import in.srain.cube.views.ptr.PtrUIHandler;
import in.srain.cube.views.ptr.indicator.PtrIndicator;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.pnikosis.materialishprogress.ProgressWheel;
import org.w3c.dom.Text;
import in.srain.cube.views.ptr.indicator.PtrIndicator;
import java.text.SimpleDateFormat;
import java.util.Date;

                tvHeaderText.setText(R.string.ptr_header_release_to_refresh);
            }
        }
    }

    /**
     * Increases progress on progressWheel.
     *
     * @param currentStep current step
     * @param stepCount count of steps
     */
    public void increaseProgress(int currentStep, int stepCount) {
        progressWheel.increaseProgress(currentStep, stepCount);
    }


    /**
     * Set progress on progressWheel.
     *
     * @param progress Progress of Loading
     */
    public void setProgress(float progress) {
        progressWheel.setProgress(progress);
    }

    /**
     * Save attributes regarding ptr to instance state.
     * @param outState instance state bundle
     */
    public void saveInstanceState(Bundle outState) {
        outState.putBoolean(Constants.INSTANCE_IS_SCRAPING_STATE, isScraping);