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 13796: Android: Implement new window architecture #4417

Merged
merged 9 commits into from
Jul 10, 2013

Conversation

pingwang2011
Copy link
Contributor

1. If "ti.android.useLegacyWindow" is enabled in tiapp.xml, it follows old window behavior, including lightweight and heavryweight.
2. Otherwise, all windows are heavyweight.
3. Both heavyweight and lightweight windows use WindowProxy and use TiView to set their view.
4. Add support for activityEnter/ExitAnimation in close().
@ghost ghost assigned ayeung Jun 27, 2013
@@ -411,6 +411,7 @@ public void postOnCreate()
}

TiConfig.DEBUG = TiConfig.LOGD = systemProperties.getBool("ti.android.debug", false);
TiConfig.LEGACY_WINDOW = systemProperties.getBool("ti.android.useLegacyWindow", false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are trying to move away from using TiConfig. We should be using the systemProperties instead and not use TiConfig.

@ayeung
Copy link
Contributor

ayeung commented Jun 29, 2013

Code reviewed. Left comments.

@pingwang2011
Copy link
Contributor Author

Update.

activity.overridePendingTransition(TiConvert.toInt(options.get(TiC.INTENT_PROPERTY_ENTER_ANIMATION), 0),
TiConvert.toInt(options.get(TiC.INTENT_PROPERTY_EXIT_ANIMATION), 0));
} else {
activity.finish();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just call activity.finish() before the if statement.

@ayeung
Copy link
Contributor

ayeung commented Jul 2, 2013

Testing up to 5c with the following results:

KS Tests:
Base UI:

  • Window Properties
    • Toggle Height/Width
    • Toggle Opacity
    • Layout/ Dimension Properties
  • Window (Standalone)
    • Open (Nav Bar)
    • Open (FullScreen)

https://jira.appcelerator.org/browse/TIMOB-8648:
- Test: Closing a series of LWs using the "androidback" event. (with useLegacyWindow set to false). The alert shows, but the window backs out so it doesn't stay on the screen.

Will wait until these issues are addressed before continuing.

@pingwang2011
Copy link
Contributor Author

Closed by mistake. Reopened.

@pingwang2011 pingwang2011 reopened this Jul 3, 2013
if (lightweight) {
addLightweightWindowToStack();
} else {
// The "top", "bottom", "left" and "right" properties do not work for heavyweight windows.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this ever worked for HW windows? The docs don't say anything about this not working. We may want to document this as such if it doesn't work for windows in android (since there is only one type of windows in the future).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, those properties never worked for HW windows. I will document it.

@ayeung
Copy link
Contributor

ayeung commented Jul 10, 2013

Code reviewed and functionally tested. Ran all the test cases mentioned including KS and anvil. Also ran docgen and validate. Request Accepted.

ayeung pushed a commit that referenced this pull request Jul 10, 2013
Timob 13796: Android: Implement new window architecture
@ayeung ayeung merged commit e99a053 into tidev:master Jul 10, 2013
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.

None yet

2 participants