arimorty / floatingsearchview

A search view that implements a floating search bar also known as persistent search
https://github.com/arimorty/floatingsearchview/blob/master/README.md
Apache License 2.0
3.54k stars 668 forks source link

change imput type in edit text #271

Open AhmadSaleh opened 7 years ago

AhmadSaleh commented 7 years ago

i want to set the type text search just number i have search to solved this problem but the edit text view in the class FloatingSearchView is private

jbhv12 commented 7 years ago

You need to edit SearchInputView.java file. You can locate it here <library-path>/src/main/java/com/arlib/floatingsearchview/util/view/SearchInputView.java . Override the setInputType of base class and call it inside init() method.

add the following function:

@Override
public void setInputType(int t){
    super.setInputType(t);
}

and append function call in init() like this:

 private void init() {

        setOnKeyListener(mOnKeyListener);
        setInputType(InputType.TYPE_CLASS_NUMBER);
    }
fbertanha commented 6 years ago

jbhv12, where i found this file and how put back this changes in my project?. I can't edit this file on Android Studio, i found the floatingsearchview-x.x.x-sources.jar in the Gradle directory but cann't edit this. tks