backgroundImage: how to scale width width and height
in titanium mobile 1.0 i used a backgroundImage for displaying a custom progress bar, which was scaled when the views width property was changed. since 1.1.1 the image isn't stretched anymore when changind the with of it's view element. how can i achieve this now?
3 Answers
-
ok, seems i solved it:
i originally used a imageView and passed a url to it, this is no longer stretched
by using a view and backgroundImage it is working again
could anyone of the admins change my question, because the question is wrong at the moment
-
thany for answering
the initial wrong defined question was about in Ti 1.0 using an image as a url property for a imageView and setting it's width dynamically, the image was stretched to the width of the imageView itself. now in ti. 1.1.x it seems that the image can't be resized if passed to the url property. for my needs i had to change to a view and using the image as the backgroundImage property. so if resizing the views width, the backgroundImage get's stretched too. think of it as a graphic for a progress bar that grows while progressing
maybe the ti 1.0 way of stretching imageViews can be achivied by setting a property, but for now for me using views and backgroundImage is ok
-
What kind of views are you using? A webview or a image view have a load eventlistner for example, that activates when the view is fully loaded. In those cases you can also add a activity indicator (progressbar) and delete it when the load eventlistner fires.