Tag: Android
POJO, equals, hashcode
How to simplify developing of pojo
classes?
Problems:
pojo
class is simple class with members, getters, setters. To keep test coverage more 80% we should develop tests forpojo
classes. But it is a ridiculous.- do not forget to add new members to
equals
andhashcode
methods.
Decisions:
- Lombok. We have to type just members of class and use annotations. But there are problems:
- final members without initialization
- there are conflicts in annotationProcessor
- AutoValue. by Google.
- complicated to use
- generate child class
- Kotlin data classes.
- by Google
- no problems in annotationProcessor
- we use Kotlin!!!
Android: my library in maven or jcenter
Android EditText InputFilter only ASCII symbols charset
Clean status bar and Demo mode
Demo Mode for the Android System UI
//enable demo adb shell settings put global sysui_demo_allowed 1 // display time 12:00 adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200 // Display full mobile data without type adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype false // Hide notifications adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false // Show full battery but not in charging state adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100 //exit adb shell am broadcast -a com.android.systemui.demo -e command exit