-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addd Aspect Ratios: 1*1 - 4*3 - 16*9 - match
- Loading branch information
Reza Amuzadeh
committed
Jul 2, 2019
1 parent
602bd25
commit 2262d6a
Showing
8 changed files
with
163 additions
and
48 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
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
63 changes: 63 additions & 0 deletions
63
library/src/main/java/com/potyvideo/library/globalEnums/EnumAspectRatio.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,63 @@ | ||
package com.potyvideo.library.globalEnums; | ||
|
||
public enum EnumAspectRatio { | ||
|
||
UNDEFINE("UNDEFINE", 0), | ||
ASPECT_1_1("ASPECT_1_1", 1), | ||
ASPECT_16_9("ASPECT_16_9", 2), | ||
ASPECT_4_3("ASPECT_4_3", 3), | ||
ASPECT_MATCH("ASPECT_MATCH", 4), | ||
; | ||
|
||
private String valueStr; | ||
|
||
private Integer value; | ||
|
||
EnumAspectRatio(String valueStr, Integer value) { | ||
this.valueStr = valueStr; | ||
this.value = value; | ||
} | ||
|
||
public static EnumAspectRatio get(String value) { | ||
if (value == null) { | ||
return UNDEFINE; | ||
} | ||
|
||
EnumAspectRatio[] arr$ = values(); | ||
for (EnumAspectRatio val : arr$) { | ||
if (val.valueStr.equalsIgnoreCase(value.trim())) { | ||
return val; | ||
} | ||
} | ||
|
||
return UNDEFINE; | ||
} | ||
|
||
public static EnumAspectRatio get(Integer value) { | ||
|
||
if (value == null) { | ||
return UNDEFINE; | ||
} | ||
|
||
EnumAspectRatio[] arr$ = values(); | ||
for (EnumAspectRatio val : arr$) { | ||
if (val.value == value) { | ||
return val; | ||
} | ||
} | ||
|
||
return UNDEFINE; | ||
} | ||
|
||
public String getValueStr() { | ||
return valueStr; | ||
} | ||
|
||
public Integer getValue() { | ||
return value; | ||
} | ||
|
||
public void setValueStr(String valueStr) { | ||
this.valueStr = valueStr; | ||
} | ||
} |
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
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