i installed "Xamarin.Android.Support.Design" in my xamarin android project and trying to assign the style
@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
to "TextInputLayout" control but the style is not available, any idea on this???
This latest changes are not included in Xamarin.Android.Support.Design
27.0.2 version, if you need use this style, update Xamarin.Android.Support.Design
nuget package version to 28.0.0.1.
eg:
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> <android.support.design.widget.TextInputLayout android:id="@+id/textInputLayout2" android:layout_width="match_parent" android:layout_height="0dp" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" app:counterEnabled="true" app:counterMaxLength="300"> <android.support.design.widget.TextInputEditText android:id="@+id/cheese_description" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="start" android:hint="cheese_description" /> </android.support.design.widget.TextInputLayout> </android.support.constraint.ConstraintLayout>
Effect:
@hanumas1361 , change your project Target Framework
and Target Android Version
to Android 9.0(API level 28):
Then, clean the solution, delete bin and obj folder, restart VS and rebuild your project.
Answers
This latest changes are not included in
Xamarin.Android.Support.Design
27.0.2 version, if you need use this style, updateXamarin.Android.Support.Design
nuget package version to 28.0.0.1.eg:
Effect:
hi @YorkGo already i had "Xamarin.Android.Support.Design" nuget package with version 28.0.0.1in my project but the style is not coming
Could you please share your layout file?
Hi @YorkGo i tried with the code u have shared , with that also same result
@hanumas1361, That's wierd. Can you reproduce this issue in a blank project?
Hi @YorkGo with fresh project also same thing happening, i set minimum and target android versions to -APi level-27
@hanumas1361 , change your project
Target Framework
andTarget Android Version
to Android 9.0(API level 28):Then, clean the solution, delete bin and obj folder, restart VS and rebuild your project.
Hi @YorkGo tried the same but no use, im having latest VS version and APK's but no luck
@hanumas1361, would you mind sharing a basic demo that can reproduce this issue?
Hi @YorkGo , thanks for the support, i have attached some sample project, please have a look.
@hanumas1361 , the App10.zip you provided, still using version 27.0.2.1 of "Xamarin.Android.Support.Design" nuget package.
When I update it to 28.0.0.1, the issue resolved.
Hi @YorkGo
thanks for the help, now im able to get the OutlinedBox style in my project