I have an issue with Appcelerator App Designer.
I have an image path in assets like app/assets/iphone/images/MainBG.png
In xml i need to use path like /images/MainBG.png
But App Designer set path like /iphone/images/MainBG.png that does not work when i run my app... Yes, i can change this path, but after that i cant see image in App Designer view.
And second question:
App Designer cant use alpha... Yes, i can manualy set BGcolor like rgba(150,0,0,0.5) but in App Designer view i cant see result.
Can any one help me?
Sorry for my English))
Though I have not used App Designer, but following might help you:
put all your image files in app/assets/images folder
now set path in XML like image='/images/MainBG.png'
Set background color manually, you can use following combos:
you can use backgroundColor:"#fff"
also you can use backgroundColor:"#ffffff"
this one also works backgroundColor:"white"
this one works for alpha - backgroundColor:"#abcd", in this syntax, alpha will be 'aa' & r/g/b will be bb/cc/dd.
so this one will also work for alpha - backgroundColor:"#aabbccdd", 2 digits for each alpha/red/green/blue
Related
I require a simple but potentially complex solution that I can't seem to find code that translates from Android for my iOS version APP.
I simply need a imageview grid such as shown here from a single web directory: https://www.youtube.com/watch?v=fIX4SnBLaZg
I have a working version on Android but can't seem to figure it out on Objective C.
My working version uses JSON to find each file in the directory and associated text, then simply adds each entry to the grid. The iOS version doesn't need to be as complicated if anyone has any examples?
Would anyone have any examples/snippets/APIs of implementing something like this into iOS?
Or even a simplified version such as only images from a directory. Simply have the thread read an entire folder from URL, file by file, and populate it in imageview's. Then once a user clicks on an image, simply view it full screen?
For your requirement you can use collection view . Please follow the below tutorial
uicollectionview-basic-tutorial
And to get images of jpg stored in bundle under folder named Images
NSArray *imagesOfjpgType = [[NSBundle mainBundle]pathsForResourcesOfType:#"jpg"
inDirectory:#"Images"];
To customize the cell to your design Please use the below code
https://stackoverflow.com/a/16579595/1142743
Also Please find sample from above tutorial which has a label below the image
https://www.dropbox.com/s/1uymyrwtx2yn9fs/RecipePhoto.zip?dl=0
I've searched high and low on stackoverflow and google for an answer to this question. Perhaps it's not possible, or I may need to devise a different method to do this.
In our iOS app we have a whole bunch of image sets in images.xcassets. But we're moving to a more dynamic environment where we'll be downloading image sets instead.
I'd like to try and stick with the convention of having everything in the images.xcassets folder. Except as said, I want to dynamically create the image sets based on the data we retrieve from our server. Is this possible?
So there is a way to do this, but it's iOS 8.0 and above. Unfortunately, we're supporting 7 and above so I can't use it.
But for anyone else who's interested, you can use the UIImageAsset class to do what you need to do when you want to create a container for your images to encapsulate different resolutions, as the images.xcassets container currently does.
UIImageAsset docs
This answer gives a good overview of the XCAssets folder at runtime: Can I access an xcassets directory on the filesystem? - it looks like it's the wrong way of going about things.
I believe it is recommended that you use the temp or document folders, depending on the how long you wish to keep these images (https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html).
I'm working on a bootstrapped extension for firefox android, and I have a problem with displaying icons in a new menu item:
itemMenuId = window.NativeWindow.menu.add("Show more details",ico , function() { showToast(window); });
in ico I wrote the uri of the icon file existing in the root of my extension (icon.png is next to bootstrap.js), using data: and file://, like described here but the icon isn't displayed. I don't know how to fix the path for that. Beside I'm having the same problem with the iconURL in the install.rdf file, when I use chrome:// I get nothing, and when I use resource:// I get a missing image. Should I have chrome.manifest to use chrome://? and even if I don't specify the url,to let the image be displayed by default like here it still doesn't work.
<em:iconURL>resource://trackdetect/icon.png</em:iconURL>
I googled it ,but, I couldn't fix it. Please help and thanks.
For the issue, just make sure you have a file named icon.png in the root of the XPI (the same folder as bootstrap.js) and the image will be used. You don't even need the entry in the manifest. See: https://developer.mozilla.org/en-US/docs/Install_Manifests#iconURL
Erik Vold's guide explains how to reference files packaged within a bootstrapped extension.
However it is strange that the icon doesn't appear at the addons list (you don't specify a iconURL, just place icon.png next to bootstrap.js, as you did). Perhaps you should check if the tool you use creates PNGs that conform to the standard.
I have been told this is possible to do but cannot get this to work.
Basically I am trying to cache and image using forge.file.cacheURL()
Now I can get the file just fine and display it in the page by creating a new Image object but what I want to do is use this cached image to change the image in the topbar.
When ever I try to do it I get an error saying "file not found" and after reading the docs a little more it seems that trigger may have "src/" coded into the class because if I put just "image/logo.png" the logo.png will show up in the header because its part of the app package.
I guess the question is.. Is my assumption correct?
Thanks!
The native UI elements (topbar/tabbar) load images directly from your apps package, not through a URL in the same ways images are shown in the webview.
What this means is that currently you can only use images included in your app in the topbar/tabbar modules.
in case anyone is interested in this, the ability was added a while ago to the API so you can now use a cached image or filesaveURL feature of forge to change the header image dynamically.
I need to change the folder icon in a sharpoint document library view.
The catch is, the folder icon is dependent upon various folder properties. So, I need a specific icon for specific folders (I just don't want to change the folder icon across the board).
My initial thoughts were, that if I could find the page (xml or aspx) that sharepoint uses to generate the img tag, I would modify the source to be something like:
src="/GetFolderIcon.aspx?fn={FolderNameHere}"
Where {FolderNameHere} is the actual folder name. Then, in GetFolderIcon.aspx, I would look up the various folder properties, and determine which .gif or .jpeg I needed to send back to the browser.
The problem is, I don't know where that page is located, or what it's even called.
I don't know if that's the correct approach or not, but that's my current thoughts.
Any suggestions on how to do this?
Thanks!
here is a tutoral on something very similar.
http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/