
这两种设置android:name字段的方式有什么区别?
我看过两种类型,但不确定为什么要用两种不同的方式写
我经常看到的一种方式是(注意“和”服务器之间的“.”):
androID:name=".Server" 另一种方式是没有多余的“.”名称前:
androID:name="Server"样本XML
<service androID:name=".Server" androID:icon="@drawable/ic_launcher" androID:label="audioservice" androID:process=":my_process" > </service> <activity androID:name=".DBVIEw"> <intent-filter > <action androID:name="com.example.test.DBVIEW"/> <@R_419_4602@ androID:name="androID.intent.@R_419_4602@.DEFAulT" /> </intent-filter>解决方法:
看this.
总结The name of the Service subclass that implements the service. This should be a fully qualifIEd class name (such as, “com.example.project.RoomService”). However, as a shorthand, if the first character of the name is a period (for example, “.RoomService”), it is appended to the package name specifIEd in the element.
以上是内存溢出为你收集整理的android:name中的前导点是什么意思?全部内容,希望文章能够帮你解决android:name中的前导点是什么意思?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)