Languages

Menu
Sites
Language
Navigation between two forms in tizen 2.3

Hi all,

I am porting my 2.2.1 app to 2.3, know i dont know how to navigate between two forms in 2.3 
can any one please help me regarding the above issue

Regards
Harish

Responses

10 Replies
colin Rao

Not clearly, should be more detailed?

Possible the naviframe widget can achieve your purpose. You can check the details in IDE help.

harish kumar kavali

Hi Colin rao,

My requirement is to open a form on button click & go back to previous form on h/w back key press

Regards
Harish

Alex Dem

Hi,
I suppose you should use naviframes and use push/pop methods.
Some useful links:
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.tutorials/html/native/ui/naviframe_tutorial_n.htm
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.guides/html/native/ui/containers_n.htm
Alexey.

Vikram

Also, you can study the source code with the sample project in IDE. 

Example: File > New > Tizen Native Project > Sample > Native App > UI Controls

Jean Yang

Hi,

there is a way to implement HW back key, if you used naviframe:

1. register the HW key callback like this:

 eext_object_event_callback_add(ad->nf, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL);

// eext_naviframe_back_cb--Convenient macro function that pop the naviframe item

static inline void
eext_naviframe_back_cb(void *data, Evas_Object *obj, void *event_info)
{
   elm_naviframe_item_pop(obj);
}
 

2. in your first naviframe main form, implement the APP exit call back

elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, win);

static Eina_Bool
naviframe_pop_cb(void *data, Elm_Object_Item *it)
{
 ui_app_exit();
 return EINA_FALSE;
}

Vikram

Hi, As the callback, I think this case is just used in a UI app with all views are holded in naviframe. If the root/first view isn't the naviframe, the app will exit abnormal. :)

static Eina_Bool
naviframe_pop_cb(void *data, Elm_Object_Item *it)
{
 ui_app_exit();
 return EINA_FALSE;
}

 

Alex Dem

Hi,
Also, just fyi, you could implement one callback instead of two (avoid naviframe_pop_cb) this way:

 

static void
naviframe_back_cb(void *data, Evas_Object *obj, void *event_info)
{
    Elm_Object_Item *top = elm_naviframe_top_item_get(obj);

    if(top == elm_naviframe_bottom_item_get(obj))
    {
        ui_app_exit();
    }
    else
    {
        elm_naviframe_item_pop(obj);
    }
}
...
    eext_object_event_callback_add(ad->nf, EEXT_CALLBACK_BACK, naviframe_back_cb, NULL);

Alexey.

colin Rao

Hi harish kumar kavali

Yes, the simple way is to use the naviframe to manage your forms, also, you can use the tizen default implement for naviframe hw back key(eext_object_event_callback_add(ad->nf, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL);), it's just popup the top sub view of naviframe. 

First, you can study its basic use cases on IDE sample project "UI Controls".

Another way,

We can implement the forms transfer by manually, and without the hw back event.

Like:

Form 1: with a button "Go to From2", on touch event, create and show form2.

Form 2: with a button "Back to Form 1", create and show form 1.

reminder to keep the forms status while tranfer the screen. :)

Ashwini Kumar

Hi All,

I am trying to use navirame container for my app in Mobile env..

My requirement is not to have the Title bar. Is there any naviframe style which provides this?

Or any other way to achieve this

I just want the content area to add my items into it.

Thanx,

Ashwini

Vikram

Hi,

You can disabled the item title by call elm_naviframe_item_title_enabled_set.

ad->nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, content, NULL);
elm_naviframe_item_title_enabled_set(ad->nf_it, EINA_FALSE, EINA_FALSE);