https://github.com/aweiloveandroid/refactor-android-support-v4
重构Android的v4包的部分源码
https://github.com/aweiloveandroid/refactor-android-support-v4
android refactor support-v4
Last synced: 17 days ago
JSON representation
重构Android的v4包的部分源码
- Host: GitHub
- URL: https://github.com/aweiloveandroid/refactor-android-support-v4
- Owner: AweiLoveAndroid
- License: apache-2.0
- Created: 2018-02-25T03:40:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-25T05:20:56.000Z (almost 8 years ago)
- Last Synced: 2025-01-19T11:43:29.343Z (12 months ago)
- Topics: android, refactor, support-v4
- Language: Java
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# refactor-android-support-v4
重构Android的v4包的部分源码
#### 想了解详细的源码讲解,可以查看我的博客 [老司机带你重构Android的v4包的部分源码](https://www.jianshu.com/p/a08d754944c4)
# 大概重构思路:
根据我做过项目用到的MVP的开发模式,我把共同的htmlEncode方法和getLayoutDirectionFromLocale方法抽取出一个接口,然后分别用两个实现类去实现接口,然后用TextUtilsCompat这个类去判断调用哪个实现类的方法,这样看起来更直观一些。
# 使用示意图如下:
