0

I'm using this chipView in android for this simple tag like view. But it only accepting email-id's and not the simple text tags.

Contact contact = new Contact(firstName, lastName, displayName, @NonNull emailAddress, Uri avatarUrl)

If i press Enter in the chipView, it takes only email as tags, and erasing simple text from view

CdVr
  • 323
  • 3
  • 15

1 Answers1

0

Seems like chips library you are using is accepts only email. Use this MaterialChips library.

Here is the snippet :

chipsInput.addChip(ChipInterface chip);
// or
chipsInput.addChip(Object id, Drawable icon, String label, String info);
// or
chipsInput.addChip(Drawable icon, String label, String info);
// or
chipsInput.addChip(Object id, Uri iconUri, String label, String info);
// or
chipsInput.addChip(Uri iconUri, String label, String info);
// or
chipsInput.addChip(String label, String info);
Satan Pandeya
  • 3,747
  • 4
  • 27
  • 53
akshay_shahane
  • 4,423
  • 2
  • 17
  • 30
  • It is showing the following error **Error:Cannot change dependencies of configuration ':app:_debugAnnotationProcessor' after it has been resolved.** when trying to add dependency in build.gradle @akshay_shahane – CdVr Aug 08 '17 at 09:52
  • I resolved the above error, but how to disable cursor in **ChipsInput** xml (view)? Because whenever activity launches where is have this **ChipsInput** keyboard becomes visible automatically because of the ChipsInput View in that layout. So i wonder how to disable cursor (ultimately type option in this xml tag view. – CdVr Aug 11 '17 at 07:56
  • android:windowSoftInputMode="stateHidden|adjustResize" add this line in manifest for activity – akshay_shahane Aug 11 '17 at 08:47
  • Now the keyboard is not popping on activity launch. Thanks a lot bro. But the cursor blinks at last position of the elements in the **ChipsItem** view. how to remove cursor blinking inside the **ChipsItem** view. I definitely accept the answer, can you help out the above case please! – CdVr Aug 11 '17 at 09:23
  • i think you cant do that its an open issue for this library https://github.com/pchmn/MaterialChipsInput/issues/44 – akshay_shahane Aug 11 '17 at 09:28