Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27505] Android: Configuration change not saved in context for API < 26

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2020-05-05T13:44:05.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.0.2, Release 9.1.0
ComponentsAndroid
Labelsactivity, android, configuration, engSchedule
ReporterSergey Volkov
AssigneeChristopher Williams
Created2019-09-27T09:52:07.000+0000
Updated2020-05-05T13:44:05.000+0000

Description

One of configuration parameters than not being saved is activity orientation. In my case this affects layout used by Date Picker Dialog (see attached gifs): - when orientation is vertical day of week and month should be above the calendar - when orientation is horizontal - left of the calendar It works fine on API >= 26, but is broken for <26. Sample application is in the attachment.

Attachments

FileDateSize
1569750810528.JPEG2019-09-29T10:17:19.000+000023126
1569750969144.JPEG2019-09-29T10:17:19.000+000018608
24_H.gif2019-09-27T09:49:10.000+00002066196
24_V.gif2019-09-27T09:49:01.000+00002200926
25_H.gif2019-09-27T09:49:19.000+00002168428
25_V.gif2019-09-27T09:49:17.000+00002270634
26_H.gif2019-09-27T09:49:28.000+00002116927
26_V.gif2019-09-27T09:49:23.000+00002230997
app.js2019-09-27T09:41:23.000+0000724
fix(android)__configuration_change_not_saved_in_current_context.patch2019-09-27T09:48:48.000+0000875
landscape_7.png2019-09-29T10:18:00.000+000059046
potrait_7.png2019-09-29T10:17:59.000+000056118
Screen Shot 2019-10-26 at 10.49.20 PM.png2019-10-26T19:51:02.000+000098056

Comments

  1. Rakhi Mitro 2019-09-29

    Hello [~s.volkov], We tested the issue you reported. The calendar is working as expected with horizontal and vertical mode on device Huawei y9 2018 (android 8) and Huawei Gr3 2017 (android 7). *Android 8:* !1569750810528.JPEG|thumbnail! !1569750969144.JPEG|thumbnail! *Android 7:* !potrait_7.png|thumbnail! !landscape_7.png|thumbnail! Which device are you using?
  2. Sergey Volkov 2019-09-30

    Hi. Screenshots in the attachment are from the official emulators. Problem is reproduced on your screenshots: - !1569750969144.JPEG|thumbnail!: in horizontal orientation date and month should be left of the calendar - !potrait_7.png|thumbnail!: normally, when there is enough space, date-picker mode should be "calendar", not "spinner" (but that could be vendor modifications or some other bug, not related to this). Steps to reproduce (nn_V.gif): 1. While holding device in vertical orientation, launch the application 2. Click button, verify that month and date are above calendar, press back 3. Turn device horizontally 4. Click button, verify that month and date are left of the calendar (broken on API < 26)
  3. Rakhi Mitro 2019-09-30

    [~s.volkov], Can you please share the (nn_V.gif) image to us?
  4. Sergey Volkov 2019-09-30

    By "nn_V.gif" I meant any of 24_V.gif, 25_V.gif and 26_v.gif.
  5. Sharif AbuDarda 2019-10-26

    Hello [~s.volkov], I was able to reproduce the issue on our end using SDK 8.2.0.GA. I do see the behavior in the Android API<26. !Screen Shot 2019-10-26 at 10.49.20 PM.png|thumbnail! The attached screenshot shows the difference in ANdroi d8.0 and Android 7.1 emulators. Moving to TIMOB. Thanks.
  6. Samir Mohammed 2020-04-07

    FR Passed: Waiting on Jenkins build
  7. Christopher Williams 2020-04-17

    merged to master for 9.1.0. cherry-picked to 9_0_X for 9.0.2.
  8. Samir Mohammed 2020-05-05

    *Closing ticket.* Fix verified in SDK version 9.1.0.v20200501090150 and 9.0.2.v20200430111828 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11300

JSON Source