Skip to content Skip to sidebar Skip to footer

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 applicati

Solution 1:

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"

Solution 2:

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.

Solution 3:

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.

Post a Comment for "Flat Ui In Android Studio"