Skip to content

Instantly share code, notes, and snippets.

@MaartenS
Last active February 20, 2019 13:29
Show Gist options
  • Save MaartenS/e0dedf7f34afc62647db to your computer and use it in GitHub Desktop.
Save MaartenS/e0dedf7f34afc62647db to your computer and use it in GitHub Desktop.
example usage of the AppCompatSpinner
<android.support.design.widget.TextInputLayout
           android:layout_width="match_parent"
           android:layout_height="wrap_content">

    <android.support.v7.widget.AppCompatSpinner
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        bind:items="@{viewModel.spiinnerItems}" />

 </android.support.design.widget.TextInputLayout>
@lectricas
Copy link

bind:items="@{viewModel.spiinnerItems}
what is this thing?
And why do you need TextInputLayout?
Please explain

@mgarciate
Copy link

mgarciate commented Dec 5, 2016

@lectricas

bind:items="@{viewModel.spiinnerItems}

items is the BindingAdapter name set on a public static method in a ViewModel class. spiinerItems is the 2nd parameter passed to that method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment