A CustomTextView class which removes the need for applying the custom fonts for each TextView
==============
Implementation:
Under /res/values/
folder create attrs.xml
file with the following cotents:
<?xml version="1.0" encoding="utf-8"?>
<declare-styleable name="CustomTextView">
<attr name="fontAssetName" format="string"/>
</declare-styleable>
Add your desired fonts in /assets
folder like "Politica XT.otf" font
==============
Usage:
Simply set the fontAssetName
attribute to an EXISITING font file name in your assets
folder
<?xml version="1.0" encoding="utf-8"?>
<com.my.app.CustomTextView
xmlns:custom="http://schemas.android.com/apk/res/com.my.app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test text"
android:id="@+id/testcustomview"
custom:fontAssetName="Politica XT.otf"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Back"
android:id="@+id/button"/>
A demo .NET Core API and Client with support for both REST and gRPC
A library for converting numbers to equivalent Farsi text and vice versa
Android MediaCodec API Demo with Seek and MediaController