Commit aeeb3a26 authored by Him188's avatar Him188

Use inline instead of enum to be in conformity with Android's requirement

parent 7e55c6f3
......@@ -44,9 +44,11 @@ data class Profile(
/**
* 性别
*/
enum class Gender {
SECRET,
MALE,
FEMALE;
*/ // 在 Android 中 enum 的使用被严格控制.
inline class Gender(val value: Byte) {
companion object {
val SECRET = Gender(0)
val MALE = Gender(2)
val FEMALE = Gender(1)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment