diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-04-21 13:48:53 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-04-21 20:57:21 +0200 |
commit | 730add0ca619985b99e133dd586e063f0f12538b (patch) | |
tree | 9c8a340b00bad6af335247a914cb874bfebe8281 /include/svx/anchorid.hxx | |
parent | 427188600ffe31d142ca6d0e1d549e3c1c4246b8 (diff) |
android: Use drawable tag already supported with API level 16
Use the `app:drawableLeftCompat` tag instead of
`android:drawableLeft` to set the icon to show
in the TextView.
With the latter, trying to start Android Viewer
in an x86 AVD with API level 16 resulted in this
crash:
> E/AndroidRuntime( 2510): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.libreoffice/org.libreoffice.ui.LibreOfficeUIActivity}: android.view.InflateException: Binary XML file line #80: Error inflating class TextView
> E/AndroidRuntime( 2510): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
> E/AndroidRuntime( 2510): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
> E/AndroidRuntime( 2510): at android.app.ActivityThread.access$600(ActivityThread.java:130)
> E/AndroidRuntime( 2510): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
> E/AndroidRuntime( 2510): at android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime( 2510): at android.os.Looper.loop(Looper.java:137)
> E/AndroidRuntime( 2510): at android.app.ActivityThread.main(ActivityThread.java:4745)
> E/AndroidRuntime( 2510): at java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime( 2510): at java.lang.reflect.Method.invoke(Method.java:511)
> E/AndroidRuntime( 2510): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
> E/AndroidRuntime( 2510): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
> E/AndroidRuntime( 2510): at dalvik.system.NativeStart.main(Native Method)
> E/AndroidRuntime( 2510): Caused by: android.view.InflateException: Binary XML file line #80: Error inflating class TextView
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
> E/AndroidRuntime( 2510): at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:696)
> E/AndroidRuntime( 2510): at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
> E/AndroidRuntime( 2510): at org.libreoffice.ui.LibreOfficeUIActivity.createUI(LibreOfficeUIActivity.java:169)
> E/AndroidRuntime( 2510): at org.libreoffice.ui.LibreOfficeUIActivity.onCreate(LibreOfficeUIActivity.java:147)
> E/AndroidRuntime( 2510): at android.app.Activity.performCreate(Activity.java:5008)
> E/AndroidRuntime( 2510): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
> E/AndroidRuntime( 2510): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
> E/AndroidRuntime( 2510): ... 11 more
> E/AndroidRuntime( 2510): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi-v4/ic_folder_grey_48dp.xml from drawable resource ID #0x7f080083
> E/AndroidRuntime( 2510): at android.content.res.Resources.loadDrawable(Resources.java:1923)
> E/AndroidRuntime( 2510): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
> E/AndroidRuntime( 2510): at android.widget.TextView.<init>(TextView.java:614)
> E/AndroidRuntime( 2510): at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:100)
> E/AndroidRuntime( 2510): at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:95)
> E/AndroidRuntime( 2510): at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:194)
> E/AndroidRuntime( 2510): at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:115)
> E/AndroidRuntime( 2510): at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1551)
> E/AndroidRuntime( 2510): at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1602)
> E/AndroidRuntime( 2510): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
> E/AndroidRuntime( 2510): ... 26 more
> E/AndroidRuntime( 2510): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #1: invalid drawable tag vector
> E/AndroidRuntime( 2510): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:877)
> E/AndroidRuntime( 2510): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
> E/AndroidRuntime( 2510): at android.content.res.Resources.loadDrawable(Resources.java:1920)
> E/AndroidRuntime( 2510): ... 35 more
> W/ActivityManager( 1421): Force finishing activity org.libreoffice/.ui.LibreOfficeUIActivity
Change-Id: I4253a68f90d6c507805c7bf72aaf81011fb19339
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133256
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include/svx/anchorid.hxx')
0 files changed, 0 insertions, 0 deletions