chrisjenx / Calligraphy

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

fontPath attribute not found in xml #299

Open vinod1988 opened 8 years ago

vinod1988 commented 8 years ago

I have added the gradle file and then add in application create fro configuration the same way sample code given but in my project is not showing. Please help me. Below is my code that i am using

<EditText fontPath="fonts/Roboto-Medium_2.ttf" android:id="@+id/NewPasswordEditText" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:background="@drawable/edit_bg_bottomline_blue" android:hint="@string/change_new_password" android:inputType="textPassword" android:padding="5dp" android:textSize="@dimen/heading_font_size_14" />

chrisjenx commented 8 years ago

Do you get an error in the console? Have you attached the base context?

vinod1988 commented 8 years ago

I have attached the base context. And the error message is saying that is missing attribute name

chrisjenx commented 8 years ago

Do you get an error from logcat

On Thu, 23 Jun 2016, 21:00 Vinod Vishwakarma, notifications@github.com wrote:

I have attached the base context. And the error message is saying that is missing attribute name

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chrisjenx/Calligraphy/issues/299#issuecomment-228166314, or mute the thread https://github.com/notifications/unsubscribe/ABHRsRXV7qxA_VfZ_fmRJNy3RZIn5zjcks5qOuX5gaJpZM4I8rh5 .

dleonett commented 8 years ago

@vinod1988 just add xmlns:tools="http://schemas.android.com/tools" and tools:ignore="MissingPrefix" in your layout root tag

Example:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:ignore="MissingPrefix">

</LinearLayout>
theapache64 commented 4 years ago

tools:ignore="MissingPrefix" not working anymore.

image

I am using Android Studio 4.0 Beta 5