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
[TIMOB-24501] Android: multi-window support #8925
Conversation
Accidentally closed. Reopening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have 1 issue with this change. Developers should be allowed to set "resizableActivity" to false so that they can opt-out of this feature.
Also, according to Google's docs, this feature will be enabled by default if targeting API Level 24 or higher. So, the "_build.js" changes might not be necessary. Can you double check please?
https://developer.android.com/guide/topics/ui/multi-window.html#configuring
Quick interruption: If I read it correctly, it's just injected into the manifest. Why can't people just enable it today by setting |
It doesn't get added to the AndroidManifest.xml. When it does get added (through other means), it keeps crashing. But mainly, I think we would want this to be default state without user needing to add it themselves? |
We should identify where it's crashing then. This is in case the developer's app has display/layout issues in a very small window. Such as split screen on a phone where the app only takes a 3rd of the display. Also, I remember the crash was happening in an app using TabViews because they were using an Activity within an Activity. That means the TabView activities need the "configChanges" settings you've added to prevent the crash. |
android/cli/commands/_build.js
Outdated
@@ -3683,8 +3683,7 @@ AndroidBuilder.prototype.generateAndroidManifest = function generateAndroidManif | |||
} | |||
}, this); | |||
|
|||
|
|||
if (this.realTargetSDK >= 24 && !finalAndroidManifest.application.resizeableActivity) { | |||
if (this.realTargetSDK >= 24 && !("resizeableActivity" in finalAndroidManifest.application)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally we prefer hasOwnProperty()
over in
like this:
finalAndroidManifest.application.hasOwnProperty('resizeableActivity')
Also, single quotes, not double quotes.
137c051
to
8572393
Compare
Closing in favor of #8970 because of dependency of code. |
Test Case
Change target SDK to API 24+ in
AndroidManifest.xml/tiapp.xml
. Defaultapp.js
is sufficient.JIRA: https://jira.appcelerator.org/browse/TIMOB-24501