簡體   English   中英

找不到擴展的通知布局屬性'找不到屬性的資源標識符'

[英]Expanded notification layout attributes can not be found 'No resource identifier found for attribute'

我正在使用SDK(下面的xml)中提供的大圖通知模板。 但是添加此布局后,我無法編譯我的項目。

即使我使用的是架構: http://schemas.android.com/apk/prv/res/android : http://schemas.android.com/apk/prv/res/android ,也應提供layout_minHeightlayout_maxHeight

為什么會有這個問題,如何解決?

錯誤:(5)在軟件包“ android”中找不到屬性“ layout_minHeight”的資源標識符

錯誤:(5)在軟件包“ android”中找不到屬性“ layout_maxHeight”的資源標識符

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:internal="http://schemas.android.com/apk/prv/res/android"
    android:id="@+id/status_bar_latest_event_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    internal:layout_minHeight="65dp"
    internal:layout_maxHeight="unbounded"
    >
    <ImageView
        android:id="@+id/big_picture"
        android:layout_width="match_parent"
        android:layout_height="192dp"
        android:layout_marginTop="64dp"
        android:layout_gravity="bottom"
        android:scaleType="centerCrop"
        />
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="6dp"
        android:layout_marginTop="64dp"
        android:scaleType="fitXY"
        android:src="@drawable/title_bar_shadow"
        />
    <include layout="@layout/notification_template_material_base"
        android:layout_width="match_parent"
        android:layout_height="64dp"
        />
  <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="208dp"
        android:paddingStart="@dimen/notification_large_icon_width"
        android:layout_gravity="bottom"
        android:background="#CCEEEEEE"
        >
        <include
            layout="@layout/notification_material_action_list"
            android:id="@+id/actions"
            android:layout_gravity="bottom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            />
    </FrameLayout>
</FrameLayout>

來源: http : //grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.1_r1/frameworks/base/core/res/res/layout/notification_template_material_big_picture.xml

xmlns:internal="http://schemas.android.com/apk/prv/res/android"更改為xmlns:internal="http://schemas.android.com/apk/res-auto"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM