I am developing a watch face and want to include some preferences (with UI components like checkboxes, etc.) that the user can open by tapping on the watch face. For this, what is the proper way to open a preferences list? Is it possible to include the code for the preferences (genlist, sliders, etc.) in the watch face project? Or do I need to create a dedicated UI project which is then bundled with the watch face via the Multi Package function of Tizen Studio and launched from the watch face through the app manager (app_control_h)?
-
I just found the documentation on Tizen.org which specifies which combinations are possible for native multi-projects: docs.tizen.org/application/native/tutorials/process/… According to this doc, a UI project cannot be packaged with a watch project. In fact, the only project type that can be combined with a watch is a service. So the question now is if a genlist with UI components can be opened from a watch face directly.go3d– go3d2021-04-19 23:07:27 +00:00Commented Apr 19, 2021 at 23:07
-
Hello, why do you need an additional view over your watchface? I think.. it is abnormal user experience. you can find good example: Project - new - tizen project - sample - wearable 5.5 - native application - watch type : Weather Watch => 3 options are toggled by touch action.Lunch Basketball– Lunch Basketball2021-04-21 03:42:46 +00:00Commented Apr 21, 2021 at 3:42
-
@LunchBasketball Thanks for your comment! Yes, I get it. I have another watch face design where indeed I managed to implement all user settings via a graphic menu that appears when tapping the center of the watch ( it is called "Cronosurf Breeze&Air", you find it in the Galaxy store). But in this new project I need the ability for the user to enter text (via the soft keyboard). Is there a better way to do this without the genlist/naviframe method?go3d– go3d2021-04-22 00:06:26 +00:00Commented Apr 22, 2021 at 0:06
2 Answers
@go3d, I think you can use the entry component for the user text input. here is the document for the entry usages on the wearable device. (https://docs.tizen.org/application/native/guides/ui/efl/wearable/component-entry/) I guess you can add some codes for the entry component to the WeatherWatch sample.
Example)
void maxlength_reached(void *data, Evas_Object *obj, void *event_info)
{
//Implements the behavior when the entry maxlenth is reached.
}
static void _entry_enter_click(void *data, Evas_Object *obj, void *event_info)
{
//Implements the behavior when the enter key is pressed.
}
// Create Entry Object.
Evas_Object* entry = elm_entry_add(layout);
elm_entry_single_line_set(entry, EINA_TRUE);
elm_entry_scrollable_set(entry, EINA_TRUE);
elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
evas_object_smart_callback_add(entry, "maxlength,reached", maxlength_reached, NULL);
limit_filter_data.max_char_count = 0;
limit_filter_data.max_byte_count = 100;
elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_filter_data);
elm_object_part_text_set(entry, "elm.guide", "input your text");
elm_entry_cursor_end_set(entry);
evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add(entry, "activated", _entry_enter_click, NULL);
elm_object_content_set(layout, entry);
2 Comments
preferences(saving data). There are 2 ways:
Using App Preference you may save information about the currently selected application, so when changing the app settings and return it back, the application will be loaded with the preferences, which was set during the last session.
- use xamarin.essentials NuGet package and
Preferences.Get(..)orPreferences.Set(..)methods