2017-02-24 4 views
0

Diese ziehbar diagonal erstellen Schnitt Hintergrund:Android android: color = "android: colorbackground" nicht gefunden Klasse

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> 
    <item android:drawable="@color/colorPrimary"/> 
    <item android:top="170dp" 
     android:bottom="-100dp" 
     android:left="0dp" 
     android:right="-300dp"> 
     <rotate 
      android:fromDegrees="-10" 
      android:pivotX="0%" 
      android:pivotY="100%"> 
      <shape 
       android:shape="rectangle"> 
       <solid 
        android:color="?android:colorBackground"/> 
      </shape> 
     </rotate> 
    </item> 
</layer-list> 

In android studio Ansicht Arbeit, aber nach RUN arbeiten nicht auf mobilen

Errorlog:

android.view.InflateException: Binary XML file line #9: Error inflating class <unknown> 

Wie beheben?

+0

gibt es keine Möglichkeit Thema/style-Attribut von XML ziehbar auf Pre-Lollipop-Geräten, vervielfältigen von http zu verweisen://stackoverflow.com/questions/8041537/how-to-reference-style-attributes-from-a-drawable – nikis

+0

Mögliches Duplikat von [Wie referenziere ich Stilattribute aus einem Zeichensatz?] (http://stackoverflow.com/questions/ 8041537/how-to-reference-style-attribute-from-a-drawable) – nikis

+0

Können Sie mir mehr helfen? –

Antwort

0

Du Thema Referenzen in XML Drawables mit erfordert API-Ebene 21 (Strom min niedriger 21)

Verwandte Themen