user3838768
user3838768

Reputation: 21

Flat Ui in Android Studio

I am using Flat Ui in my Android Application using Android Studio but i am unable to find AutoCompleteTextView inside Flat Ui and I have to use AutoCompleteTextview in my application so anyone suggest me the way to use that?

Upvotes: 0

Views: 1065

Answers (3)

eluleci
eluleci

Reputation: 3529

The merge request from PinoyWebDev (thanks to him) is closed and AutoCompleteTextView is now available in the library. You can see the added class here.

Upvotes: 0

PinoyDev
PinoyDev

Reputation: 46

I Just fork a library for AutoCompleteTextView and waiting to be merged.

For now:

  1. Inside library/src/main/java/com/cengalabs/flatui/views create new file name it FlatAutoCompleteTextView.java

  2. Find the FlatEditText.java copy the content and paste it to FlatAutoCompleteTextView.java

  3. Inside FlatAutoCompleteTextView.java replace all text with "FlatEditText" with "FlatAutoCompleteTextView" .

  4. find this part style = a.getInt(R.styleable.fl_FlatAutoCompleteTextView_fl_fieldStyle, 0); and replace with style = a.getInt(R.styleable.fl_FlatAutoCompleteTextView_fl_autoFieldStyle, 0);

  5. Edit library/src/main/res/values/attrs.xml , paste this code inside and save or just replace content with this http://pastebin.com/w4w5UWdd

To use style fl_autoFieldStyle="flat" or fl_autoFieldStyle="box"

Upvotes: 1

CommonsWare
CommonsWare

Reputation: 1007296

If the Flat UI project does not support AutoCompleteTextView, your choices are:

  1. Write it yourself.

  2. Convince the author of the library to write it for you.

  3. Hire some other developer to write it for you.

  4. Go without AutoCompleteTextView.

  5. Go without Flat UI.

Since none of the Flat UI widgets are based on AdapterView, creating an AutoCompleteTextView may be rather complicated.

Upvotes: 0

Related Questions