Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created December 15, 2023 12:00
Show Gist options
  • Save codeforfun-jp/28f204d1c1440702ea87305f04ec53a8 to your computer and use it in GitHub Desktop.
Save codeforfun-jp/28f204d1c1440702ea87305f04ec53a8 to your computer and use it in GitHub Desktop.
How to use spinner
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context=".MainActivity">
<Spinner
android:id="@+id/spinner"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:spinnerMode="dropdown" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment