-
Notifications
You must be signed in to change notification settings - Fork 564
Description
Android application type
Classic Xamarin.Android (MonoAndroid12.0, etc.)
Affected platform version
VS2022
Description
I was trying to Bind Android Library (kotlin) in Xamarin but every time when I Build solution or restart, need to do changes in these files
Com.Sdk.Utils.Validationutils.FixedLengthValidator.cs
Com.Sdk.Utils.Validationutils.MaxLengthValidator.cs
Com.Sdk.Utils.Validationutils.MinLengthValidator.cs
Com.Sdk.Utils.Validationutils.NonEmptyValidator.cs
Com.Sdk.Utils.Validationutils.NullValidator.cs
Com.Sdk.Utils.Validationutils.RangeLengthValidator.cs
path is:- AppName\obj\Debug\generated\src
and these files
AppName\obj\Debug\120\lp\113\jl\res\values.xml
AppName\obj\Debug\120\lp\113\jl\res\values-fr.xml
and this 113 value change every time mostly it is 3.
Kotlin code for NonEmptyValidator is:-
open class NonEmptyValidator : Validator {
private var value: String? = null
override fun afterTextChanged(s: Editable) {
value = s.toString().trim { it <= ' ' }
}
@Suppress("EmptyFunctionBlock")
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
@Suppress("EmptyFunctionBlock")
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {}
override fun getValue(): String? {
return value
}
override fun hasFullLength(): Boolean {
return this.isValid
}
override fun isValid(): Boolean {
return value != null && value!!.isNotEmpty()
}
override fun filter(source: CharSequence?, start: Int, end: Int, dest: Spanned?, dstart: Int,
dend: Int): CharSequence? {
return null
}
}
Steps to Reproduce
1.Create new project in Android Binding Library.
2. Add library in jars folder.
3. Change file property to LibraryProjectZip.
4. Build project.
5. Add new project with this project.
6. Add new build .dll file in side new project references folder.
7. Add required dependency.
8. Build solution.
Did you find any workaround?
No response
Relevant log output
No response