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( ...@@ -44,9 +44,11 @@ data class Profile(
/** /**
* 性别 * 性别
*/ */ // 在 Android 中 enum 的使用被严格控制.
enum class Gender { inline class Gender(val value: Byte) {
SECRET, companion object {
MALE, val SECRET = Gender(0)
FEMALE; 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