Question
I created a project using UI Builder's Navigation View template in Tizen Studio 1.1.0 with SDK 3.0. However, the navigation bar at the top is not visible.
I understand that naviframe is automatically created in the window - isn't naviframe included by default? How can I make it visible? Do I need to manually add a toolbar in the XML file?
Answer
Problem Understanding
When using the Navigation View template in UI Builder, the naviframe component is automatically generated but operates behind the scenes. This means while the navigation functionality exists, the visual navigation bar isn't automatically displayed in your UI.
Solution Methods
-
Using Basic UI (EFL) Template:
- If you need full control over the navigation bar appearance and functionality, consider starting with the Basic UI (EFL) template instead.
- This allows you to manually implement and customize the naviframe with visible navigation controls.
-
Manual Toolbar Implementation:
- You can manually add navigation buttons by: a. Opening your layout XML file b. Dragging and placing button components at the top of your view c. Implementing the navigation functionality through these buttons
Code Examples
The naviframe is automatically handled in the generated code (located at Project-dir/src/managed/src/manager/uib_app_manager.c):
void prepare(){
// ... other code ...
Evas_Object* nf = win_obj->app_naviframe;
Elm_Object_Item* nf_it = elm_naviframe_bottom_item_get(nf);
eext_object_event_callback_add(nf, EEXT_CALLBACK_BACK, nf_hw_back_cb, vc);
evas_object_show(nf);
elm_naviframe_item_pop_cb_set(nf_it, nf_root_it_pop_cb, win_obj->win);
// ... other code ...
}
Additional Tips
- The auto-generated files (like uib_app_manager.c) should not be manually edited as they are regenerated when saving the project.
- For more advanced navigation implementations, consider studying the EFL (Enlightenment Foundation Libraries) documentation available on samsungtizenos.com.