Calligraphy icon indicating copy to clipboard operation
Calligraphy copied to clipboard

fontPath attribute not found in xml

Open vinod1988 opened this issue 9 years ago • 5 comments

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" />

vinod1988 avatar Jun 23 '16 10:06 vinod1988

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

chrisjenx avatar Jun 23 '16 14:06 chrisjenx

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

vinod1988 avatar Jun 23 '16 20:06 vinod1988

Do you get an error from logcat

On Thu, 23 Jun 2016, 21:00 Vinod Vishwakarma, [email protected] 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 .

chrisjenx avatar Jun 23 '16 20:06 chrisjenx

@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>

dleonett avatar Jul 01 '16 14:07 dleonett

tools:ignore="MissingPrefix" not working anymore.

image

I am using Android Studio 4.0 Beta 5

theapache64 avatar May 02 '20 07:05 theapache64