`
lily0813
  • 浏览: 4001 次
  • 性别: Icon_minigender_2
  • 来自: 上海
社区版块
存档分类
最新评论

零碎知识点总结

 
阅读更多
[size=large][size=large][size=small]1.nevigation drawer总结,布局文件
最外面是一个android.support.v4.widget.DrawerLayout,里面两个标签,第一个必须是内容(相当于slidingdrawer的content),第二个是handle(相当于slidingdrawer的handler)顺序不可变。
2.hanler一般为listview或者其他可以选择其中一项的控件。drawLayout可以为其设置打开关闭的监听事件,可以使用android提供的actionbardrawertoggle,或者自己设置监听器,自己实现。
3.实现invalidateoptionsmenu方法后系统会去调用onprepareoptionsmenu方法。其方法内可以对通过oncreateoptionsmenu实现好的menu进行对menu的一些更改,比如可以设置其的可见与不可见状态。
Intent intent=new Intent(Intent.ACTION_QUERY);
intent.putExtra(SearchMnager.SEARCH,Charsequence value);
SearchManger的QUERY的官方解释
[/size]

public static final String QUERY
Added in API level 1
Intent extra data key: Use this key with content.Intent.getStringExtra() to obtain the query string from Intent.ACTION_SEARCH.
Constant Value: "query"
public Intent putExtra (String name, CharSequence value)
Added in API level 1
Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".
ParametersnameThe name of the extra data, with package prefix.valueThe CharSequence data value.
Returns
* Returns the same Intent object, for chaining multiple calls into a single statement.

See Also
* putExtras(Intent)
* removeExtra(String)
* getCharSequenceExtra(String)
*

*
if (intent.resolveActivity(getPackageManager())!= null) {
                     startActivity(intent);
                }就是寻找符合条件的componentpublic ComponentName resolveActivity (PackageManager pm)
Added in API level 1
Return the Activity component that should be used to handle this intent. The appropriate component is determined based on the information in the intent, evaluated as follows:
If getComponent() returns an explicit class, that is returned without any further consideration.
The activity must handle the CATEGORY_DEFAULT Intent category to be considered.
If getAction() is non-NULL, the activity must handle this action.
If resolveType(ContentResolver) returns non-NULL, the activity must handle this type.
If addCategory(String) has added any categories, the activity must handle ALL of the categories specified.
If getPackage() is non-NULL, only activity components in that application package will be considered.
If there are no activities that satisfy all of these conditions, a null string is returned.
If multiple activities are found to satisfy the intent, the one with the highest priority will be used. If there are multiple activities with the same priority, the system will either pick the best activity based on user preference, or resolve to a system class that will allow the user to pick an activity and forward from there.
This method is implemented simply by calling resolveActivity(Intent, int) with the "defaultOnly" parameter true.
This API is called for you as part of starting an activity from an intent. You do not normally need to call it yourself.

ParameterspmThe package manager with which to resolve the Intent.
Returns
* Name of the component implementing an activity that can display the intent.
See Also
* setComponent(ComponentName)
* getComponent()
* resolveActivityInfo(PackageManager, int)
* int imageId=imageview.getIdentifier(String name,String defType,String defPack);该方法是通过image的名字,包名,类型,为drawable楼来得到image的资源定位符,暂且这么说吧。但前提是imag的名字与其在drawable文件夹中图片的名字是相同的。
public int getIdentifier (String name, String defType, String defPackage)

Added in API level 1
Return a resource identifier for the given resource name. A fully qualified resource name is of the form "package:type/entry". The first two components (package and type) are optional if defType and defPackage, respectively, are specified here.

Note: use of this function is discouraged. It is much more efficient to retrieve resources by identifier than by name.

Parameters
name The name of the desired resource.
defType Optional default resource type to find, if "type/" is not included in the name. Can be null to require an explicit type.
defPackage Optional default package to find, if "package:" is not included in the name. Can be null to require an explicit package.
Returns
int The associated resource identifier. Returns 0 if no such resource was found. (0 is not a valid resource ID.)[/size]
[/size]
分享到:
评论

相关推荐

    408统考计算机网络23版零碎知识点

    以下是计算机网络零碎知识点的总结: 一、网络基础知识 1. 多路复用技术:多路复用技术是指在同一个物理信道上传输多个信号的技术。封装式多路复用技术将多个信号封装到一个信道中,A层及以下层协议相同,A层以上...

    【中考英语知识点总结,中考英语语法复习资料】学习啊参考.docx

    【中考英语知识点总结】 在准备中考英语的过程中,学生们常常会感到困惑和困难,尤其是在面对复杂的语法和词汇记忆时。然而,学习英语并非无迹可寻,掌握正确的学习方法至关重要。以下是一些关键的学习策略和技巧。...

    平时工作中常用的Python零碎知识总结,爬虫学习总结与练习,Python数据分析学习总结,目前正在重新整理中....zip

    Python是一种广泛应用于编程领域的高级编程语言,尤其在数据处理、自动化...总的来说,这份资料集将带你走进Python的世界,无论是初学者还是有一定经验的开发者,都能从中找到有价值的知识点,提升自己的Python能力。

    单片机零碎年度学习总结.doc

    此外,阅读原理性教材也是必不可少的,以便掌握细节知识。 第三步是进入工程实战阶段,通过实际项目来综合运用所学知识。如文中提到的液体点滴监控系统,涉及LCD显示、串口通信等多种技术,这有助于提升解决问题的...

    单片机零碎年度学习总结三篇.doc

    购买开发板并配合实验教材,可以快速掌握单片机的基础知识。在初期,不依赖视频教程或书籍,直接动手操作能更直观地理解单片机的工作原理。 进入进阶阶段,可以通过观看详细的视频教程,如郭天祥的《十天学会单片机...

    Arcims 零碎知识

    理解并掌握这些基础知识点,对于从事GIS开发和应用的人员来说,能够更好地利用ArcIMS实现地图服务的创建和优化,提高工作效率。尽管ArcIMS已被更现代的ArcGIS Server所取代,但其基本原理和技巧在GIS领域仍然具有...

    部编版三年级语文下册知识点总结课堂笔记2.燕子.docx

    【知识点详解】 1. **词语理解与应用** - **会认字**:linglì (伶俐), yìyàng (一样), juàn (倦), xiánsǎn (闲散), xiāngān (相干), hén (痕) - **会写字**:còu (凑), fú (拂), jíjù (聚集), xí...

    Qt那些零碎的小知识

    总之,Qt中的QPalette和自定义标题栏是两个重要的知识点,它们能帮助开发者实现更个性化和交互友好的用户界面。QPalette提供了丰富的颜色管理功能,而自定义标题栏则允许开发者摆脱操作系统的限制,打造独特的应用...

    《项目管理》知识点归纳总结.doc

    "《项目管理》知识点归纳总结" 《项目管理》知识点归纳总结是指项目管理中的各种知识点的总结和归纳。项目管理是指对项目的规划、组织、领导和控制,以达到项目目标的过程。项目管理涉及到项目的各个方面,包括项目...

    Linux运维从初级进阶为高级知识点总结

    时间也很碎片化,各种零碎的琐事围绕着你,很难体现个人价值,渐渐的对行业很迷茫,觉得没什么发展前途。 这些枯燥无味工作的确会使人匮乏,从技术层面讲这些其实都是基本功,对后期的运维工作会无形中带来一定的...

    PythonBasic:平时工作中常用的Python零碎知识总结,爬虫学习总结与练习,Python数据分析学习总结,目前正在重新整理中.....

    python常用的小知识点,目录监控,文件处理,日志等... python网络编程套接字,多线程,多进程,装饰器,面向对象等... linux常用操作命令,vim,环境安装部署等... 《深度浅出统计学》,numpy,pandas基础概念及...

    过控总复习.doc

    自动控制系统知识点总结 自动控制系统是一个复杂的系统,它涉及到多个领域,如工艺、仪表、自动化等。下面是自动控制系统的知识点总结: 1. 被控变量的选择原则: ① 把持变量应是可控的,即工艺上同意调理的变量...

    考研计算机网络协议总结

    考研计算机网络协议总结,名称、所在层、作用及其他注意点备注,按照2021届王道书总结的,考前可以看一看,快速记忆零碎的知识点

    net学习笔记涉及机制

    3. **零碎知识总结**:这部分可能包含的是作者在学习过程中遇到的一些小知识点,例如异常处理、事件驱动编程、多线程、反射、委托和Lambda表达式等。这些零碎的知识点虽然零散,但在实际编程中却非常实用。 【压缩...

    高考生物二轮复习点线构成知识网络.pdf

    最后,构建知识网络是将零碎知识系统化的手段,通过揭示知识之间的内在联系,形成多维度的知识结构,促进知识的迁移和拓宽。这不仅使基础知识更牢固,还能够提高学生的理解和综合分析能力。每个知识点与其他知识点...

    在学习GUI时,所涉及到的一些方法的总结

    GUI用到的一些方法,何其注意事项,还有一些零碎的知识点的总结。比如有 getText()方法来获取文本,setText()方法来设置文本内容

    信管专业毕业论文题目参考.docx

    下面是从该文件中提取的知识点: 1. 信息管理与信息零碎的概念:信管专业是信息管理和信息零碎的结合体,是一个新兴的专业。 2. 信息管理的应用领域:信息管理的应用领域非常广泛,包括水利工程、建筑工程、电力...

    过控复习.doc

    本文将对“过控复习.doc”文件的内容进行知识点提炼和总结,涵盖了进程控制、检测仪表、传感器、调理器、PID调理器、智能电动履行器、进程操纵零碎计划等方面的知识点。 一、进程控制 * 进程控制的定义:进程控制...

    中石油华东《现代远程教育导论》2020年秋季学期在线作业答案(二).docx

    ### 知识点总结 #### 一、在线学习平台与个人信息的重要性 - **知识点概述**: - 在线学习平台的高效运作依赖于学员提供的准确个人信息。 - 学员应当确保在学习平台上的个人信息栏中输入正确的手机号码,以便...

    智能仓储方案设计.doc

    下面是智能仓储方案设计的知识点总结: 1.1 货位标识方法 * 高位货架上的货位,将电子标签粘贴在托盘上。 * 主动化平面库的货位,将电子标签粘贴在周转箱上。 * 阁楼式货架的货位,将电子标签粘贴在货箱上。 * ...

Global site tag (gtag.js) - Google Analytics