Add the dependency to your build.gradle.
implementation 'gr.escsoft.michaelprimez.searchablespinner:SearchableSpinner:1.0.9'
Usage on layout
<gr.escsoft.michaelprimez.searchablespinner.SearchableSpinner
android:id="@+id/SearchableSpinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:gravity="center_horizontal"
app:StartSearchTintColor="@android:color/white"
app:DoneSearchTintColor="@android:color/holo_purple"
app:RevealViewBackgroundColor="@android:color/holo_purple"
app:SearchViewBackgroundColor="@android:color/secondary_text_dark"
app:ShowBorders="false"
app:RevealEmptyText="Touch to select"
app:SpinnerExpandHeight="300dp"/>
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D ## History
- added [get, set] selected item
- added Touch outside to dismiss
- added a status listener
- added divider and divider height
Copyright (C) 2017 Michael Keskinidis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.