[TIMOB-12734] Android: View.setLayout() does not change the view's layout property
GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-08-17T00:23:50.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.2.0 |
Components | Android |
Labels | alloy, android, api, setlayout |
Reporter | Varun Joshi |
Assignee | Joshua Quick |
Created | 2013-02-01T20:20:14.000+0000 |
Updated | 2017-08-17T01:01:13.000+0000 |
Description
I've added an event to a button to change the layout property of a view. Each tap will turn the layout of this view to horizontal -> vertical -> composite then come back at horizontal, etc...
In the iOS simulator everything works like expected, the children views are relocated as the layout of the parent changes. But it does not work in the Android simulator or Android device (HTC Sensation, Android 4.1) They stay at the same place.
(The purpose of this app, was a simple test to understand the layout property.)
Could this be a bug?
Attachments
Kevin, Please provide the sample test case that can reproduce the issue you are having. Thanks,
Example app that can reproduce the problem You can have more details about how to test the issue in the readme file Edit: it's built with alloy
Can you create the test case without Alloy? This doesn't sound Alloy-specific and is likely better suited for the Android platform team.
Sorry , I don't know why but I don't get updates notifications anymore. Do I still need to provide a test app without Alloy. If it's API related it does not matter how the app was structured, or not?
Kevin, it was essentially to determine whether I need to address this as an Alloy-specific issue, or if the platform team needs to address it at an API level. It sounds to me like you are pretty confident it's an API level issue. I'll move the ticket to TIMOB.
Im also facing the same problem. Is there any temporary workaround for this issue as of now.
This issue was previously scheduled to be worked on in more than one sprint: * 'Release 3.1.2' (on board '3.1.X Triage') * 'Release 3.0.1/TS 3.0.2' (on board '3.1.0 Triage') Starting from JIRA Agile 6.3, an issue can only belong to a single future sprint. Read more about this change: http://docs.atlassian.com/agile/docs-0630/Sprint+Marker+Migration This issue is now scheduled for future sprint 'Release 3.1.2' (on board '3.1.X Triage'). If this is incorrect, please update the issue accordingly. This comment was automatically generated by JIRA. If it is no longer relevant, please feel free to delete it.
Also getting this issue without using Alloy. 3.4.0GA on device. Has this been re-scheduled?
Any news on that guys? This ticket is quite old =/
PR (master): https://github.com/appcelerator/titanium_mobile/pull/9323 PR (6.2.x): https://github.com/appcelerator/titanium_mobile/pull/9324
The attached [^LayoutChangeTest.js] file can be used to help test dynamic layout changes. Also see the attached "LayoutChange" screenshots for examples of the expected results when tapping each layout type button "Vertical", "Horizontal", and "Composite".
FR Passed for both master & 6.2.0 PR. Both PR's merged.
Verified the fix in SDK 6.2.0.v20170816173122. Closing. Studio Ver: 4.9.1.201707200100 SDK Ver: 6.2.0.v20170816173122 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.2.3 Ti CLI Ver: 5.0.14 Alloy Ver: 1.9.13 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Pixel --- Android 7.1.1 ⇨ google Nexus 5 --- Android 6.0.1