0

I am unable to change the height of the titanium progress bar. The height property affects the size of the container it is, but not the bar itself. Is there anyway I can change it as it is too small.

Cheers.

xml

<Alloy>
    <Window id="win" backgroundColor="white">
        <ProgressBar id="pb" top="10" width="250" height="50" min="0" max="10" value="0" color="#fff" message="Downloading 0 of 10" />
    </Window>
</Alloy>

If I change the height property from say 'auto', as above, the bar itself stays the same. Only the height of the container which holds the progress bar changes

bobo2000
  • 1,779
  • 7
  • 31
  • 54

1 Answers1

0

Ok I think you're trying to change the height of the actual bar itself? When you set the height using the height property, you're changing the height of the whole ProgressBar View which includes the label.

From a quick search, it seems that what you want can only be done using a custom Android Theme:

  1. Increase height of progress bar in Android
  2. Link to how to make custom Android themes in Titanium

Also, height=auto has been deprecated and you should use either Ti.UI.SIZE or Ti.UI.FILL

EDIT: For iOS, looks like a custom module is the only solution https://github.com/viezel/NappAppearance

Community
  • 1
  • 1
phil
  • 1,940
  • 1
  • 13
  • 13
  • Thanks, the trouble is I am writing my project for ios and not android. And yes I want to change the height of the actual bar itself, I don't care about the label etc. How can this be done for IOS – bobo2000 Sep 25 '14 at 02:05
  • ok there's a custom module for iOS apparently (haven't used it)....updated answer with that – phil Sep 25 '14 at 05:13
  • Yep tried that, problem is that it affects like every progress bar once you change the settings - and you can't edit the height of the bar, just change the style. – bobo2000 Sep 25 '14 at 11:58
  • yeah it sucks they only have a setGlobalStyle function...I guess the only way is to make a custom progress bar, some possible solutions on this page: http://developer.appcelerator.com/question/157225/custom-progress-bar – phil Sep 25 '14 at 22:30