error: No resource identifier found for attribute ‘footerColor’ in package

news/2024/5/19 4:27:15

异常提示:

使用自定义控件,引用包名应该是AndroidManifest.xml中所定义的包路径,并非src下.java文件所指向的包,这个容易犯错!

否者Android studio 中的xml布局界面,运行后会提示以下错误:

error: No resource identifier found for attribute ‘footerColor’ in package

一般情况下,加上这一句就可以了,特殊情况下,再根据上边那种实现

xmlns:app="http://schemas.android.com/apk/res-auto"

参考xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    android:id="@+id/container"
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.lvche.app"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res/com.lvche.app"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentBottom="true"
    android:background="@color/white_pure"
    >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="bottom"
        android:orientation="vertical"
        tools:ignore="UselessParent">

        <RelativeLayout
            android:id="@+id/topbanner"
            android:layout_width="match_parent"
            android:layout_height="@dimen/height_top_bar"
            android:background="@color/banner_bgcolor"
            android:gravity="center_vertical">

            <TextView
                android:id="@+id/topbanner_showtext"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:text="我的收藏"
                android:textColor="#ffffff"
                android:textSize="23sp"/>

            <Button
                android:id="@+id/topbanner_setting"
                android:layout_width="60dp"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:background="@color/orange"
                android:onClick="save"
                android:textColor="#fff"
                android:textSize="18sp"
                android:visibility="gone"/>
        </RelativeLayout>

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:orientation="vertical"
            tools:ignore="InefficientWeight">


            <com.lvche.app.incubator.ui.componennt.tabbarview.ui.TitleIndicator
                android:id="@+id/pagerindicator"
                android:layout_width="fill_parent"
                android:layout_height="50dp"
                android:background="#ffffff"
                app:footerColor1="@color/tab_indicator_text_selected"
                app:footerLineHeight1="0dp"
                app:footerTriangleHeight1="3.0dp"
                app:textColor="@color/tab_indicator_text"
                app:textSizeNormal="@dimen/common_text_size_middle_2"
                app:textSizeSelected="@dimen/common_text_size_middle_2"
              />

            <RelativeLayout
                android:layout_width="fill_parent"
                android:layout_height="1.0dp"
                android:background="#eeeeee">
            </RelativeLayout>

            <!-- Don't set background for ViewPager. It doesn't work because of page margin -->

            <com.lvche.app.incubator.ui.componennt.tabbarview.ui.ViewPagerCompat
                android:id="@+id/pager"
                android:layout_width="fill_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:clickable="false"
                android:duplicateParentState="true"/>
        </LinearLayout>
    </LinearLayout>

</RelativeLayout>




http://www.niftyadmin.cn/n/4582765.html

相关文章

Eclipse 调试时,出现错误闪退,但是控制台没有打印错误信息

解决途径&#xff1a; 可以监视一下 ThreadGroup这个类的uncaughtException这个方法 贴上代码给予参考 /** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with* this work for ad…

区块链中密钥对的生成原理

bitcoin中的密钥综述 关于bitcon中使用的椭圆曲线加密体制的一些事实&#xff1a; 私钥长度 32bytes 公钥长度 64bytes (未压缩形式) 或者 32bytes&#xff08;压缩形式&#xff09; 1byte&#xff08;前缀&#xff09; 椭圆曲线C是secp256k1曲线椭圆曲线加密体制基于模运算 在…

SSH hibernate 分页的几种实现方式

转载请注明出处~&#xff01;&#xff01; 第一种: DetachedCriteria Criteria 形式 SuppressWarnings({ "unchecked", "rawtypes" })public PageModel getPageModel(final PageModel pageModel, final DetachedCriteria _criteria, Class entityType)…

textarea文本域自适应高度

-----------------html <div><textarea autoHeight"true">textarea</textarea></div> 复制代码-----------------js $.fn.autoHeight function(){function autoHeight(elem){elem.style.height auto;elem.scrollTop 0; //防抖动elem.styl…

优秀Android博客大全,整理了国内外大神博客/Github地址,是学习Android进阶的首选[转]

[转]国内外优秀Android博客大全&#xff0c;覆盖了国内外大神博客地址&#xff0c;Github地址&#xff0c;是学习Android进阶的首选国内&#xff1a; 昵称Github博客介绍邓凡平 http://blog.csdn.net/innost阿拉神农魏祝林 http://blog.csdn.net/android_tutor Trineahttps://…

Bitmap 图片格式并用 C++ 读写 Bitmap

转自 Bitmap 图片格式并用 C 读写 Bitmap 1、Bitmap 图片格式 每部分的具体内容就不展开了。要说的有两点&#xff1a; &#xff08;1&#xff09;调色板不是必须的&#xff0c;可有可无&#xff0c;有没有调色板可以通过位图文件头的 bfOffBits 是否等于位图文件头加上位图信息…

Android Studio多渠道打包和代码混淆教程 【亲测可用】

from : http://www.tuicool.com/articles/mQZNvey 时间 2015-11-18 10:13:14 极客头条原文 http://coolshell.info/blog/2015/03/android-studio-prefrence.html主题 Gradle Android Studio什么是Gradle Gradle是一种依赖管理工具&#xff0c;基于Groovy语言&#xff0c;面向J…

UIView和Masonry实现动画效果

Masonry 实现动画效果如下&#xff1a; //button点击方法 - (void)clickedButton {static BOOL isMove; //默认是NOWeakify(weakSelf);//告诉self.view约束需要更新[weakSelf.view setNeedsUpdateConstraints];//调用此方法告诉self.view检测是否需要更新约束&#xff0c;若需要…