Hi,
I'm trying to add items to ACSpinner from Appcompat v4. But the Add method of the ACSpinner crashing the app. Here is the log,
And here is the ac_spinner_row_layout content
I'm trying to add items to ACSpinner from Appcompat v4. But the Add method of the ACSpinner crashing the app. Here is the log,
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (firebasemessaging) Create ***
** Service (firebasemessaging) Start **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
android.view.InflateException: Binary XML file line #17 in com.forum.mall:layout/ac_spinner_row_layout: Binary XML file line #17 in com.forum.mall:layout/ac_spinner_row_layout: Error inflating class TextView
Caused by: android.view.InflateException: Binary XML file line #17 in com.forum.mall:layout/ac_spinner_row_layout: Error inflating class TextView
Caused by: java.lang.IllegalArgumentException: Font {path=null, style=FontStyle { weight=300, slant=0}, ttcIndex=0, axes=, localeList=, buffer=java.nio.DirectByteBuffer[pos=0 lim=242068 cap=242068]} has already been added
at android.graphics.fonts.FontFamily$Builder.addFont(FontFamily.java:100)
at androidx.core.graphics.TypefaceCompatApi29Impl.createFromFontFamilyFilesResourceEntry(TypefaceCompatApi29Impl.java:117)
at androidx.core.graphics.TypefaceCompat.createFromResourcesFamilyXml(TypefaceCompat.java:120)
at androidx.core.content.res.ResourcesCompat.loadFont(ResourcesCompat.java:426)
at androidx.core.content.res.ResourcesCompat.loadFont(ResourcesCompat.java:372)
at androidx.core.content.res.ResourcesCompat.getFont(ResourcesCompat.java:350)
at androidx.appcompat.widget.TintTypedArray.getFont(TintTypedArray.java:119)
at androidx.appcompat.widget.AppCompatTextHelper.updateTypefaceAndStyle(AppCompatTextHelper.java:430)
at androidx.appcompat.widget.AppCompatTextHelper.loadFromAttributes(AppCompatTextHelper.java:140)
at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:105)
at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:95)
at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:182)
at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)
at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1407)
at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1457)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1061)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:997)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
And here is the ac_spinner_row_layout content
XML:
<?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:aapt="http://schemas.android.com/aapt"
android:orientation="horizontal"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView android:gravity="center"
android:layout_gravity="center_vertical"
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="16dp"/>
<TextView android:textSize="16sp"
android:gravity="center"
android:id="@+id/text"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="16dp" android:minHeight="48dp"/>
</LinearLayout>
Last edited: