Xamarin Android - TextInputLayout endIconMode attribute not found

logeshpalani98logeshpalani98 USMember ✭✭✭

In the Material Design TextLayoutinput endIconMode attribute not found how to archive below design

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    Set the style of EditText to Spinner and there'll be a drap down men at right side.

    <android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dp">
    
        <android.support.design.widget.TextInputEditText 
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/Widget.AppCompat.Spinner"/>
    
    </android.support.design.widget.TextInputLayout>
    
  • logeshpalani98logeshpalani98 USMember ✭✭✭

    Jarvan it not working already tried

  • JarvanJarvan Member, Xamarin Team Xamurai

    In android.support.design.widget.TextInputLayout class, there is no 'endIconMode' property. You may need to do this in other ways.

  • logeshpalani98logeshpalani98 USMember ✭✭✭

    If am using Style, the spinner icon will be white, then am changing tint color color never works

  • ElvisXiaElvisXia Member, Forum Administrator, Xamarin Team Xamurai

    @logeshpalani98 Xamarin.Android.Support.Desgin is a binding library for android.support.design Component, which doesn't include endIconMode attribute. What you need is the new AndroidX library. Currently there is only serveral migration packages for AndroidX. You can refer to steps of XamarinAndroidXMigration to add the packages to your app.

    Notes: If you are in a production environment, it is highly recommended not to use this package as androidx and this migration packages are still in preview phase.

Sign In or Register to comment.