Shinobichart lifecycle


#1

Can someone plz explain how to manage Shinobichart with Activity life cycle onpause, onresume and ondestroy particularly with sample code.


#2

Hi.

If you are using our ChartFragment or SupportChartFragment classes, you do not need to concern yourself with lifecycle events, as these classes handle lifecycle events themselves.

If you are using our ChartView class, you will need to handle these lifecycle events yourself. In this case, please see the following how to guide which explains how to do it:

https://www.shinobicontrols.com/docs/ShinobiControls/ShinobiChartsAndroid/1.7.2/Premium/Normal/user-guide/how-to-manage-chart-lifecycles.html

Also please refer to the provided code sample (you can find this in the download bundle) which is:

CustomDataAdapterChartView , in the samples/CustomDataAdapterChartView.

Thanks,

Kai.


#3

Hi,

I am extremely sorry for the late reply. As mentioned by you I am using ChartFragment but still I am facing issue like ShinobiChart becomes invisibe when the Activity go to onPause and becomes visible once the Activity go to onResume.

Have you used ChartFragment and it interacts perfectly with Activity/Fragment they are hosted in.

Below is the description of the issue which I am facing:

In the landing screen of my app I have four charts created using Shinobichart library inside four gridview. On click of an icon in the topmost right hand side of the action bar a dialog pops up with “yes ”and ”no” option. On click of “yes” option Annotator screen displays on top of the landing screen which obscures the landing screen but the Shinobi chart becomes invisible and once the Annotator screen goes off then again Shinobichart becomes visible.

Thanks,

Rashmi


#4

This is duplicated in https://www.shinobicontrols.com/forum/shinobicontrols/2016/2/chartviews-interact-with-the-life-cycle-of-the-activityfragment-they-are-hosted-in