当前位置:  编程技术>移动开发
本页文章导读:
    ▪listView item中button焦点有关问题        listView item中button焦点问题 对于按钮的点击冲突问题 通常  android:focusable="false"     android:focusableInTouchMode="false"  ......
    ▪ Intents and Intent Filters-序文        Intents and Intent Filters---序言 Intents and Intent FiltersKey classes   1. Intent   2. IntentFilter   3. Activity   4. Service   5. BroadcastReceiver   6. PackageManager本文中将包含以下内容:   1. Intent Objects   2. Int.........
    ▪ 不同字体的对话框的一种使用       不同字体的对话框的一种应用 public class ExampleApp extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); AlertD.........

[1]listView item中button焦点有关问题
    来源: 互联网  发布时间: 2014-02-18
listView item中button焦点问题

对于按钮的点击冲突问题 通常

 android:focusable="false" 
    android:focusableInTouchMode="false" 


    
[2] Intents and Intent Filters-序文
    来源: 互联网  发布时间: 2014-02-18
Intents and Intent Filters---序言
Intents and Intent Filters

Key classes

   1. Intent
   2. IntentFilter
   3. Activity
   4. Service
   5. BroadcastReceiver
   6. PackageManager

本文中将包含以下内容:

   1. Intent Objects
   2. Intent Resolution
   3. Intent filters
   4. Common cases
   5. Using intent matching
   6. Note Pad Example

   Three of the core components of an application — activities, services, and broadcast receivers — are activated through messages, called intents. Intent messaging is a facility for late run-time binding between components in the same or different applications. The intent itself, an Intent object, is a passive data structure holding an abstract description of an operation to be performed — or, often in the case of broadcasts, a description of something that has happened and is being announced. There are separate mechanisms for delivering intents to each type of component:

翻译:在Android系统中有三类核心组件 activities, services, broadcast receivers。这些组件都是通过一个称之为intent的消息对象激活的。intent消息对象可以理解是应用程序或应用程序之间组件的链接或绑定工具。intent消息对象本身只是一个抽象数据结构体对象,其中包含的信息是对某种操作的描述。针对所要激活的组件类型的不同,发送相应的intent 对象的方式也分以下三种。(intent这个词我个人理解还是不要翻译出来为好,把它理解成与HttpRequest类似的请求对象既可。)

    一、An Intent object is passed to Context.startActivity() or Activity.startActivityForResult() to launch an activity or get an existing activity to do something new. (It can also be passed to Activity.setResult() to return information to the activity that called startActivityForResult().)【翻译:Intent对象作为Context.startActivity() 或 Activity.startActivityForResult()方法的参数,可以在方法执行的时候让系统创建并启动一个activity实例或是使得一个现存的activity实例响应该intent请求,执行相关的操作(Intent对象也是Activity.setResult()方法的参数,该方法与startActivityForResult()方法有前后依赖关系,目标activity可以向源activity返回intent对象的,实际需要的返回值被封装在原始intent实例中被返回)】。

    二、An Intent object is passed to Context.startService() to initiate a service or deliver new instructions to an ongoing service. Similarly, an intent can be passed to Context.bindService() to establish a connection between the calling component and a target service. It can optionally initiate the service if it's not already running.
      【翻译:Context.startService()方法的参数intent的目的是创建一个服务组件实例或是给一个执行中的服务实例发送指令,同样, Context.bindService()的参数intent的作用是在当前组件与目标服务之间创建一个连接,如果说目标服务没有启动,那么将会创建目标服务组件实例。】

    三、Intent objects passed to any of the broadcast methods (such as Context.sendBroadcast(), Context.sendOrderedBroadcast(), or Context.sendStickyBroadcast()) are delivered to all interested broadcast receivers. Many kinds of broadcasts originate in system code.【翻译:intent对象也是众多广播方法如Context.sendBroadcast(), Context.sendOrderedBroadcast(), 或 Context.sendStickyBroadcast()的参数,这个参数同样也是被传递给广播接收组件的,在Android系统代码中,有很多类型的广播接收组件。】

In each case, the Android system finds the appropriate activity, service, or set of broadcast receivers to respond to the intent, instantiating them if necessary. There is no overlap within these messaging systems: Broadcast intents are delivered only to broadcast receivers, never to activities or services. An intent passed to startActivity() is delivered only to an activity, never to a service or broadcast receiver, and so on.

【翻译:以上我们说到的场合,Android系统会查找目标activity或目标service或是相关的那些广播接收器组件来对当前 intent实例做应答,如果说需要,那么系统会创建相应的组件实例,系统在定位目标组件的时候不会出现重复定位的现象,不同类别的目标组件会被严格区分。】

This document begins with a description of Intent objects. It then describes the rules Android uses to map intents to components — how it resolves which component should receive an intent message. For intents that don't explicitly name a target component, this process involves testing the Intent object against intent filters associated with potential targets.

【翻译:该文档开始介绍intent消息对象。同时还将就Android系统对intent实例和目标组件之间的匹配规则以及intent消息对象如何被解析、匹配到一个目标组件的详细过程做描述。尤其针对隐式intent消息对象,对Android系统基于intent过滤器寻找目标组件的匹配测试过程作详细说明。】

    
[3] 不同字体的对话框的一种使用
    来源: 互联网  发布时间: 2014-02-18
不同字体的对话框的一种应用
public class ExampleApp extends Activity
{
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        AlertDialog.Builder ab=new AlertDialog.Builder(ExampleApp.this);
 		ab.setMessage(Html.fromHtml("<b><font color=#ff0000> Html View " +"</font></b><br>Androidpeople.com"));
 			ab.setPositiveButton("ok", null);
 			ab.show();
    }
}

 


    
最新技术文章:
▪Android开发之登录验证实例教程
▪Android开发之注册登录方法示例
▪Android获取手机SIM卡运营商信息的方法
▪Android实现将已发送的短信写入短信数据库的...
▪Android发送短信功能代码
▪Android根据电话号码获得联系人头像实例代码
▪Android中GPS定位的用法实例
▪Android实现退出时关闭所有Activity的方法
▪Android实现文件的分割和组装
▪Android录音应用实例教程
▪Android双击返回键退出程序的实现方法
▪Android实现侦听电池状态显示、电量及充电动...
▪Android获取当前已连接的wifi信号强度的方法
▪Android实现动态显示或隐藏密码输入框的内容
▪根据USER-AGENT判断手机类型并跳转到相应的app...
▪Android Touch事件分发过程详解
▪Android中实现为TextView添加多个可点击的文本
▪Android程序设计之AIDL实例详解
▪Android显式启动与隐式启动Activity的区别介绍
▪Android按钮单击事件的四种常用写法总结
▪Android消息处理机制Looper和Handler详解
▪Android实现Back功能代码片段总结
▪Android实用的代码片段 常用代码总结
▪Android实现弹出键盘的方法
▪Android中通过view方式获取当前Activity的屏幕截...
▪Android提高之自定义Menu(TabMenu)实现方法
▪Android提高之多方向抽屉实现方法
▪Android提高之MediaPlayer播放网络音频的实现方法...
▪Android提高之MediaPlayer播放网络视频的实现方法...
▪Android提高之手游转电视游戏的模拟操控
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3