Community Questions & Answers
Android backgroundImage repeat ignoring retina images
I'm trying to make a view with a repeating background image on android. I've put double resolution images with the same name inside the res folders and the non retina image inside the asset folder (alloy project). But when I run my app its not using the...
Android - 9patch image as View backgroundImage not scaling properly
I have a 9patch image which scales nicely as the _backgroundImage_ of a button. When I take this same image and apply it as the _backgroundImage_ of a _View_, it does not scale intelligently - just stretches the whole image. The same thing happens when...
Legal to Use Custom Image for a Button in the LeftNavButton of a ToolBar?
Hi all- I have the below: ~~~ <NavigationGroup> <Window title='Test'> <LeftNavButton> <Button id='myButton' /> </LeftNavButton> </Window> </NavigationGroup> ~~~ Within my Alloy .tss file, I...
Memory leaks (releasing memory)?
Hi there, It seems like Titanium causes memory leaks, on the iPad at least - can anyone confirm this, or tell me what I'm doing wrong? I'm using a function spawned by calls to setTimeout to change the backgroundImage of some views. This process seems...
backgroundImage not working in toolbar
Hi, I'm not able to create a toolbar with a background image ~~~ var toolbar = Titanium.UI.createToolbar({ items:[b_close,label], translucent:true, backgroundImage: 'bgToolbar.png', top:0, ...
Certain images crash titanium when used as a backgroundImage
My designer provided me with the following two png images: http://forums.askmrrobot.com/images/button-refresh.png http://forums.askmrrobot.com/images/button-load.png If I set the first image as the backgroundImage of a view, it works just fine. If I...
"backgroundImage" for searchbar
The documentation states that you would be able to set a background image for the searchBar view. My own tests, the Kitchensink and the rest of the documentation for the searchbar view make me doubt that this is actually accurate. Anyone know the facts?
Grouped TableView Row backgroundImage
I have a grouped TableView. I want to have a custom backgroundImage (a noise pattern) as my Row backgroundImage. If I set it, the rounded edges are not cropped. I want to avoid creating custom images for the first and last rows, and handling them in code...
TableViewStyle.GROUPED can't seem to add a background image
HI guys, I was wondering if somebody could help me at the moment i'm trying to add a backgroundImage to a TableViewStyle.GROUPED. Its dosen't seem to work for me. BackgroundColor seems to work fine bit not the image. Any suggestions? below is my code I...
the image of clicked row in Tableview dosent change all the time!?
Hi I have faced with a problem in 'TableViewRow background image'. I want to change the backgroundimage row for tableview when the row is touched or clicked but it seems that it dosent work all the time. my code is ~~~ ...
PNG Background Images do not show up on physical device, but show up in emulator fine.
Someone else had this problem, but it looks like it is not resolved http://developer.appcelerator.com/question/40541/backgroundimage-problems I have a background image: ~~~ var window = Titanium.UI.createWindow({ ...
alloy tss image path
I'm using Alloy and I wrote in app.tss file: ".container": { backgroundImage: "/images/background.png", exitOnClose: false, navBarHidden : true } I expect that if I put a file called background.png in each of...
Use background image on variable size buttons on Android
I have troubles making the backgroundImage property work on Android with dynamic size buttons. The following code works well on iPhone and the image stretch properly but Android ignore it and doesn't respect the dimensions of my...
TextArea BackgroundImage only on android?
Does TextArea.backgroundImage works on iOS? On android simulator it runs fine but on iOS the image do not show. Using SDK 1.7.2, my test code (works on android but not on iOS): ~~~~ var txt=Titanium.UI.createTextArea({ backgroundImage:...
Can't set a tiled background image to any view
Hi, in an iPhone project I have this code: ~~~ var musicListView = Ti.UI.createTableView({ width: 600, visible: true, backgroundColor:'transparent', separatorColor:'transparent', backgroundImage: '/images/assets/bkg.png', backgroundRepeat:...
textField with passwordMask:true cancels background image
Ok just wondering if anyone has noticed this and been able to fix it. I have a textfield wish to use passwordMask:true and a backgroundImage. But for some reason with this combination the backgroundImage does not show, only when i take out passwordMask...
Flip animation removed backgroundImage
I have some views with 2 labels. The original flip works perfect but when I do the flip back over the backgroundImage is missing. Any ideas or solutions are appreciated. ~~~ for(var i=1;i <= total; i++){ view[i] = Titanium.UI.createView({ id:...
backgroundRepeat: true causes black background in Android
Hi, I have the following code and in iOS everything works as intended but in Android I get a black solid color background when backgroundRepeat is set to true. The image is there (and stretched) when backgroundRepeat is set to false. I am using density...
backgroundPadding failed after upgrade to 3.0
Hi, I'm developing an iOS 6 mobile application using the latest Titanium SDK (3.0) and can't get the backgroundPaddingLeft and backgroundPaddingRight to work. Earlier versions of the SDK had no problems with this. Symptoms are that the background image...
Error with backgroundimage
Application Type: Mobile [INFO] Titanium SDK version: 2.1.4 (11/09/12 12:46 51f2c64) [INFO] iPhone Device family: universal [INFO] iPhone SDK version: 6.0 [INFO] iPhone simulated device: ipad OSX 10.7.5Titanium Studio, build: 2.1.2.201208301612 (c)...
iOS Toolbar Background Image
Is it possible to have a background image for a toolbar in iOS, specifically on the iPad? ---------- I know that there is a [doc](http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.iOS.Toolbar-property-backgroundImage) that shows a...
How to custom toolbar background image in the new Tatinium
In the api document, it says the property is "backgroundImage", but it doesn't work. In the new KitchenSink code, it uses barColor to custom the toolbar color, so I think there must be a new property to modify the background image, but I didn't...
Using images in alloy as backgroundImage
Hi eveyone! i have started using alloy with the tss properties, controllers and everything else. I use some images as background images and are placed as follows: ~~~ iphone\ images \ global\ background.png background@2x.png android\ ...
SDK 2.1.4 backgroundImage Not Working in Grouped Table Views
Hi, I upgraded to SDK ver 2.1.4 and the backgroundImage property in my grouped table views stopped working in iOS. When I set the SDK version back to 2.1.3 in tiapp.xml everything works. I do clean the project every time I change the SDK ver in...
BackgroundImage gets deformed when pushed to the side
Hi! I'm quite new to Titanium, so please be patient with me... My iPad application has several windows with backgrounds. When I animate one to be pushed aside to get focus on another image, it gets deformed because the window is to wide. I was however...
BackgroundImage not showing with grouped tableview (iPad)
I am unable to get a background image for a window to show if I use a grouped style tableview on an iPad. What's even stranger is that the background is all grey. It does not show the standard, striped style. ~~~ var homeWin =...
Redirected images (HTTP 302) don't work on View.backgroundImage
Hi, First of all, I have __Titanium Studio, build: 2.1.2.201208301612__ and I test on __Google Nexus S__ with __Android 4__. I put on a __UI.View.backgroundImage__, this url :...
Button backgroundImage Distortion in TableView
When opening a new window from a tableView click, updating said tableView's rows with a tableView.setData, then closing the new window, any child tableViewRow of that tableView that contains a button with a backgroundImage set, the image is distorted all...
No backgroundImage on a tableViewRow in Android
I have the following method which i am using in a foreach loop to generate the data for a tableview. The problem is that on ANDROID the background image of the rows is not there, does not appear at all. Anyone know why? I am using: 2.1.3 GA and i tried...
How to change properties of a variable in a for loop
~~~ for (var i = 1; i < (x+1) ; i++){ var b = Titanium.UI.createButton({ width: bs, height: bs, id: "btn"+i, index: i, backgroundImage: "bBG"+i }); }; ~~~ This doesn't work. Also `backgroundImage: bBG+i` or...
backgroundImage in View doesn't show up
I got an backgroundImage in a View but it doesn't show up.. I've no idea why. I want to place the image as background in a View in Test.js. All the code beneath is from Test.js. The map structure is: ~~~ -resources --app.js --images ---progress.png (this...
Scaling images for different resolutions
Hi, I am stuck on first steps of building UI. Let me try to explain the issue.. I have my own UI design with a header which contains logo on the left and a menu button on the right. this header have a background named headerback.png. There are...
backgroundImage for view on IPhone vs Android
I am trying to build an app that works on iphone and android, but keep running into path issues on different types of UI components. I spend more time trying to work thru these issues than building the app itself! I am creating a view in a file which is...
backgroundImage retina display issue
This is not a question but a solution. If you use backgroundImage on iPhone and you have both normal and @2x images to display you can fix the double size image problem by changing lines around 426 (where you see the TiDimensionLayerContentCenter call) in...
Something happens make me doubt about the
i found one ticket in jira, http://jira.appcelerator.org/browse/TIMOB-3228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel, in this jira, the problem is marked as "can not reproduce", and there's comment listed saying the...
Why loads the backgroundImage of createButton 3 times?
Hi, If I got a backgroundImage for a button, it loads 3 times. I think that is because, if you use a backgroundImage, a button also need an image for backgroundSelectedImage and backgroundDisabledImage. Well, that makes some sense. But it also loads...
window backgroundImage no scale
Hi, i have a backgroundimage in a windowview and a tabbar at the bottom. Is it possible that the background image does not get scaled? greets, ToM
TableView - How to change row's backgroundImage
How can i change one table's row background? I create my table like this: ~~~ var tableData= []; for(var i=0; i< options.length; i++){ var rowAux=Titanium.UI.createTableViewRow({ backgroundImage:"../images/row.png", ...
Button BackgroundImage, but silver button corners still show?
ANDROID 2.3.3 Samsung Galaxy S Okay so I created a button, set a background image (blue rounded rectangle) but the corners of the grey button show up behind the image no matter what way I stretch it [screenshot](http://i.imgur.com/PWwjf.jpg) Is there an...
Background repeating pattern
How do I set a background image to be a repeating pattern instead of just a background image. It tends to stretch and distort with various screensizes and I'd like to not do that :\
TabBar background images problem
Hi everyone, I'm developing an app with a TabGroup that has 4 tabs, I've been trying to use a custom image for my tabs on the "tab bar" (I'm not sure thats the real name but many post call it that way) What I want is to have my 4 different images...
Can't set backgroundImage for tableViewRow?
This is on iPhone. I'm trying to create a custom tableView, so I use this: EDIT: not just for tableViewRow, *backgroundImage* isn't working for anything. window.backgroundImage, view.backgroundImage... ~~~ var data = []; var row =...
Background image for windows in tabgroup, not showing. Bug maybe?
When i try this code: ~~~ var tabGroup = Ti.UI.createTabGroup({ backgroundColor: '#FF6600' // orange }); ~~~ Then all the windows in my tabgroup get an orange background color. But when i change that line to a `backgroundImage`, then the background...
backgroundImage for view not working in android
heres my code ~~~ var view1 = Ti.UI.createView({ backgroundImage:'C:\Documents and Settings\hamza\My Documents\sd.png', }); ~~~
Row backgroundImage doesn't work
Hello. I want to change in tableView click event the background of this row. This is my code: ~~~ tableView.addEventListener('click', function(e) { var fila = e.row; if (fila.desplegado == 0){ fila.backgroundImage =...
Titanium removes a slash from http://?
My code: ~~~ weathericon.backgroundImage = 'http://' + url; ~~~ This fails in Android, but not iPhone. In the log I get this: ~~~ (main) [14287,42330] /data/data/(...)/app_appdata/http:/www.worldweatheronline.com/images/wsymb(...) open failed: ENOENT...
button backgroundFocusedImage overrided by some color?
This is a style-related question. I have a button, to which I have added both a backgroundImage and a backgroundFocusedImage. When I 'tap' the button in the simulator, it does change, but not to the background I have selected. The normal background is a...
Label background rectangle with padding
Dear people, I want to make custom tableviewrows with styled labels. The label needs a black background with fuiven padding on the left, right, top and bottom. When i set the backgroundColor to black it's almost what i need but i cant set the padding....
Titanium.UI.createButton + backgroundImage = cursing
I'm trying to create an image button. (a custom image that looks like it would be in the same family as the SystemButton.INFO_LIGHT one) The createButton code has a backgroundImage property -so this should be doable right? Heck I even see buttons with...
Correct way to do a button with custom graphic in 2.0+ SDKs
I just upgraded from the Ti SDK to 1.8.2 to 2.0.2 and I am noticing that my button that use to look fine is all stretched now. I know on iOS it was smart enough to do a smart stretch so the actual png is only 15x44. I know android has this behavior I am...