Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Unable to open file on device with Android 5.1.1+

More
10 years 9 months ago #9918 by petr.sklenicka
Hello,
I am using your library and I found some strange exception.
Code:
Caused by: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class com.radaee.reader.PDFReader Caused by: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class EditText

In case that I run my application on device with Android 5.0.1 and lower, it works great and no exception is thrown. When I try to run application on device with Android 5.1.1 and higher, above exception is thrown. I also tried this on emulator and exactly the same behavior.

In my application, I am targeting SDK version 22. Previously I was targeting SDK version 18 and it worked fine on all devices. Can you please check it and write me where the problem is?

Thank you in advance for your help.

Best regards,
Petr.
More
10 years 9 months ago #9919 by support
Are you experiencing the issue within your application or using our demo?
Which device and conditions are you testing?
More
10 years 9 months ago #9920 by petr.sklenicka
This issue is in my application.
I tested it on device Nexus 5 with Android 6 and exception has been thrown during opening the PDF file. Also I have tested it on emulator with Android 5.1.1 and Android 6. Exactly the same exception.
When I tested it on my Galaxy S4 with Android 5.0.1, it works fine as well as on emulator with KitKat (API 19). I also tested it on Motorola Xoom with Android 4.0.4 and on this device it worked without problems.
More
10 years 9 months ago #9927 by Davide
Hi,
can you reproduce it even with the demo library?

Can you please give us the complete log?
More
10 years 9 months ago #9935 by petr.sklenicka
No, I am not able to reproduce it in your demo app.
See the attached log, please.
More
10 years 9 months ago #9944 by petr.sklenicka
I finally found the problem.
Previously, I was targeting SDK version 18 and everything worked fine. When I started with targeting SDK version 22, this problem occurred.

I made some research and finally I found that problem is with EditText class, where is missing some 9pach drawable. So everything what I had to do is set style to EditText in my styles. It is important to set "android:background" attribute to EditText.
Time to create page: 0.429 seconds
Powered by Kunena Forum