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

Complication curved text #1055

Open
devexus opened this issue Mar 26, 2024 · 2 comments
Open

Complication curved text #1055

devexus opened this issue Mar 26, 2024 · 2 comments

Comments

@devexus
Copy link

devexus commented Mar 26, 2024

Is it possible to create a complication with curved text? I see an option to accomplish this through custom rendering as mentioned in this thread(#240 (comment)), but I'm not quite sure how to access "shortText" in complicationData.

@garanj
Copy link
Contributor

garanj commented Jun 10, 2024

Hi @devexus, are you wanting to achieve this on an AndroidX watch face? Creating a complication with curved text is simple using the Watch Face Format, if you're using that? See: https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat/Complications

@yschimke
Copy link
Contributor

Maybe something like this for accessing the text?

        val text = when (complicationData) {
            is ShortTextComplicationData -> complicationData.text.getTextAt(resources, instant)
            is LongTextComplicationData -> complicationData.text.getTextAt(resources, instant)
            else -> null
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants