Hi,
Could we add activity indicator to a view.
i have an android app with only one Window which contains views...each view display activityIndicator while loading data...
and activity indicator does'nt be displayed...
here is the code :
var winAccueil = Ti.UI.createView({ backgroundColor: '#fff' }); var actInd = util.createActivityIndicator(); winAccueil.add(actInd); actInd.show(); function loadArticles(){ .... actInd.hide(); }it doesn't work.
thanks for help.
2 Answers
Accepted Answer
Activity indicators are different on Android.
On Android they are not views that you add to other views, but in fact windows
Try NOT adding it to any view, just showing it
if(Ti.App.platformName == 'iphone'){ winAccueil.add(actInd); }
It looks like you create a view winAccueil but nowhere do you add it to the window. You can't display an indicator inside the view if the view isn't added to the window.
Your Answer
Think you can help? Login to answer this question!