calligraphy

Xamarin.Android crash only on Android 10

南笙酒味 提交于 2021-01-28 09:11:36
问题 I have a project that is working perfectly in any version below api 29. When i try to run in a Android 10 device the app crashes after show the splash screen, debugger show this error: Java.Lang.RuntimeException: Binary XML file line #17 in com.panterafood.garcom:layout/abc_screen_simple: Binary XML file line #17 in com.panterafood.garcom:layout/abc_screen_simple: Error inflating class android.support.v7.widget.FitWindowsLinearLayout at Java.Interop.JniEnvironment+InstanceMethods

android app 修改字体

陌路散爱 提交于 2021-01-20 07:05:19
android中可能会遇到修改字体的情况,虽然说需求比较少,但是偶尔还会遇到 可以使用三方框架来帮助我们简单做到 api "uk.co.chrisjenx:calligraphy:2.2.0 " 在style文件中添加一个字体的style < style name= "core_TextAppearance.RobotoThinPath" parent= "android:TextAppearance"> < item name= "fontPath">fonts/Roboto-Thin.ttf</ item> </ style> 我app中的main/assert/fonts/Roboto-hin.ttf 放置字体文件 AS集成这个框架,在activity的 attachBaseContext(Context newBase)方法中添加我们修改后的字体的context protected void attachBaseContext(Context newBase) { super.attachBaseContext(CalligraphyContextWrapper. wrap(newBase)); } 为什么要在attachBaseContext中添加呢? 我们都知道activity中是有context的,但是context是怎么来的呢? activity的构造方法是无参构造

InflateException when using chrisjenx CalligraphyLayoutInflater , android.view.InflateException

醉酒当歌 提交于 2020-02-23 10:15:56
问题 Hi So in our project we are using calligraphy library , it works with no issues but now in one of the activity i added it keeps crashing with the following stacktrace: 01-23 02:25:32.178 3654-3654/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example, PID: 3654 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.activities.MultipleActivity}: android.view.InflateException: Binary XML file line #98: Error inflating class com.example.components

Crash on Android 10 (InflateException in layout/abc_screen_simple line #17)

我怕爱的太早我们不能终老 提交于 2019-12-18 14:19:26
问题 My application works fine from Android 4.3 until Android 9 Pie, but my application doesn't work on Android 10 (Q API 29) and crashes. This is my logcat - why this is happening? java.lang.RuntimeException: Unable to start activity ComponentInfo{ir.mahdi.circulars/ir.mahdi.circulars.MainActivity}: android.view.InflateException: Binary XML file line #17 in ir.mahdi.circulars:layout/abc_screen_simple: Binary XML file line #17 in ir.mahdi.circulars:layout/abc_screen_simple: Error inflating class

How to enable antialiasing when using Android Custom fonts on my App?

痴心易碎 提交于 2019-12-11 14:05:52
问题 I removed chrisjenx/Calligraphy library to use a native Font XML on Android app android official documentation. The replace activity was simple but now te font is rendered without antialiasing, in the light fonts the difference is evident. I have used the same ttf font (lato-light.ttf). Any help or ideas? the top is rendered natively, the bottom is rendered with calligraphy. the font is Lato - Light 回答1: The only solution I have found is return back on chrisjenx/Calligraphy library. 来源: https

Crash on Android 10 (InflateException in layout/abc_screen_simple line #17)

╄→гoц情女王★ 提交于 2019-12-03 23:36:08
My application works fine from Android 4.3 until Android 9 Pie, but my application doesn't work on Android 10 (Q API 29) and crashes. This is my logcat - why this is happening? java.lang.RuntimeException: Unable to start activity ComponentInfo{ir.mahdi.circulars/ir.mahdi.circulars.MainActivity}: android.view.InflateException: Binary XML file line #17 in ir.mahdi.circulars:layout/abc_screen_simple: Binary XML file line #17 in ir.mahdi.circulars:layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout and this is my mainActivity.xml <?xml version="1.0"