关于res-auto
2015-09-18 17:03
246 查看
在使用library自定义属性时,命名空间URI需要使用http://schemas.android.com/apk/res-auto,
在编译时,URI会自动替换为当前app的package名。
下面是使用support lib 的属性的例子
在编译时,URI会自动替换为当前app的package名。
下面是使用support lib 的属性的例子
<android.support.v4.widget.DrawerLayout android:id="@+id/dl_main_drawer" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <!-- 你的内容布局--> <include layout="@layout/navigation_content"/> <android.support.design.widget.NavigationView android:id="@+id/nv_main_navigation" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" app:headerLayout="@layout/navigation_header" app:menu="@menu/drawer_view"/> </android.support.v4.widget.DrawerLayout> |
相关文章推荐
- lintcode——排序列表转换为二分查找树(链表,二叉排序树)
- python thrift 服务端与客户端使用
- 黑马程序员_java面向对象_多态和异常
- Android加载通话记录流程分析
- 吃蛋糕 cate题解
- Jbrowse染色体片段的显示的配置方法
- 使用Gradle构建Android工程
- UITableView动态改变Cell高度
- struts-spring整合
- ul中的li的高度在IE6、IE7、IE8、FF下不兼容问题的解决办法
- iOS选择照片、相册问题
- 链表的基本操作
- iOS项目上传到AppStore步骤流程
- 解决:vmnet0上的网桥当前未运行
- Performance Comparison Studies With Real-Life Scenarios in an Experimental Data Taking Context Lever
- zoj 1015 fishing net
- WebSessionStore: Could not obtain reference to HttpContext
- MVC学习笔记---ModelBinder
- ASP.NET加JS方式
- Noip 备战篇(四)