-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from Omega-R/develop
Develop
- Loading branch information
Showing
4 changed files
with
148 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
omegarecyclerview/src/main/java/com/omega_r/libs/omegarecyclerview/header/SectionSize.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.omega_r.libs.omegarecyclerview.header; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public enum SectionSize { | ||
|
||
CUSTOM(-1), | ||
FULL(0), | ||
DEFAULT(1); | ||
|
||
private final int value; | ||
private static final Map<Integer, SectionSize> map = new HashMap<>(); | ||
|
||
SectionSize(int value) { | ||
this.value = value; | ||
} | ||
|
||
static { | ||
for (SectionSize sectionSize: SectionSize.values()) { | ||
map.put(sectionSize.value, sectionSize); | ||
} | ||
} | ||
|
||
public static SectionSize valueOf(int sectionSize) { | ||
return map.get(sectionSize); | ||
} | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters