Created
May 2, 2017 10:29
-
-
Save xuhaibahmad/ce8e4837eba3a0233e8271d186d362d5 to your computer and use it in GitHub Desktop.
Variation of AutoCompleteTextView that displays suggestions even in absence of any text input. Often used in conjunction with a handle view to mimic a custom drop down behavior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.android.tresmark.utils; | |
import android.content.Context; | |
import android.support.v7.widget.AppCompatAutoCompleteTextView; | |
import android.util.AttributeSet; | |
/** | |
* Created by Zuhaib on 5/2/2017. | |
* <p> | |
* Variation of {@link android.widget.AutoCompleteTextView} that displays suggestions even in | |
* absence of any text input. Often used in conjunction with a handle view to mimic a custom | |
* drop down behavior. | |
*/ | |
public class DropDownEditText extends AppCompatAutoCompleteTextView { | |
public DropDownEditText(Context context) { | |
super(context); | |
} | |
public DropDownEditText(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} | |
public DropDownEditText(Context context, AttributeSet attrs, int defStyleAttr) { | |
super(context, attrs, defStyleAttr); | |
} | |
@Override | |
public boolean enoughToFilter() { | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment