Solution 1 :
android
namespace is used in order to access and use the attributes which are provided by the Android platform.
app
namespace is used to access the custom attributes which are defined in the application scope.
The app namespace is not specific to a library, but it is used for all attributes defined in your app, whether by your code or by libraries you import, effectively making a single global namespace for custom attributes – i.e., attributes not defined by the android system.
Based on this
Problem :
I have this TextView
<androidx.appcompat.widget.AppCompatTextView
android_id="@+id/tv"
android_layout_width="0dp"
android_layout_height="wrap_content"
android_layout_marginTop="12dp"
android_contentDescription="...."
android_text="text"
android_textAllCaps="true"
android_textColor="@color/black4"
android_textSize="16sp"
app_fontFamily="@font/lato_regular"/>
If I use android:fontFamily
it doesn’t set the right font. What is the difference between the android:
and app:
version. Also what happens when I set app:font="@font/lato_regular"
?
Comments
Comment posted by LoukasPap
Do you have your font in the folder ‘preloaded_fonts.xml’?