Hello, I made an App for Xamarin.Android using RadRadialGauge. I have a Thread that updates the indicator every 500ms based on a received value. The problem is that the longer the App runs the slower it becomes. I checked the RAM usage and it increases really fast, it reaches 200MB in a matter of a few minutes and as result the App becomes very laggy and it doesn't show a good performance. When I try to comment the indicator it works fine. I would like to ask if there is a way to reduce the RAM usage. Here is my Code:
MainPage.xaml
<telerikGauges:RadRadialGauge StartAngle="180" SweepAngle="360">
<telerikGauges:RadRadialGauge.Axis>
<telerikGauges:GaugeLinearAxis Maximum="100"
Minimum="0"
ShowLabels="False"
StrokeThickness="0" />
</telerikGauges:RadRadialGauge.Axis>
<telerikGauges:RadRadialGauge.Ranges>
<telerikGauges:GaugeRangesDefinition Offset="0">
<telerikGauges:GaugeRange Color="#DDDDDD"
From="0"
To="100" />
</telerikGauges:GaugeRangesDefinition>
</telerikGauges:RadRadialGauge.Ranges>
<telerikGauges:RadRadialGauge.Indicators>
<telerikGauges:GaugeBarIndicator x:Name="Needle1" EndCap="Oval"
Fill="#a13127"
StartCap="Oval"
Offset="0"
Value="0.45" />
</telerikGauges:RadRadialGauge.Indicators>
</telerikGauges:RadRadialGauge>
<Label x:Name="GaugeLabel" FontSize="44"
HorizontalTextAlignment="Center"
Text="120"
TextColor="#a13127"
VerticalTextAlignment="Center" />
MainPage.xaml.cs
Thread t = new Thread(new ThreadStart(() =>
{
while (true)
{
Device.BeginInvokeOnMainThread(() =>
{
Needle1.Value = Val; // if I comment this line here RAM usage is normal
GaugeLabel.Text = Val.ToString("0.00");
});
Thread.Sleep(500);
}
}));
t.Start();
Is it possible to embed the TKRadialGauge into Xamarin forms? I see several examples on getting native controls into Xamarin forms, I just can't seem to figure out the namespace and other details for XAML and Binding.
Any help is appreciated.
The full path of the file it points to is Topspin.Android C:\TS\TS\TS.Android\obj\Debug\__library_projects__\Telerik.Xamarin.Android.Input\library_project_imports\res\values\attrs.xml 2`
I cannot build my project while this is happening.
Hello,
I'm trying to implement the example custom gauge in my iOS app and everything looks great except that the animation is not working. When I run the example code supplied with the trial package in Xamarin Studio the animation works, however if I put the same code into my app the animation no longer works. Is there a way to troubleshoot this issue? Is there a way to generate an exception that will give me some clue to the cause of the problem?
Thanks.