Quantcast
Viewing all articles
Browse latest Browse all 8068

Android ActivityIndicator Looks Different Depending When .show() Called

In an Android 4.0.3 HVGA x86 emulator, I am seeing 2 different stylings of the activity indicator depending when show() is called on it.

Although I am using studio 3.1.1, I was seeing the same issue in the previous version of studio (this was on my list to eventually get round to).

In this image, the top activity indicator (thicker, darker) is the result of calling activityIndicator.show(); immediately after win1.open(), while the thinner, lighter indicator appears when called via the setTimeout function (and commenting out the //activityIndicator.show();).

Initially, when I first noticed this, I was calling activityIndicator.show() after a button click event. I don't understand why the same style isn't rendered? I've tried this with the Holo Dark theme also and get the same result.

app.js

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();
 
/*
setTimeout(function() {
    activityIndicator.show();
}, 2000);
*/
 
//activityIndicator.show();

tiapp.xml

<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>

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>