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(android): configuration change not saved in current context #11300

Merged
merged 2 commits into from Apr 17, 2020

Conversation

drauggres
Copy link
Contributor

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

For example: orientaion is not saved when device/emulator is being rotated.
To verify this in example below used DatePickerDialog:

  • when orientation is vertical day of week and month should be above the calendar
  • when orientation is horizontal - left of the calendar
var win = Ti.UI.createWindow();

var btn = Ti.UI.createButton({
  title: `openDialog (API ${Ti.Platform.Android.API_LEVEL})`,
  center: {
    x: '50%',
    y: '50%'
  }
});

btn.addEventListener('click', function () {
  Ti.UI.backgroundColor = 'white';

  const picker = Ti.UI.createPicker({
    type: Ti.UI.PICKER_TYPE_DATE,
    minDate: new Date(2009, 0, 1),
    maxDate: new Date(2014, 11, 31),
    value: new Date(2014, 3, 12)
  });

  picker.showDatePickerDialog({
    value: new Date(2010, 8, 1),
    callback: function (e) {
      if (e.cancel) {
        Ti.API.info('User canceled dialog');
      } else {
        Ti.API.info('User selected date: ' + e.value);
      }
    }
  });
});

win.add(btn);
win.open();

@build build added this to the 8.3.0 milestone Oct 29, 2019
@build build requested a review from a team October 29, 2019 10:43
@build
Copy link
Contributor

build commented Oct 29, 2019

Fails
🚫 Tests have failed, see below for more information.
Messages
📖

💾 Here's the generated SDK zipfile.

📖 🎉 Another contribution from our awesome community member, drauggres! Thanks again for helping us make Titanium SDK better. 👍
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 1 tests have failed There are 1 tests failing and 697 skipped out of 7263 total tests.

Tests:

ClassnameNameTimeError
android.emulator.Titanium.Androidactivity callbacks (9)5.004
Error: timeout of 5000ms exceeded
at Titanium.<anonymous> (/ti-mocha.js:6535:53120)

Generated by 🚫 dangerJS against cb13c0d

@sgtcoolguy sgtcoolguy removed this from the 8.3.0 milestone Dec 10, 2019
@ssjsamir ssjsamir self-requested a review April 7, 2020 13:54
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

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

FR Passed: Using the test case provided above.

Environment

MacOS Catalina: 10.15.5 Beta 
Xcode: 11.4
Java Version: 1.8.0_131
Android NDK: 21.1.6273396-beta2
Node.js: 10.16.3
""NPM":"5.0.0-1","CLI":"8.0.0-master.10""
Android API 25 Sim

@sgtcoolguy sgtcoolguy merged commit 19cab05 into tidev:master Apr 17, 2020
sgtcoolguy pushed a commit that referenced this pull request Apr 17, 2020
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