Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14527] Android: ActivityIndicator when using Holo themes renders inconsistently depending when .show() is called

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsactivityindicator, android
ReporterJoe Webster
AssigneeUnknown
Created2013-06-27T20:17:19.000+0000
Updated2018-02-28T20:03:24.000+0000

Description

Problem

When using one of Android's Holo Light or Dark themes, the ActivityIndicator style differs depending how/when .show(); is called. When activityIndicator.show(); is called immediately after win1.open() - the image is thicker and darker. When called later - either via setTimeout or the click event of a button, the image is thinner and faded. The same code without activating a Holo theme creates the same style activity indicator each time.

Test case

var win1 = Titanium.UI.createWindow({  
    title:'Android Activity Debug',
    backgroundColor:'#fff',
    fullscreen: false
});
 
var activityIndicator = Ti.UI.createActivityIndicator({
    style: Ti.UI.ActivityIndicatorStyle.DARK,
    top: 10,
    height: Ti.UI.SIZE,
    width: Ti.UI.SIZE
});
 
win1.add(activityIndicator);
win1.open();
 
// Calling here renders a thicker, darker image
//activityIndicator.show();

// But - when calling it from setTimeout
// Or from the event handler of a button click
// The indicator appears lighter and thinner
/*
setTimeout(function() {
    activityIndicator.show();
}, 2000);
*/
<android xmlns:android="http://schemas.android.com/apk/res/android">
    <tool-api-level>14</tool-api-level>
    <manifest>
        <supports-screens android:anyDensity="true"/>
        <uses-sdk android:maxSdkVersion="17"
            android:minSdkVersion="8" android:targetSdkVersion="14"/>
        <application android:theme="@android:style/Theme.Holo.Light"/>
    </manifest>
</android>

Discussions

I initially raised this issue in the following Q & A thread: http://developer.appcelerator.com/question/154077/android-activityindicator-looks-different-depending-when-show-called

Attachments

FileDateSize
android-activity-indicators.jpg2013-06-27T20:17:19.000+000011286

Comments

  1. Sunila 2014-01-29

    Tried with latest master but couldn't reproduce the issue. Android 4.3, Nexus S

JSON Source