zoukankan      html  css  js  c++  java
  • 关于res-auto

     
    在使用library自定义属性时,命名空间URI需要使用http://schemas.android.com/apk/res-auto,
    在编译时,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>

  • 相关阅读:
    PowerDesigner将PDM导出生成WORD文档
    哨兵机制
    redis 主从数据同步
    redis RDB
    redis AOF机制
    redis数据结构
    dependencyManagement 和 dependencies的区别
    同源策略 跨域资源共享
    高可用 可扩展 多层反向代理架构演进
    String 杂记
  • 原文地址:https://www.cnblogs.com/tonyhan/p/4819772.html
Copyright © 2011-2022 走看看