aboutsummaryrefslogtreecommitdiffstats
path: root/libs/SwipyRefreshLayout/src/main/java/com/orangegangsters/github/swipyrefreshlayout/library/SwipyRefreshLayoutDirection.java
blob: af5d6c2d1536f3c072c91be6fa83ac311c565feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.orangegangsters.github.swipyrefreshlayout.library;

/**
 * Created by oliviergoutay on 1/23/15.
 */
public enum SwipyRefreshLayoutDirection {

    TOP(0),
    BOTTOM(1),
    BOTH(2);

    private int mValue;

    SwipyRefreshLayoutDirection(int value) {
        this.mValue = value;
    }

    public static SwipyRefreshLayoutDirection getFromInt(int value) {
        for (SwipyRefreshLayoutDirection direction : SwipyRefreshLayoutDirection.values()) {
            if (direction.mValue == value) {
                return direction;
            }
        }
        return BOTH;
    }

}