Languages

Menu
Sites
Language
Gradient. Naviframe

Hello!

How can I remove a gradient of Naviframe layer? I need just simple color fill. And, how can I do that without background layer?

Responses

6 Replies
Alex Dem

Hi,
On Z3 (2.4) I did not observe gradient for naviframe (checked with UI Controls app ->Naviframe or UI Controls app -> Nocontents).
Please provide more details or code snippet?
Alexey.

Alexey Kiryanov

I have just two pages, and when i change color with  function  evas_object_color_set(naviframe, 255, 255, 255, 255), it is gradient blue, but not just white. When i change colors, it the changing color of the gradient. For example: I changed color to red, and it still gradient, Dark red on top and lighter on bottom.

Alex Dem

Hi,
What device do you use? I have checked UI Components with Z1/Z3 devices and  with emulator and did not observe gradient for navirame (solid color). Also I tried to use background for naviframe - no gradient :

    bg = elm_bg_add(nf);
    elm_bg_color_set(bg, 66, 162, 206);
    elm_naviframe_item_push(nf, "Solid Color", NULL, NULL, bg, NULL);

Alexey.

Alexey Kiryanov

I'm sorry, I could not answer for a long time. Thank You very much Alex, your advice help me

Chanwook Jung

You can use layout too but there is no on/off API.

Deepak Khunt

Its just simple , 

-> Create NaviFram In a Conformant

-> Add a "nocontent" Layout to the Naviframe

/* Adding Naviframe */
nf = elm_naviframe_add(ad->conform);
elm_naviframe_prev_btn_auto_pushed_set(nf, EINA_TRUE); /* since Tizen 2.4 */
elm_object_content_set(ad->conform, nf);
evas_object_show(nf);

/* Adding layout */
ly = elm_layout_add(nf);
elm_layout_theme_set(ly, "layout", "nocontents", "default");
elm_object_part_text_set(ly, "elm.text", "Naviframe Content Area");

if you want to add your data to the empty layout then 

add the layout to the newly created grid view

Evas_Object *grid = elm_grid_add(nf);
evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(grid);

Evas_Object *ly = elm_layout_add(grid);
elm_layout_theme_set(ly, "layout", "nocontents", "default");
evas_object_show(ly);
elm_grid_pack(grid, ly, 0, 0, 100, 100);

then add a box to the grid as follow :

Evas_Object *box = elm_box_add(grid);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_content_set(grid,box);
evas_object_show(box);

then add data to box that you want to display..

Please Mark As Answer, If it's relevant . Thank You