Question

I am working on Tizen. Developing an application on Tizen which has been already developed by me on Android.

I have to place an image in the background.and then place button on it. Click on that button and receive its action in javascript.

How can I place image in the background.

Is their any way to transfer android application on Tizen platform.

Can we make our android application on Tizen?

Was it helpful?

Solution

background-image in CSS can do it.

E.g. put mesh_background_1280x720.jpg into images directory than fix your style.css:

body {
    background-image: url("../images/mesh_background_1280x720.jpg");
}

For me this works.

OTHER TIPS

You can do it by using Jquery Mobile.

.ui-icon-myapp-custom {
    background: url("settings.png") no-repeat rgba(0, 0, 0, 0.4) !important;
}

in HTML,

<a href="#user_info" data-role="button" data-theme="b" data-iconpos="right" data-icon="myapp-custom" >
Custom Icon
</a>

For detail, check http://jquerymobile.com/test/docs/buttons/buttons-icons.html

Currently there is no support in Tizen SDK to convert Android app to Tizen. But there is a way. A company Open Mobile developed ACL(Application Compatible Layer) for tizen. If you have Android app, you can submit it to them, they can convert it for Tizen. All application credit will be name on you. They will get a amount from samsung. Search ACL in Tizen store, you will find several application under ACL.

I can tell you how to do this using Tizen Native (WYSIWYG). If you are seeking a code based answer, then ignore this. HOWEVER, for those trying to learn and navigate within Tizen Studio this is very helpful!

Start Tizen Studio

File/New Tizen Project

Template / Next

Mobile / Next

Native Application / Next

UI Builder Single View (Bottom Left) / Next

In the Project Explorer (Top Left) open the tree to Layout / Layout.xml (Double click to open the Layout).

Choose Design Tab (Center)

In Palette , UI Container (just to right of center)

Drag "Grid" from the Palette onto your screen

In Properties Tab (far right or turn on: Window/ Show View/ Other/ choose properties OK)

Change Col Count to 720 and Row Count to 1280

Drag "Grid" from the Palette onto your screen

Now you should see more (22) UI Components

Drag "Background" from the Palette onto your screen If it does not automatically resize (Hello BUG) then do the following. Drag to a little LARGER then your screen size (assuming HD, Look into this I think this is REQUIRED by the Tizen Store).

With Background highlighted, again go to Properties Tab, bottom Variation Attributes make: Left 0, Top 0, Width 720, Height 1280. The first few times it will give you trouble until you figure out that the BG resized window can't go higher than the BLUE TOP and the window should be larger on the bottom, until you manually type in the CORRECT SIZE as shown above.

Now go to or open your Resource Tab (just drag and drop files here from Windows Explorer) and find your background image that you already RESIZED CORRECTLY in Adobe PS and used SAVE FOR WEB to reduce jpg file size.

Drag onto Background "layer" on your Screen.

For a button you can: Drag "BUTTON" from UI components onto Background OR BETTER is to drag "IMAGE" from UI components onto Background...

Then drag and drop (PRE-MADE BUTTON from Adobe PS) image from the Resource Manager Tab onto the empty image place holder. You will have to resize it manually in the Properties Tab to get the correct proportions.

REPEAT for more Images and Buttons and Text since the built in text "Label" is horrible to say the least. You can always make any of these do Button Actions.

This is as far as I have come, now I need to learn how to program said buttons and actions.

Whew! This will save you many weeks! Wish I had found a step by step like this!

Now where to post this? IO

P.S. If you find this useful. Tick the little black up arrow to up vote this. Purely to help others, I receive no reward for "likes".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top