# RadialGauge Quick Start

## Content



This section describes how to add a [C1RadialGauge](/componentone/docs/xamarin/online-android/) control to android application and set some of its properties.

This topic comprises of two steps:

*   [Step 1: Add a C1RadialGauge control](/componentone/docs/xamarin/online-android/controls/gaugeOverview/quick-start-add-and-configure/gaugeQuickStartRadialGauge#step1)
*   [Step 2: Run the Project](/componentone/docs/xamarin/online-android/controls/gaugeOverview/quick-start-add-and-configure/gaugeQuickStartRadialGauge#step2)

The following image shows how the C1RadialGauge appears, after completing the steps above:

![](https://cdn.mescius.io/document-site-files/images/b011ec9b-8b9c-49b7-96b6-ebd2d5673a5e/images/radialgauge_quickstart.png)

### Step 1: Add a C1RadialGauge control

Complete the following steps to initialize a C1RadialGauge control.

#### In Code

1.  Add the following reference in the MainActivity class file. **csharp**
    
    ```csharp
    using C1.Android.Gauge;
    ```
    
2.  Instantiate the C1LinearGauge control in the MainActivity class file and set some of its properties as follows. **csharp**
    
    ```csharp
    using Android.App;
    using Android.Widget;
    using Android.OS;
    using C1.Android.Gauge;
    namespace AndroidGauge
    {
        [Activity(Label = "AndroidGauge", MainLauncher = true)]
        public class MainActivity : Activity
        { 
        private C1RadialGauge mRadialGauge;
        private int mValue = 25;
        private int mMin = 0;
        private int mMax = 100;
            protected override void OnCreate(Bundle bundle)
            {
                base.OnCreate(bundle);
                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.Main);
                mRadialGauge = (C1RadialGauge)FindViewById(Resource.Id.c1RadialGauge1);
                mRadialGauge.Enabled = true;
                mRadialGauge.Value = mValue;
                mRadialGauge.Min = mMin;
                mRadialGauge.Max = mMax;
                mRadialGauge.Step = 1;
                mRadialGauge.ShowText = GaugeShowText.All;
                mRadialGauge.IsReadOnly = false;
                mRadialGauge.IsAnimated = true;
            }
        }
    }
    ```
    
3.  Add the following XML code in the Main.axml in case of C#, to render the control onto the device. **csharp**
    
    ```csharp
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:minWidth="25px"
        android:minHeight="25px">
      <C1.Android.Gauge.C1RadialGauge
          android:minWidth="25px"
          android:minHeight="25px"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:id="@+id/c1RadialGauge1" />
    </LinearLayout>
    ```
    

### Step 2: Run the Project

In the **ToolBar** section, select the Android device and then press **F5** to view the output.

## See Also

[Gauge Types](/componentone/docs/xamarin/online-android/controls/gaugeOverview/gaugeTypes)