Adding a background image to screen

25 Jun '15, 06:32 PM
3,345 Views
No Forum Badges

I was wondering how the background image was added to the login screen in the Partner Network app? I am trying to add a background image to my mobile app.

 

Thanks

 
x 0
Follow
Answer Answer at this question and get points!
Forum Expert - Level 5

Hi Teryn,
the background image used for the login screen in the Partner Network app, is the "login-bg.jpg" default image of MobileDefault Style.


If you want to use the same template "MobileDefault/Login" template for the Login Screen by using another image, you can replace the default image with the new, by adding it in the "MobileContent/MobileDefault/images" path of your Mobile Project. Use the same name of the image "login-bg", in way that the old image is correctly replaced with the new one.

To add the folders: in the WebRatio Explorer View right-click on your Mobile Project, choose "WebRatio" and then "Add MobileContent folder.." option. After the folder creation, right-click on the "MobileContent" folder, choose the "New" option and in the dialog insert in the "Folder name" field, the new sub-folders "MobileDefault/images".

 

If you use the WebRatio Mobile Platform Professional Edition and you have a custom Style Project, you can change the ".login-screen" class in the css file using the new image in this way:
- in the css file, add the class ("login-new.jpg" is the new background image):
.login-screen{
  background:url(../images/login-new.jpg) no-repeat center scroll;
  background-size:cover}
- in the "images" folder of your custom Style Project add the new image
- in the Layout.xml of the Style Project, in the configuration of the CSS file add in the "Requires" section: the "mobiledefault-style" resource (in this way the older file will be updated)

For more information about the use of the Style Project, you can refer to use a custom Style Project at this article https://my.webratio.com/learn/learningobject/Getting-started-with-the-Style-Project.

 

Best regards,

Ombretta Malinverno

   
x 2
Answer at this question and get points!