Hello, I'm new here, don't be so hard, I'm creating a project in Xamarin.Andriod using c #.
I am trying to do a validation of an EditText in Xamarin.Android (C # / MonoDroid).
The condition that I must fulfill is as follows: 'It allows entering 6 integers and 3 decimal places, in a range from 0 to 999999.999'
I have found some possible solutions in java (I don't know much and I have not been able to implement them in C #) and they are the following:
I don't know how to apply it in C #, if someone could explain or give me a simple example but in C #.
this is my EditText:
```<EditText
android:id="@+id/etVolume"
android:layout_width="@dimen/value_zero"
android:hint="Volumen"
android:textColor="@color/grisPrimario"
android:layout_height="fill_parent"
android:layout_weight="5"
android:textSize="@dimen/fluidListItem_text_size"
android:inputType="numberDecimal"
android:maxLength ="9"
android:textColorHint="@android:color/darker_gray"
android:backgroundTint="@color/grisPrimario"
android:gravity="bottom"
android:layout_marginBottom="-3dp"
android:layout_marginRight="@dimen/fluidListItemMarginRight"/>```
and my fragment is defined this EditText like this:
Volume = itemAdministeredFluid.FindViewById<EditText>(Resource.Id.etVolume);
etVolume.setFilters(new Android.Text.IInputFilter[] {new DecimalDigitsInputFilter(6,3)});
but i don't understand how to implement the method.
I saw that with java they use "TextWatcher" and "InputFilter" but I don't understand how to change it to C#
I appreciate any help I've spent days on this.
Thank you very much for the help.
I create IInputFilter that you can take a look: