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

Model token formats supported in newer Android API levels #45

Open
JakeWharton opened this issue Jan 17, 2023 · 4 comments
Open

Model token formats supported in newer Android API levels #45

JakeWharton opened this issue Jan 17, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@JakeWharton
Copy link
Collaborator

If you use these types, we should emit @RequiresApi(29/30) on the resulting functions.

@JakeWharton JakeWharton added the enhancement New feature or request label Feb 4, 2023
@drewhamilton
Copy link
Collaborator

DateFormat.getInstanceForSkeleton has been around since API 24. Does MessageFormat just not use it in APIs 24-29?

@drewhamilton
Copy link
Collaborator

Can confirm a literal :: is printed on APIs 24-29.

@JakeWharton
Copy link
Collaborator Author

Yeah I was just going on the docs. I did not test anything.

@drewhamilton
Copy link
Collaborator

We'll need to check whether the resource containing :: has OS level variants. E.g. if somebody has:

values/strings.xml:
  <string name="foo">{date, date, yyyy-MM-dd}</string>

values-v30/strings.xml:
  <string name="foo">{date, date, ::yyyy-MM-dd}</string>

then they shouldn't get a @RequiresApi annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants