Telerik Forums
UI for Xamarin Forum
1 answer
132 views

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();

Didi
Telerik team
 answered on 06 Dec 2018
1 answer
52 views

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. 

 

Lance | Manager Technical Support
Telerik team
 answered on 08 Oct 2018
1 answer
60 views

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.

Paul
Top achievements
Rank 1
 answered on 16 May 2017
2 answers
64 views

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.

Clay
Top achievements
Rank 1
 answered on 14 Mar 2017
1 answer
84 views
Hi,

I found this blog that describes how to add needle animation to a Radial Gauge (iOS):

http://www.telerik.com/blogs/enliven-your-app-with-gauges-for-ios

However, I don't seem to be able to find the same methods in Xamarin.

I just need to animate the needle (to go from zero to value).

How can this be achieved in Xamarin?

Adrian
Telerik team
 answered on 25 Apr 2016
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?