chrisjenx / Calligraphy

Custom fonts in Android the easy way...
Apache License 2.0
8.59k stars 1.1k forks source link

Getting crashed #0: Error inflating class TextView #425

Closed shadowTech1627 closed 5 years ago

shadowTech1627 commented 6 years ago

android.view.InflateException: Binary XML file line #0: Error inflating class TextView at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:720) at android.view.LayoutInflater.rInflate(LayoutInflater.java:762) at android.view.LayoutInflater.rInflate(LayoutInflater.java:771) at android.view.LayoutInflater.rInflate(LayoutInflater.java:771) at android.view.LayoutInflater.inflate(LayoutInflater.java:499) at uk.co.chrisjenx.calligraphy.CalligraphyLayoutInflater.inflate(CalligraphyLayoutInflater.java:60) at android.view.LayoutInflater.inflate(LayoutInflater.java:398) at com.loginext.tracknext.ui.orderDetails.fragmentGeneralDetails.GeneralDetailsFragment.onCreateView(GeneralDetailsFragment.java:251) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)

My xml file <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/od_parent_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.loginext.tracknext.ui.orderDetails.fragmentGeneralDetails.GeneralDetailsFragment">

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_above="@+id/rl_btn">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginRight="@dimen/dimen_10"
        android:paddingBottom="@dimen/dimen_10"
        android:paddingTop="@dimen/dimen_10">

        <TextView
            android:id="@+id/tv_order_type"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:background="@drawable/ic_pickup_order_type"
            android:paddingBottom="@dimen/dimen_15"
            android:paddingLeft="@dimen/dimen_20"
            android:paddingRight="@dimen/dimen_20"
            android:paddingTop="@dimen/dimen_10"
            android:text="PICKUP"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_label_time"
            style="@style/textLabel"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:text="Reach By"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_time"
            style="@style/textValue"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_below="@+id/tv_label_time"
            android:layout_marginTop="@dimen/dimen_2"
            android:text="10:30 AM"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_order_no"
            style="@style/textValue"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/tv_order_type"
            android:paddingLeft="@dimen/dimen_10"
            android:paddingTop="@dimen/dimen_10"
            android:layout_marginRight="@dimen/dimen_5"
            android:layout_toLeftOf="@+id/tv_partial_flag"
            android:layout_alignParentLeft="true"
            android:text="Order13993321"
            android:ellipsize="end"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_partial_flag"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_alignTop="@+id/tv_order_no"
            android:layout_marginTop="@dimen/dimen_3"
            android:drawableLeft="@drawable/small_tick_layer"
            android:drawablePadding="@dimen/dimen_5"
            android:gravity="center_vertical"
            android:paddingTop="@dimen/dimen_10"
            android:text="Partial Pickup Not Allowed"
            android:textColor="@color/colorAccent"
            android:textSize="@dimen/text_12"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_client_label"
            style="@style/textLabel"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/tv_order_no"
            android:layout_marginTop="@dimen/dimen_30"
            android:paddingLeft="@dimen/dimen_10"
            android:text="Pickup from"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_client_value"
            style="@style/textValue"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/tv_client_label"
            android:layout_marginTop="@dimen/dimen_5"
            android:drawableLeft="@drawable/small_phone_layer"
            android:drawablePadding="@dimen/dimen_5"
            android:layout_toLeftOf="@+id/map"
            android:layout_alignParentLeft="true"
            android:paddingLeft="@dimen/dimen_10"
            android:ellipsize="end"
            android:maxLines="1"
            android:text="Fun Foods"
            tools:ignore="MissingPrefix" />

        <com.google.android.gms.maps.MapView
            android:id="@+id/map"
            android:layout_width="120dp"
            android:layout_height="120dp"
            android:clickable="true"
            android:layout_alignTop="@+id/tv_client_label"
            android:layout_alignParentRight="true"
            android:layout_alignParentEnd="true" />

        <TextView
            android:id="@+id/tv_address"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/tv_client_value"
            android:layout_marginLeft="@dimen/dimen_10"
            android:layout_marginRight="@dimen/dimen_5"
            android:layout_marginTop="@dimen/dimen_10"
            android:layout_toLeftOf="@+id/map"
            android:maxLines="3"
            android:text="PO Box 4668, New York, NY 10163-4668, US"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_notes_label"
            style="@style/textLabel"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/map"
            android:layout_marginTop="@dimen/dimen_15"
            android:padding="@dimen/dimen_10"
            android:text="Special Instructions"
            tools:ignore="MissingPrefix" />

        <TextView
            android:id="@+id/tv_notes_value"
            fontPath="fonts/SFNSText-Regular.ttf"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/tv_notes_label"
            android:layout_marginLeft="@dimen/dimen_10"
            android:background="@color/offWhite"
            android:drawableLeft="@drawable/ic_notes"
            android:drawablePadding="@dimen/dimen_10"
            android:gravity="center_vertical"
            android:padding="@dimen/dimen_10"
            android:text="Pickup from Doorstep"
            tools:ignore="MissingPrefix" />

        <LinearLayout
            android:id="@+id/ll_dynamic"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/tv_notes_value"
            android:layout_marginLeft="@dimen/dimen_10"
            android:layout_marginTop="@dimen/dimen_10"
            android:orientation="vertical">

        </LinearLayout>

    </RelativeLayout>
</ScrollView>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/rl_btn"
    android:layout_alignParentBottom="true"
    android:layout_marginBottom="@dimen/dimen_10">

    <Button
        android:id="@+id/btn_checkin"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/dimen_20"
        android:layout_marginRight="@dimen/dimen_20"
        android:background="@drawable/inactive_button_bg"
        android:textAllCaps="false"
        android:textColor="@color/white"
        android:visibility="gone" />
</RelativeLayout>

Its getting crashed in android 4.4.4 else working fine in 6.0

shadowTech1627 commented 6 years ago

You can close this issue as it was crashing due Vector drawable in my case

azri92 commented 6 years ago

@shadowTech1627 I believe you can also close issues that you created.