-
Notifications
You must be signed in to change notification settings - Fork 0
1. Getting Started
Vikram Ezhil edited this page Apr 18, 2020
·
5 revisions
This chapter covers the basic setup for using this library.
As a first step, add a dependency to this library to your project. How to do that is described in the usage section of this repository. Gradle is the recommended way of using this library as a dependency.
In your layout file add Droid Floating Search View,
<github.com.vikramezhil.dfsv.Dfsv
android:id="@+id/dfsView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:dfsvBgColor="@android:color/holo_purple"
app:dfsvOverlayBgColor="@android:color/holo_purple"
app:dfsvTextColor="@android:color/white"
app:dfsvHintTextColor="@android:color/white"
app:dfsvDividerColor="@android:color/white"
app:dfsvIconsColor="@android:color/white"
app:dfsvHintText="@string/search_hint"
app:dfsvCornerRadius="10"
app:dfsvElevation="5"
app:dfsvCloseSearchOnOverlayTouch="false"
app:dfsvContinuousSearch="false"
app:dfsvSuggestions="@array/suggestions"/>
In your class file, initialize Droid Floating Search View using the ID specified in your layout file
DroidFSView dfsView = findViewById(R.id.dfsView);
Note: Adding customizations to the Droid Floating Search View can be found here.