JoanZapata / android-iconify

Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,...
http://joanzapata.com/android-iconify
Other
3.93k stars 527 forks source link

Any way to Iconify EditText/AutoCompleteTextView hints? #122

Closed squeeish closed 8 years ago

squeeish commented 8 years ago

Has anyone found a way to do that?

JoanZapata commented 8 years ago

What is your need exactly? Allow the user to type anything and when he types {fa-something} the icon appear instead? I don't think that would be a good user experience.

squeeish commented 8 years ago

Nope, what I meant was to have something like:

<AutoCompleteTextView
        android:id="@+id/actvSearch"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/hint_search_with_icon
        />

Where <string name="hint_search_with_icon">{fa-search} Search</string>

I could do a drawableLeft and all that, but I was just wondering if this was possible :)

JoanZapata commented 8 years ago

Oh I see, you meant for the hint. It's definitely possible, I think all you have to do is to subclass AutoCompleteTextView and override setHint(CharSequence) like this.

Also, you might want to consider this lib: https://github.com/DayS/EnhancedEditText/

JoanZapata commented 8 years ago

@squeeish Does that answer you question?

squeeish commented 8 years ago

@JoanZapata my apologies, been busy these few days. I'll try it out now and update! :)

JoanZapata commented 8 years ago

No worry, I was just checking :)

JoanZapata commented 8 years ago

Closed due to inactivity.