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

fix README that cause errors #228

Closed

Conversation

toshihidetagami
Copy link

Platforms affected

Only docs

Motivation and Context

Current documentation lacks the default resources for Android.
On Android, you can provide alternative resources for specific device configuration, like current docs provide alternative resources for portrait and landscape orientation. But error will be thrown if a device configuration does not match any specific alternative resources, so you should provide a default (In this case, without port- or land- ) as a fallback.
This change fixes the error reported in #185 and apache/cordova-android#689.

Description

Although orientation is only portrait and landscape as of now, providing default would prevent MissingDefaultResource lint check error and considered as good practice for Android resources configuration.

Likewise, if you provide different layout resources based on the screen orientation, you should pick one orientation as your default. For example, instead of providing layout resources in layout-land/ for landscape and layout-port/ for portrait, leave one as the default, such as layout/ for landscape and layout-port/ for portrait.

Note:
You don’t have to provide a default for screen density. The system use whichever resources are the best match.

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@breautek
Copy link
Contributor

Thank you for your contribution. It looks like your changes have been applied via another PR based on the merge conflict. For this reason I'm closing this PR.

@breautek breautek closed this May 22, 2020
distante added a commit to distante/cordova-plugin-splashscreen that referenced this pull request Aug 14, 2020
(Note this is an almos 1 to 1 copy of apache#228 by @toshihidetagami

### Platforms affected
Only docs
 
### Motivation and Context
Current documentation lacks the default resources for Android.
On Android, you can provide alternative resources for specific device configuration, like current docs provide alternative resources for portrait and landscape orientation. But error will be thrown if a device configuration does not match any specific alternative resources, so you should provide a default (In this case, without port- or land- ) as a fallback.
This change fixes the error reported in apache#185 and [apache/cordova-android#689](apache/cordova-android#689).
 
### Description
[Although orientation is only portrait and landscape as of now](https://developer.android.com/guide/topics/resources/providing-resources#OrientationQualifier), providing default would prevent [MissingDefaultResource lint check error](http://tools.android.com/tips/lint-checks) and considered as [good practice for Android resources configuration](https://developer.android.com/guide/topics/resources/providing-resources#Compatibility).
 
> Likewise, if you provide different layout resources based on the screen orientation, you should pick one orientation as your default. For example, instead of providing layout resources in layout-land/ for landscape and layout-port/ for portrait, leave one as the default, such as layout/ for landscape and layout-port/ for portrait.
 
Note:
You don’t have to provide a default for screen density. [The system use whichever resources are the best match](https://developer.android.com/guide/topics/resources/providing-resources#DensityQualifier).

### Testing
### Checklist
* [ ]  I've run the tests to see all new and existing tests pass
* [ ]  I added automated test coverage as appropriate for this change
* [ ]  Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
* [x]  If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
* [x]  I've updated the documentation if necessary
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