zoukankan      html  css  js  c++  java
  • 解决 android.support.v7.widget.GridLayout 使用 xmlns:app 出现 error 的问题

    GridLayout 是在 Android API Level 14 加进来的

    它可用来取代 TableLayout

    也提供了自由度较大且实用的排版功能

    为了兼容 4.0 以下的较低版本

    Android 提供了 android.support.v7.widget.GridLayout 这个 libuary

    当使用 xml 档做画面排版的时候

    如果是使用 android.support.v7.widget.GridLayout

    有一些属性需要使用 app 这个 name space


    app:orientation
    app:columnCount
    app:rowCount
    app:alignmentMode
    app:useDefaultMargins
    app:columnOrderPreserved
    app:rowOrderPreserved

    但是问题来了

    即使加上 name space 宣告


    xmlns:app="http://schemas.android.com/apk/res/专案package"

    Lint 还是会报错

    Unexpected namespace prefix "app" found for tag android.support.v7.widget.GridLayout

    这该如何是好?

    找了一下解决方法,最后发现只要告诉 Lint 忽略这个问题就好了

    xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="MissingPrefix"

  • 相关阅读:
    pop动画
    CoreData的用法
    高德地图详细使用方法
    GDataXML配置过程
    图片懒加载(仿SDWebImage)
    GCD创建单例
    多线程-多线程基础
    Zookeeper-集群与单机实践
    oracle-union all与order by联合使用
    分布式和集中式架构
  • 原文地址:https://www.cnblogs.com/Free-Thinker/p/3406281.html
Copyright © 2011-2022 走看看