The target architecture
Every project will start be messy. Especially code. You add something new, remove old stuff, fix not working code… It can be hard to read your code after a month. So, I decided to clean up the code and build an architecture to be easily understandable and I can always add new stuff without worrying.
- Reduce state variables
- Add Screens with Screen Manager
- Send input to Screen Manager for process
This is how the final architecture should look like. Many things are the same as in old code. But implementating Screen Manager will give me a opportunity to add another screens with menus.
The main idea is to have the Main screen with time. The short click will force to refresh the time and the long click will open Menu screen. The Menu will contain few rows – labels of another Screens that can be entered by long click and you can move a row down with short click. The last row will be exit. I imagine the first row as link to Notes, so I can see some notes saved in smartwatch. I can do this now with long click. Settings like how long to show notification on the screen or what to show on the screen or how…