GithubHelp home page GithubHelp logo

djamshiddjurayev / chips-input Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 237 KB

This library is modified and reduced type of Android Open Source Project (RecipientEditText.java)

Java 100.00%
chips-input chips android tags tags-input tagsinput recipients

chips-input's Introduction

Chips-input

This project contains modified and reduced type of Android Open Source Project (RecipientEditText.java)

alt text

How to use it:

In your activity add this.

    suggestions.add(new ChipItem(1, "Suggest1"));
    suggestions.add(new ChipItem(2, "Suggest2"));
    suggestions.add(new ChipItem(3, "Suggest3"));
    suggestions.add(new ChipItem(4, "Suggest4"));
    suggestions.add(new ChipItem(5, "Suggest5"));

    chips.add("Chip1");
    chips.add("Chip2");
    chips.add("Chip3");
    chips.add("Chip4");
    chips.add("Chip5");

    SuggestionsAdapter suggestionsAdapter
        = new SuggestionsAdapter(this, suggestions);

    chipsInput.setmChipAllowDuplicate(false);
    chipsInput.setThreshold(2);
    chipsInput.setAdapter(suggestionsAdapter);
    chipsInput.setChipsList(chips);

Then create your xml files and add this.

<co.djuraev.chipsinput.chips.RecipientEditTextView
        android:id="@+id/tag_input"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@null"
        android:hint="Input tags"
        android:paddingBottom="16dp"
        android:paddingEnd="16dp"
        android:paddingLeft="16dp"
        android:paddingRight="16dp"
        android:paddingStart="16dp"
        android:paddingTop="16dp"
        android:scrollbars="vertical"
        android:textAllCaps="false"
        android:textColor="#8f000000"
        android:textColorHint="#aeaeae"
        android:textSize="16sp"
        app:chipBackground="@drawable/chip_background_drawable"
        app:chipBackgroundPressed="@drawable/chip_background_drawable_pressed"
        app:chipDelete="@drawable/baseline_cancel_white_48dp"
        app:chipIcon="@drawable/ic_contact_picture"
        app:chipAllowDuplicate="true"
        />

chips-input's People

Contributors

djamshiddjurayev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ozanerturk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.