Search code examples
androidandroid-edittextandroid-chips

Android EditText library similar to Path?


In my observation, the EditText pictured below is separated into 2 parts: one being a simple grid of which values are saved, and another being an actual EditText.

enter image description here

Has any of you know any EditText library that performs similarly like this? Or is there any alternative solution? Thanks!


Solution

  • That is called Chips - Components - Google design guidelines

    See this libraries below :-

    1. TokenAutoComplete

    2. Material Chips

    For example Add in your layout like this

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
        <com.tokenautocomplete.ContactsCompletionView
            android:id="@+id/searchView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    
    </RelativeLayout>
    

    And all is done

    Or You can create by your own using SpannableStingBuilder and ImageSpan