Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15251] Android: ProgressIndicator with no message shows indicator off-center

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, progressindicator, reprod
ReporterFokke Zandbergen
AssigneeUnknown
Created2013-08-19T12:02:49.000+0000
Updated2018-02-28T20:04:09.000+0000

Description

When showing the Ti.UI.Android.ProgressIndicator without a message, the rotating indicator itself is displayed off-center, like shown in the screenshot attached.

Reproduce

This can be reproduced using the simple example in the [docs](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Android.ProgressIndicator), only modified to show the indeterminant indicator with no message:
Ti.UI.backgroundColor = 'white';

var win = Ti.UI.createWindow({
  backgroundColor: 'blue'
});

var button = Ti.UI.createButton({
  title: 'Show Progress Dialog'
});

var progressIndicator = Ti.UI.Android.createProgressIndicator({
  location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,
  type: Ti.UI.Android.PROGRESS_INDICATOR_INDETERMINANT,
  cancelable: true
});

button.addEventListener('click', function (e) {
  progressIndicator.show();
  var value = 0;
  setInterval(function(){
    if (value > 10) {
        return;
    }
    progressIndicator.value = value;
    value ++;
  }, 200);
  // do some work that takes 3 seconds
  // ie. replace the following setTimeout block with your code
  setTimeout(function(){
    progressIndicator.hide();
  }, 3000);
});

win.add(button);
win.open();

Attachments

FileDateSize
progress.png2013-08-21T07:12:48.000+000044313

Comments

  1. Jamie Buckley 2013-08-20

    Fokke, Can you provide a small test case that reproduces this issue, so that we can test and verify this? Thanks, Jamie
  2. Biju pm 2013-12-19

    This not our bug. while creating AlertDialog box android set this as theme .this ticket is Android specific.
  3. Lee Morris 2017-07-05

    I am able to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source