2

chips edittext

I am using library eyeem/chips-android

I would like to be able to edit the text in a chip.

I am new to android, so I am unable to understand the ChipsEditText java file.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • First: asterisks don't make headers in your post. Second: the chips are actually compound drawables, so you can't simply edit the text in them without removing it, then adding its string content to the EditText, then setting the cursor position in the EditText – OneCricketeer Jan 09 '16 at 11:02
  • First of all thanks for the comment cricket_007, But I don't know how to revert back from drawables to EditText, and I don't know how to use the library, So please help.. – Rimon pallan Jan 09 '16 at 11:20
  • It doesn't really matter if you don't know Android to read the code in the library. To get the text of a chip, you can do `ChipsEditText.getLayoutBuild().text`. Might need to add `toString` on that, but you'll need to figure out how to get the chip that you want to edit first – OneCricketeer Jan 09 '16 at 11:30
  • Please check out my answer and code sample : https://stackoverflow.com/a/52007466/5439116 – Sourin Ghosh Aug 24 '18 at 17:16

0 Answers0