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>

  • 相关阅读:
    6.4 总结(关于正确率)
    POI2013 Bytecomputer
    BZOJ1485 有趣的数列
    PAM
    BZOJ1787 meet
    BZOJ3895 rock
    URAL 1996 Cipher Message 3
    BZOJ1468 Tree
    Javascript初识之数据类型
    Javascript初识之流程控制、函数和内置对象
  • 原文地址:https://www.cnblogs.com/tonyhan/p/4819772.html
Copyright © 2011-2022 走看看