游戏技术文章

Application

时间:2017-4-2 16:51:23  作者:棋牌资源网  来源:棋牌资源网  查看:7743  评论:0
内容摘要:Base class for maintaining global application state. You can provide your own implementation by creating a subclass and specifying the fully...
Base class for maintaining global application state. You can provide your own implementation by creating a subclass and specifying the fully-qualified name of this subclass as the "android:name" attribute in your AndroidManifest.xml's <application> tag. The Application class, or your subclass of the Application class, is instantiated before any other class when the process for your application/package is created.

用来维护全局应用状态的基类,你可以通过创建子类并在AndroidManifest.xml的<application>标签下的 "android:name" 属性指定全限定类名来提供你自己的实现。Application类或者你自己创建的Application的子类,会在你的application/package的进程创建之前的任何类之前实例化。

Note: There is normally no need to subclass Application. In most situations, static singletons can provide the same functionality in a more modular way. If your singleton needs a global context (for example to register broadcast receivers), include Context.getApplicationContext() as a Context argument when invoking your singleton's getInstance() method.

注意:通常不太需要实现Application子类。在大多数情况下,静态单例类会更模块化地提供相同的功能。如果你的单例类需要全局的context(例如:要注册broadcast receiver),当调用你单例类的getInstance()方法时,包含Context.getApplicationContext()作为Context。

标签:Application 

欢迎加入VIP,【VIP售价:只要288元永久VIP会员】畅享商业棋牌游戏程序下载,点击开通!

下载说明


☉本站所有源码和资源均由站长亲自测试-绝对保证都可以架设,运营!
☉如源码和资源有损坏或所有链接均不能下载,请告知管理员,

☉本站软件和源码大部分为站长独资,资源购买和收集,放心下载!

☉唯一站长QQ:1004003180  [人格担保-本站注重诚信!]

☉购买建议E-mail:1004003180@qq.com   源码收购 E-mail:1004003180@qq.com    

☉本站文件解压密码  【文章内都自带解压密码,每个密码不同!】


上一篇:ios webp转换jpg
下一篇:HangFire概述

本站提供的所有源码,均来源站长提供,仅学习交流 浙ICP备09009969号

由此产生不良后果和法律责任与本站无关,如果侵犯了您的版权,请来信告知 1004003180@qq.com 将及时更正和删除! 

Copyright © 2008-2024 棋牌资源网,你身边的棋牌资源下载站    All Rights Reserved