I'm using android plot in my app. I have different "widgets" composed into a listview. Some of them use a pie chart. For some reason those are not visible for Android < 5.0. For Android 5.0, 6.0 and 7.0 it seems ok though. Any ideas?
P.S
Already tried to play around with chart.invalidate() or chart.redraw().
Related
I have an issue that is making me crazy.
I created an Android library for a Custom gauge view of a car applicaction.
On this gauge view there's a scale with values drawn with function Canvas.drawText().
Everything was working fine when running whis view on devices with API 19 and 22, up to when last week I updated Android Studio 2.2.
Since that time the values on the scale are not properly written if I run it on a device with API >19. If I run it on device with API =< 19 everything is fine.
This is the test project that can be cloned from Github:
https://github.com/dequadelisonz/CarDashDemo.git
This is what I should correctly see (on device with API <=19):
And this is what I see on device with API >19:
As you can see in the 2 gauges there are only few digits in one of the two. All the other texts seems to be disappeared.
Hope someone can do the trick to fix this thing....
Thanks!
Fixed thanks to this post
https://stackoverflow.com/a/14989037/746068
It seems there is a bug on Android APIs > 15 so that text is not properly drawn on canvas.
Is it possible to create an app for Android 6 using Delphi XE8 instead of Delphi 10?
Now apps seem to crash on Android 6, but Delphi 10 apps seem to crash on older android versions.
I have multiple Android SDK installed from 19(Android 4.4) till 23(6.0)
I also have the newest android NDK(r10e) and the newest Java JDK.
The crashes seem to be very random. Can't yet say why it crashes exactly. I'll try to find out more!
Update:
It seems to be a device specific problem. If I run Delphi 10 app on emulators with android 4.2/6.0 the app doesn't crash. Also on my samsung galaxy tab with android 4.2 it doesn't crash. Only my sony xperia with android 5.1 crashes.
Update:
My app seems to crash becore I call TCloseAction.caFree in the FormClose event of my 2th form
I found out what the problem was for older android versions with my Delphi 10 version of the project.
Through commenting out code I found out that the TCloseAction.caFree crashes the app in the formclose event. I can't remove this otherwise the form memory doesn't get freed. I tried multiple methods but only this totaly frees all the memory of a form in a Firemonkey multi device project.
After finding this out I found that it crashes when I add a TVertScrollBox to a TTabItem. On my Form I have multiple tabs. And on one of them I have a Listbox that I fill runtime with items and below that a memo. In order to use this memo correctly I added a TVertScrollBox so when the keyboard is shown the keyboard doesn't hide the memo. When I added the VertScrollBox in the designer my listbox doesn't draw the items correctly, so that's why I add it runtime. But this causes the crash on older android versions. Apparently it doesn't like to get freed in the onClose event for some reason.
So for the final solution i'm left with putting the memo in the top of the TTabItem so it never gets hidden behind the keyboard and removing the TVertscrollbox from designer/runtime. Now my ListBoxItems get drawn correctly and my app doesn't crash on older android versions anymore.
I have a problem with overlay of x labels in achartengine TimeChart with time format => chart.setDateFormat("kk:mm:ss").
If I test in in Android 4.0.4 (Samsung galaxy tab) the x labels are visible in a way that they don't overlay each other.
But the problem is in Android 4.3 (HTC One - Full HD), where it seems that this filtering is not working, so there are too much of labels and they overlay each other and user can not read anything. It seems that it happens also in Y axis where the values are doubles.
OK.
So I found the solution. The problem was, that I'm using achartengine as an library project and I was building achartengine project in API 10, and my app was in API 14.
Because of that I had some strange behavior. When I changed achartengine project library to be build in API 14, the problem disappeared.
:)
I'm developing a phonegap application for both iOs and Android platform.
I'm using AppFramework by Intel (ex. jqMobi) and it works like a charm in iOs, it works good also on android, the only thing is that the scrolling is not working in Android 2.3.6 and I can't figure out why. I don't know if it works in most recent version of Android on real device, it's not working there too in the emulator.
Thanks in advance for any suggestion...
On Android 2.3.5 & 2.3.6, JQM's header and footer scroll with document and then reposition (back to top and bottom) after scrolling has stopped. This happens when header and footer are set to data-position="fixed".
It appears that these versions of android have buggy CSS implementations of {position:fixed;} and therefore JQM's behavior appears erratic when compared to other adjacent Android versions.
I am using Afreechart to create charts for my android app. In emulator legend is visible but in android tablet legend is not showing up. Previously it was working properly but when i add some other activities to my app,its not working. am using afreechart-0.0.4.jar.my minSdkversion 3 and target is 15.
I found the solution for my question..
The thing that pointed me in the right direction was the fact that the graphs would behave perfectly on the emulator, independently from what version of Android the emulator was running. That made me think that maybe the hardware acceleration (which if I am not mistaken was introduced with HoneyComb) had something to do with this. A little more googling showed me that other graphics libraries had similar issues on ICS and JellyBean, so I tried switching off the hardware acceleration for the chart view:
chartView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Now the graphs and the legends show up just as expected on any device. Hope it helps someone....