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

[TIMOB-24501] Android: multi-window support #8925

Closed
wants to merge 4 commits into from

Conversation

frankieandone
Copy link
Contributor

Test Case

Change target SDK to API 24+ in AndroidManifest.xml/tiapp.xml. Default app.js is sufficient.

JIRA: https://jira.appcelerator.org/browse/TIMOB-24501

@frankieandone
Copy link
Contributor Author

Accidentally closed. Reopening.

@frankieandone frankieandone reopened this Apr 10, 2017
Copy link
Contributor

@jquick-axway jquick-axway left a 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

@hansemannn
Copy link
Collaborator

Quick interruption: If I read it correctly, it's just injected into the manifest. Why can't people just enable it today by setting resizeableActivity="true" in the <application> tag?

@frankieandone
Copy link
Contributor Author

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?

@jquick-axway
Copy link
Contributor

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.

@@ -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)) {
Copy link
Contributor

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.

@frankieandone
Copy link
Contributor Author

Closing in favor of #8970 because of dependency of code.

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

Successfully merging this pull request may close these issues.

None yet

4 participants