找回密码
 立即注册
查看: 2328|回复: 0

Tizen系统基本列表小部件代码

[复制链接]
发表于 2015-8-30 12:26:11 | 显示全部楼层 |阅读模式
这段代码去掉演示如何创建和使用一个简单的列表小部件。
  1. //create a box for your list object
  2. Evas_Object *box = elm_box_add(ad->win);
  3. evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
  4. elm_win_resize_object_add(ad->win, box);
  5. evas_object_show(box);

  6. //create the list object
  7. Evas_Object *list = elm_list_add(ad->win);
  8. evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
  9. evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
  10. elm_box_pack_end(box, list);

  11. for (int i = 0; i < 10; i++)
  12.         elm_list_item_append(list, "item", NULL, NULL, NULL, NULL);

  13. //enable multiple selections
  14. elm_list_multi_select_set(list, EINA_TRUE);

  15. // enable scroller bouncing
  16. elm_scroller_bounce_set(list, EINA_TRUE, EINA_TRUE);

  17. //set scroller policy (here, vertical scroller will always be visible, horizontal will be shown when needed
  18. elm_scroller_policy_set(list, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_ON);

  19. //uncomment this for a horizontal list
  20. //elm_list_horizontal_set(li, EINA_TRUE);

  21. evas_object_show(list);
  22. elm_list_go(list);
复制代码


欢迎来到泰泽网:http://www.tizennet.com/ 泰泽论坛:http://bbs.tizennet.com/ 好没有内涵哦,快到设置中更改这个无聊的签名吧!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|泰泽应用|泰泽论坛|泰泽网|小黑屋|Archiver|手机版|泰泽邮箱|泰泽网 ( 蜀ICP备13024062号-1 )

GMT+8, 2024-11-24 03:01 , Processed in 0.073172 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表