首页> 外国专利> METHOD AND APPARATUS FOR SHARING SERVICE LOGIC BETWEEN LANDSCAPE MODE AND PORTRAIT MODE IN ANDROID SYSTEM

METHOD AND APPARATUS FOR SHARING SERVICE LOGIC BETWEEN LANDSCAPE MODE AND PORTRAIT MODE IN ANDROID SYSTEM

机译:在安卓系统中景观模式和肖像模式之间共享服务逻辑的方法和装置

摘要

A method and apparatus for sharing service logic between a landscape mode and a portrait mode in an Android system. The method comprises: defining a service log class for the same service logic between a landscape mode and a portrait mode, wherein a performance function corresponding to the same service logic between the landscape mode and the portrait mode is stored in the service logic class (S1); according to different service logic between the landscape mode and the portrait mode, defining a first service class of the landscape mode and a second service class of the portrait mode, and instantiating the service logic class in a construction function of the first service class and a construction function of the second service class (S2); and transferring an event function onTouchEvent, called back to a landscape or portrait interface by an Android system, to an instantiated object of the service logic class, so that the instantiated object of the service logic class calls a corresponding performance function to process the event object (S3). By bridging a function shared by a landscape service logic and a portrait service logic to a customized service logic class, the method realizes the aim of service sharing, and greatly reduces the redundancy of codes and improves the efficiency of development.
机译:一种用于在Android系统中的横向模式和纵向模式之间共享服务逻辑的方法和装置。该方法包括:为横向模式和纵向模式之间的相同服务逻辑定义服务日志类,其中,将横向模式和纵向模式之间的相同服务逻辑对应的性能函数存储在服务逻辑类中(S1 );根据横向模式和纵向模式之间的不同服务逻辑,定义横向模式的第一服务类和纵向模式的第二服务类,并在第一服务类和构造函数的构造函数中实例化服务逻辑类。第二服务等级的构造功能(S2);并将事件函数onTouchEvent转移到服务逻辑类的实例化对象,该事件函数onTouchEvent被Android系统调用回到横向或纵向界面,以使服务逻辑类的实例化对象调用相应的性能函数来处理事件对象(S3)。通过将景观服务逻辑和肖像服务逻辑共享的功能桥接到定制的服务逻辑类,实现了服务共享的目的,大大减少了代码的冗余,提高了开发效率。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号