I am trying to figure out the location where I should be adding my custom splash image. I followed the instructions at, http://docs.trigger.io/en/v1.4/modules/launchimage.html#modules-launchimage however I don't know the folder location to place this image within my trigger project src structure.
You can place the image anywhere in the src folder, the path you give is relative to src.
For example, if you have a file your-app/src/splash.png then putting "splash.png" in config.json should work.
If you use the App config page in the Toolkit to select the image it will let you choose from the files in src so you don't have to manually enter the path.
Related
I've included 2 svg images for my background, one is at top and other at bottom. With my local host (live server) they show up without any problem, but now that is uploaded at github it doesn't show at all. I don't know what's wrong since all the assets (folder with images) are correctly uploaded.
Chrome shows this error:
2 GET https://ruth9403.github.io/assets/images/bg-top.svg 404enter image description here
I'm a noob just doing my first attemps of web pages :'v, and also new at github.
This is my github repository:
https://github.com/ruth9403/pricing-toggle-hamburger.github.io
And this is my github url for the project:
https://ruth9403.github.io/pricing-toggle-hamburger.github.io/
Thanks a lot for your time, and your kind soul!:Denter image description here
You have an issue with your path. Your CSS file is in the folder assets. And your absolute CSS path after resolution points to https://ruth9403.github.io/pricing-toggle-hamburger.github.io/assets/assets/images/bg-bottom.svg which doubles the assets folder.
Hence you have to change the image path for the background to images/bg-bottom.svg. Basically you have an issue with your relative path. For CSS files always the folder where the CSS file is located is used as "starting point" for the traversal.
Should solve it:
body {
background: url("images/bg-bottom.svg"), url("images/bg-top.svg");
}
at least it did for me :P.
A project site is available at http(s)://<user>.github.io/<repository>
In your case: https://github.com/ruth9403/pricing-toggle-hamburger (not https://github.com/ruth9403/pricing-toggle-hamburger.github.io)
Make sure to check the settings of your repository in order to activate the page publication.
Make sure the publishing source is master (it would be the gh-pages branch otherwise by default for a project page).
Please bear with me while I try to explain my problem
Suppose the folder structure of my download container's Document folder is represented /A/B/C/, which I have obtained through the proper API's in ViewController.m. I am porting a PC C++ project to ios, where, at one point the program decodes it's input to get the name and full path of a file, for example, as images\background.png. Since my program automatically locates the Document folder through API's, it is supposed to create the folder structure /A/B/C/images\background.png. The program I am porting to ios also contains a directory creator function, which detects the locations of / in the pathname string, checks whether a directory by that name is already present or not (for example, it would detect /A as being present, but /A/B/C/images would be detected as absent, as images has not been created yet). The function creates all the subfolders in this tree if they do not exist already. After the directory structure has been created (/A/B/C/images), the program does something like this to create the file (background.png in this example):
.
.
.
Create directory structure
fid = fopen(`/A/B/C/images\background.png`, "wb"); // note that full path `/A/B/C/images\background.png` is automatically determined by the program by the time it reaches this point
.
.
file writing code
fclose(fid)
.
.
My problem is that after creating the folder images, it creates the png file as images\background.png, instead of creating a background.png inside the images folder. I have already ported this program to android NDK and it creates the png file inside the images folder as expected, so I can only assume that android considers \ to indicate a subfolder while ios doesn't.
What can be done in order to get background.png created inside the images subfolder? Any idea will be appreciated.
I have the following brand new project, created with:
$ ionic start MyIonic2Project sidemenu --v2
My question is very simple:
where do I locate a directory for application images (asset images / fixed images / icons / etc)?, inside: {resources, src, www, etc}?. I'm looking for best practices.
how the url of these images would look like?. I wanna specify the <img src="<url/to/image.jpg>" /> element within the file: src/pages/home/home.ts.
src/assets/ folder should contain all the resources. You can use any sub-folder depending on type of resource. During the build process everything in the src/assets is copied to www/assets.
how the url of these images would look like?
You have to give the path relative to your current file when it would be in www folder.
It is generally ../assets/../filename if you are setting in your scss file.(This would end up as part of main.css within build folder).
and ./assets/../filename in your html file.
for two days now, i have been looking for the correct place to put my local images and the correct way to access them in the Appcelerator platform (working with Alloy framework).
All i want to do is simply display a local image through an image view component. It works well with an image get from URL but seems impossible to get it from a local file.
this is an simple image view declaration in my index.js controller
/app/controllers/index.js. Where do i have to put my image to get this code working?
var img = Ti.UI.createImageView({
image:'images/DefaultIcon.png',
top:10,
width:100,
height:100
});
$.index.add(img);
I have read all the documentation about that issue and read a lot of similar questions over the internet. Anyway, none of the answers i've been reading bring me the correct solution.
No matter where i put my images into my project directory (assets folder, root folder, resource folder, image folder), those images seem to be not accessible !
I'm currently developing on iOS platform...
I really hope some of you guys have the solution ...!
Best regards,
Quentin
You need to put the images in the /app/assets/iphone/images folder.
Within that folder you can create as many folders as you'd like, the only thing you need to do is update the path accordingly.
So, you have an image with the name myIcon.png. Put this in /app/assets/iphone/images/myIcon.png (and don't forget to include #2x and #3x images in the same folder).
Then, in your imageView use this path /images/myIcon.png.
Want to put it in a folder? For example /app/assets/iphone/images/icons/myIcon.png then reference it in an imageview with /images/icons/myIcon.png.
For android you too need to use the images folder inside app/assets/android. But to specify dimension specific images you can put them in ldpi, mdpi,hdpi,xhdpi,xxhdpi and xxxhdpi folders as specified by Android
i have a quick question and would really appropriate some advice.
i am trying to upload images to a directory held in in the view of a module.
the full link to the pic's directory in 'my member's module' is:
C:/Users/test/zend/testingZend2/module/Members/view/members/pics
however, the upload function is held in MembersController :
C:/Users/test/zend/testingZend2/module/Members/src/Members/Controller/membersController
i am able to upload images to the directory. however, i obviously don't want to use the full URL. i want to use a relative link.
i tried the relative links below but they don't work;
Members/view/members/pics
and
../../../view/members/pics
is there for example a function like dirname(DIR) that will provide the first half of the link to the pics directory.
thank you for your help
Paths are relative to the application root, so module/Members/view/members/pics should work.
I would question whether the view folder is a sensible place to store user-uploaded images. Images aren't views, and you won't be able to display these images easily since they are not in a public folder.