[TIMOB-19257] Android: hide() doesn't work every time on Activity Indicator at launch
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 4.1.1 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Shawn Lan |
Assignee | Unknown |
Created | 2015-07-24T00:33:54.000+0000 |
Updated | 2019-11-08T03:54:55.000+0000 |
Description
Create a default Alloy project with the following:
index.xml:
<Alloy>
<Window class="container">
<ActivityIndicator id="actInd1" />
</Window>
</Alloy>
index.js
$.index.open();
$.actInd1.show();
$.actInd1.hide();
At launch, sometimes the indicator still shows. Not every time you'll see this issue, so you have to keep exiting and relaunching the app to see it happen.
My app loads external url at launch. It shows an indicator when loading, and hides it when finished or failed. In cases like network failure, the indicator.hide() is called almost right away, but not actually hided every time.
Hey guys - just had this bug happen to me on a app I am creating and showing an activityIndicator, then doing some network checking for a url, when the url is found the activityIndicator is hidden via activityIndicator.hide() , this works. But when the url is not found because of network error (airplane mode, no internet) the activityIndicator is hidden via activityIndicator.hide() - but the activityIndicator is still visible on the screen - when checking the activityIndicator.visible property that shows false???!! So there must be a bug somewhere - how do I go about having this 4 year old bug looked into? Also when adding a setTimeout for the activityIndicator.hide() it hides just fine
Titanium Version: Titanium 7.4.2 Android Device: Xiaomi Mi A1 Android Version: Android Version 9 I just built and ran the test above and it does if fact still fail to hide the ActivityIndicator. Adding the hide inside a setTimeout does allow it to hide. index.js
Another use case that caused me to find this bug is using Titanium.Network.Online to check if phone has internet before doing url checks / calls.
1. Run code on phone with internet - ActivityIndicator will hide. 2. Place phone in airplane more - run - ActivityIndicator will not hide index.js 3. Notice the log states visible = false - but on phone screen its still visible