Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CustomWatchfaceUpdate #1

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

Philoul
Copy link

@Philoul Philoul commented Mar 3, 2025

Hello,

See my proposed PR concerning CustomWatchface code
I will be honest I didn't test it (didn't install your PR in my loop phone)
=> Your latest proposal was quite closed to mine but with missing items:

  • I added new default filenames for VeryHigh and VeryLow images (ResFileMap.kt), so CustomWatchfaces with different images (Background.png, BackgroundHigh.png, BackgroundLow.png CoverChart.png, ...), you can now also include BachgroundVeryHigh.png and BackgroundVeryLow.png, ...) to manage CWF. For testing hardcoded filename, you can update Blue Ring watchface (Simon 7.zip file) or P-Zero watchface (both should have a yellow background image for High and red background image for low, so with adding copy of these files with VeryHigh and Verylow it should work)
  • I included missing keys for template
  • Concerning drawable management within ViewMap, I managed VeryHigh file, if missing High file, then if missing standard file (same for Verylow)
  • Within ValueMap, you forgot SGV_LEVEL_EXT1 and SGV_LEVEL_EXT2

There is one remaining topic which could be discussed: Within setWatchfaceStyle, when I initialized veryHighColor and veryLowColor values, I put as default highColor and lowColor

veryHighColor = getColor(jsonColor.optString(JsonKeys.VERYHIGHCOLOR.key), highColor)
...
veryLowColor = getColor(jsonColor.optString(JsonKeys.VERYLOWCOLOR.key), lowColor)

-> All v1 and v2 will not have these keys within their json file included in CWF, so with my code nothing change within their watchfaces
With your proposal they will have with missing keys ContextCompat.getColor(this, R.color.dark_veryHighColor) so the default veryHigh color and the default veryLow Color.

On my side I prefer keep it unchanged (and explain how to update an existng CWF V1 or V2 to include the 2 new veryHigh and verylow keys to update it) because with your proposal, the veryHigh will be visible (default high color is Yellow), but not veryLow (same color than current Low)

Philoul added 2 commits March 3, 2025 21:38
…enVeryHigh

# Conflicts:
#	plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt
#	shared/impl/src/main/kotlin/app/aaps/shared/impl/weardata/JsonKeys.kt
#	wear/src/main/kotlin/app/aaps/wear/watchfaces/CircleWatchface.kt
#	wear/src/main/kotlin/app/aaps/wear/watchfaces/CustomWatchface.kt
#	wear/src/main/kotlin/app/aaps/wear/watchfaces/DigitalStyleWatchface.kt
@Philoul
Copy link
Author

Philoul commented Mar 3, 2025

2 comments:

  • Nothing has been tested on my side (build work, but has been verified after my PR 😱) as you can see very confident with my work 🤣
  • You should review the "Tizen Side" with someone else

@vanmegen vanmegen merged commit 2cbe49f into vanmegen:fmegen/3.3.0.0 Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants