分类:C#、Android、VS2015;

创建日期:2016-03-03

一、简介

通过服务绑定(Bound Services),可以轻松实现后台服务与界面(UI)的交互。

二、本章示例主界面

1、运行截图

【Android】17.0 第17章 服务绑定—本章示例主界面

2、MainActivity.cs文件中对应的代码

chItems.Add(new Chapter()
{
    ChapterName = "第17章 服务绑定",
    ChapterItems = new ChItem[]
    {
        new ChItem { type = typeof(ch1701BindingActivity), Title="例17-1 绑定到LocalService", Desc = "演示绑定到 Local Service 的基本用法" },
        new ChItem { type = typeof(ch1702MainActivity), Title="例17-2 绑定到StartedService", Desc = "演示绑定到 Started Service 的基本用法" },
        new ChItem { type = typeof(ch1703MainActivity), Title="例17-3 绑定到IntentService", Desc = "演示绑定到 IntentService 的基本用法" },
        new ChItem { type = typeof(ch1704MainActivity), Title="例17-4 利用Messenger实现进程间通信", Desc = "演示利用Messenger实现进程间消息通信的基本用法" },
    }
});

相关文章:

  • 2021-10-01
  • 2021-06-24
  • 2021-06-01
  • 2021-08-21
  • 2021-04-08
  • 2022-03-02
  • 2021-09-24
  • 2021-11-10
猜你喜欢
  • 2021-11-02
  • 2021-12-12
  • 2022-01-31
  • 2021-11-22
  • 2021-06-13
  • 2022-02-17
  • 2021-10-01
相关资源
相似解决方案