Im aufzublasen versuchen Floating Action-Knopf einzubetten .Following ist meine XML-DateiBinary Inflation Fehler beim Schwimmen Taste
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:background="@drawable/border"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/proformo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:text="PI 12343"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<TextView
android:id="@+id/shippingStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_weight="1"
android:text="Cargo Shipped"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000"
android:textStyle="bold" />
<TextView
android:id="@+id/shippingDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="on07 oct 2015"
android:textColor="#000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="20dp"
android:orientation="horizontal">
<TextView
android:id="@+id/invoiceNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="PI 12345"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/invoiceDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="on Dec 2016"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="20dp"
android:orientation="horizontal">
<TextView
android:id="@+id/shipment_ref_no_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Shipment Ref.# :"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/shipment_ref_no_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="4312412412"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="20dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/etdLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ETD:"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/etdValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="24 oct 2015"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/etaLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ETA:"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/etaValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="09 dec 2014"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="20dp"
android:orientation="horizontal">
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/networkImage"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginRight="10dp"
android:scaleType="centerCrop"
android:src="@drawable/noimage" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/productName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="BioMass Pellets"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/quantity_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Quantity: "
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/quantity_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="40mts"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/amount_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Amount: "
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/amount_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="200 USD"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/rate_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Rate"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/rate_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="40 USD"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:orientation="horizontal">
<TextView
android:id="@+id/shipped"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Shipped By "
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000" />
<TextView
android:id="@+id/shippedcompany"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:orientation="horizontal">
<android.support.design.widget.FloatingActionButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/ic_dialog_email"
app:backgroundTint="@color/colorPrimaryDark"
app:borderWidth="0dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Das Problem ist, dass Im die folgenden Fehlermeldung erhalten,
Android. view.InflateException: Binär-XML-Dateizeile # 300: Fehler Klasse android.support.design.widget.FloatingActionButton bei android.view.LayoutInflater.createView (LayoutInflater.java:626) auf einem droid.view.LayoutInflater.createViewFromTag (LayoutInflater.java:702) bei android.view.LayoutInflater.rInflate (LayoutInflater.java:761) bei android.view.LayoutInflater.rInflate (LayoutInflater.java:769) bei android. view.LayoutInflater.rInfllate (LayoutInflater.java:769) bei android.view.LayoutInflater.rInfllate (LayoutInflater.java:769) bei android.view.LayoutInflater.inflate (LayoutInflater.java:498) bei android.view. LayoutInflater.inflate (LayoutInflater.java:398) bei android.view.LayoutInflater.infllate (LayoutInflater.java:354) bei com.vaighai.adapters.CustomAdapter.getView (CustomAdapter.java:74) bei android.widget.AbsListView.obtainView (AbsListView.java:2627) bei android.widget.ListView.measureHeightOfChildren (ListView.java:1259) bei android.widget.ListView.onMeasure (ListView.java:1171) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1410) bei android. widget.LinearLayout.measureVertical (LinearLayout.java:695) bei android.widget.LinearLayout.onMeasure (LinearLayout.java:588) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.widget.FrameLayout.onMeasure (FrameLayout.java:310) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1410) bei android.widget.LinearLayout.measureVertical (LinearLayout.java:695) bei android. widget.LinearLayout.onMeasure (LinearLayout.java:588) bei android.view.View.measure (View.java:16831) bei android.support.v4.widget.DrawerLayout.onMeasure (DrawerLayout.java:940) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.widget.FrameLayout.onMeasure (FrameLayout.java:310) bei android.support.v7.widget.ContentFrameLayout.onMeasure (ContentFrameLayout.java:135) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.support.v7.widget.ActionBarOverlayLayout.onMeasure (ActionBarOverlayLayout.java:391) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.widget.FrameLayout.onMeasure (FrameLayout.java:310) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1410) bei android.widget.LinearLayout.measureVertical (LinearLayout.java:695) bei android.widget.LinearLayout.onMeasure (Linearlayout. java: 588) bei android.view.View.measure (View.java:16831) bei android.view.ViewGroup.measureChildWithMargins (ViewGroup.java:5245) bei android.wi dget.FrameLayout.onMeasure (FrameLayout.java:310) bei com.android.internal.policy.impl.PhoneWindow $ DecorView.onMeasure (PhoneWindow.java:2586) bei android.view.View.measure (View.java: 16831) bei android.view.ViewRootImpl.performMeasure (ViewRootImpl.java:2189) bei android.view.ViewRootImpl.measureHierarchy (ViewRootImpl.java:1352) bei android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:1535) bei android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1249) bei android.view.ViewRootImpl $ TraversalRunnable.run (ViewRootImpl.java:6364) bei android.view.Choreographer $ CallbackRecord.run (Choreographer.java: 791) bei android.view.Choreographer.doCallbacks (Choreographer.java:591) bei android.view.Choreographer.doFrame (Choreographer.java:561) bei android.view.Choreographer $ FrameDisplayEventReceiver.run (Choreographer.java:777) bei android.os.Handler.handleCallback (Handler.java:730) bei android.os.Handler.dispatchMessage (
Wie kann ich das in Ordnung bringen?
ernst? FloatingActionButton als Teil des ListView-Elements? – Selvin
Das sieht aus, als würde es benutzt, um ein ListView Item aufzublasen, wie @Selvin sagte. Bitte poste etwas mehr Code. –
ja .... Ich versuche, es auf jeden Listeneintrag einzubetten –