Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19522] iOS: Platform parity in Ti.UI.ActivityIndicator "style" property

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2015-09-16T18:37:14.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.1.0
ComponentsiOS
Labelsactivityindicator
ReporterHans Knöchel
AssigneeHans Knöchel
Created2015-09-15T06:07:35.000+0000
Updated2015-12-13T20:19:45.000+0000

Description

Currently, the style property of the Ti.UI.ActivityIndicator needed to be if-cased for Android, MobileWeb and Windows on the one side and iOS on the other (using the .iPhone.) namespace.
Titanium.UI.iPhone.ActivityIndicatorStyle.BIG
Titanium.UI.iPhone.ActivityIndicatorStyle.DARK
Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN
Titanium.UI.ActivityIndicatorStyle.BIG
Titanium.UI.ActivityIndicatorStyle.BIG_DARK
Titanium.UI.ActivityIndicatorStyle.DARK
Titanium.UI.ActivityIndicatorStyle.PLAIN
For parity, we should migrate the iOS constants to work on the name namespace as the other platforms do and warn the dev about the deprecated namespace like we have done earlier with related use cases.

Comments

  1. Hans Knöchel 2015-09-15

    * Moved style value from Ti.UI.iPhone.ActivityIndicatorStyle.\* to Ti.UI.ActivityIndicatorStyle.* * Deprecated Ti.UI.iPhone.ActivityIndicatorStyle.\* starting in 5.1.0 * Updated docs to reflect changed behavior Demo code:
       var win = Ti.UI.createWindow({
       	backgroundColor : "#555",
       	layout : "vertical"
       });
       
       var act1 = Ti.UI.createActivityIndicator({
       	style : Ti.UI.iPhone.ActivityIndicatorStyle.PLAIN,
       	top : 30
       });
       
       var act2 = Ti.UI.createActivityIndicator({
       	style : Ti.UI.iPhone.ActivityIndicatorStyle.BIG,
       	top : 30
       });
       
       var act3 = Ti.UI.createActivityIndicator({
       	style : Ti.UI.iPhone.ActivityIndicatorStyle.DARK,
       	top : 30
       });
       
       win.add(act1);
       win.add(act2);
       win.add(act3);
       
       act1.show();
       act2.show();
       act3.show();
       
       win.open(); 
       
    PR pending: https://github.com/appcelerator/titanium_mobile/pull/7190
  2. Chee Kiat Ng 2015-09-16

    Thanks! PR Merged.
  3. Chee Kiat Ng 2015-09-16

    Another PR to fix a mistake in last PR: https://github.com/appcelerator/titanium_mobile/pull/7199
  4. Harry Bryant 2015-10-13

    Verified as fixed, can confirm that I receive the appropriate message when using the deprecated class:
       [WARN] :   Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN DEPRECATED in 5.1.0, in favor of Ti.UI.ActivityIndicatorStyle.PLAIN.
       [DEBUG] :  Loading: /var/mobile/Containers/Bundle/Application/D2D9A719-9F07-403D-BE06-4548DA34AEC5/timob19522.app/_app_props_.json, Resource: _app_props__json
       [WARN] :   Titanium.UI.iPhone.ActivityIndicatorStyle.BIG DEPRECATED in 5.1.0, in favor of Ti.UI.ActivityIndicatorStyle.BIG.
       [WARN] :   Titanium.UI.iPhone.ActivityIndicatorStyle.DARK DEPRECATED in 5.1.0, in favor of Ti.UI.ActivityIndicatorStyle.DARK.
       
    OSX El Capitan 10.11 Studio: 4.3.1.201509302304 Ti SDK: 5.2.0.v20151009071418 Appc NPM: 4.2.1-1 Appc CLI: 5.1.0-38
  5. Justin Toth 2015-12-13

    I think there's a bug here... In my app, which is named "Housters", the warning in the log states: *[WARN] Titanium.UI.iPhone.ActivityIndicatorStyle.DARK DEPRECATED in 5.1.0, in favor of Housters.UI.ActivityIndicatorStyle.DARK.* This is obviously incorrect, Housters.UI.ActivityIndicatorStyle.DARK doesn't exist. It should say Ti.UI.ActivityIndicatorStyle.DARK. Tested on Ti SDK 5.1.0.GA and iPhone 6 Simulator.
  6. Hans Knöchel 2015-12-13

    The compiler replaces "Titanium" in the logs when running on devices. It's fixed globally in 5.2.0 as part of TIMOB-20015. Greets!

JSON Source