remove Enum to optimize the performance#16
Open
songzhw wants to merge 1 commit intoJungerr:masterfrom
Open
Conversation
|
PasswordType 只是用来 switch case,每个枚举中只有名字,没有其他字段,确实使用 @IntDef 更好。 BTY,在楼主提到的链接里,关于这段文档:
前几天我看到了一些相关的讨论:Java 枚举会比静态常量更消耗内存吗? - RednaxelaFX 的回答 - 知乎 |
|
0.3里面的车牌键盘,点击"V"字母的时候变成了"L"这是个小bug吗,麻烦作者最好改下 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
官方文档( https://developer.android.com/training/articles/memory.html#Overhead )中提及尽量少用Enum。 GridPasswordView中的PasswordType可用简单的常量来代替。 若为了校验所提供的类型是否在范围之内,再加上@IntDef即好。