{"action":"created","issue":{"url":"https://api.github.com/repos/natario1/Autocomplete/issues/11","repository_url":"https://api.github.com/repos/natario1/Autocomplete","labels_url":"https://api.github.com/repos/natario1/Autocomplete/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/natario1/Autocomplete/issues/11/comments","events_url":"https://api.github.com/repos/natario1/Autocomplete/issues/11/events","html_url":"https://github.com/natario1/Autocomplete/issues/11","id":308950620,"number":11,"title":"Background Image like in Screenshot","user":{"login":"chrisonline","id":2077218,"avatar_url":"https://avatars3.githubusercontent.com/u/2077218?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisonline","html_url":"https://github.com/chrisonline","followers_url":"https://api.github.com/users/chrisonline/followers","following_url":"https://api.github.com/users/chrisonline/following{/other_user}","gists_url":"https://api.github.com/users/chrisonline/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisonline/subscriptions","organizations_url":"https://api.github.com/users/chrisonline/orgs","repos_url":"https://api.github.com/users/chrisonline/repos","events_url":"https://api.github.com/users/chrisonline/events{/privacy}","received_events_url":"https://api.github.com/users/chrisonline/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-27T12:37:38Z","updated_at":"2018-03-30T19:57:06Z","closed_at":null,"author_association":"NONE","body":"Can you please let me know how can I achieve this background of the \"tag\" from this screenshot:\r\n![image](https://user-images.githubusercontent.com/2077218/37967630-4c4ac408-31cc-11e8-8924-0ef1a7944bf0.png)\r\n\r\nIn the sample code there is no background.\r\nAnd with setSpan(new BackgroundColorSpan(..)) I get only a background color, but not the look and feel like in your sample screenshot."},"comment":{"url":"https://api.github.com/repos/natario1/Autocomplete/issues/comments/377608731","html_url":"https://github.com/natario1/Autocomplete/issues/11#issuecomment-377608731","issue_url":"https://api.github.com/repos/natario1/Autocomplete/issues/11","id":377608731,"user":{"login":"re3lex","id":4106391,"avatar_url":"https://avatars1.githubusercontent.com/u/4106391?v=4","gravatar_id":"","url":"https://api.github.com/users/re3lex","html_url":"https://github.com/re3lex","followers_url":"https://api.github.com/users/re3lex/followers","following_url":"https://api.github.com/users/re3lex/following{/other_user}","gists_url":"https://api.github.com/users/re3lex/gists{/gist_id}","starred_url":"https://api.github.com/users/re3lex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/re3lex/subscriptions","organizations_url":"https://api.github.com/users/re3lex/orgs","repos_url":"https://api.github.com/users/re3lex/repos","events_url":"https://api.github.com/users/re3lex/events{/privacy}","received_events_url":"https://api.github.com/users/re3lex/received_events","type":"User","site_admin":false},"created_at":"2018-03-30T19:57:06Z","updated_at":"2018-03-30T19:57:06Z","author_association":"NONE","body":"@chrisonline I have implemented similar functionality with [TagsEditText](https://github.com/mabbas007/TagsEditText) component using the following AutocompletePolicy:\r\n\r\n```\r\npublic class TagPolicy implements AutocompletePolicy {\r\n\r\n  private TagsEditText editField;\r\n\r\n  public TagPolicy(TagsEditText editText) {\r\n    this.editField = editText;\r\n  }\r\n\r\n  private String getFixedText(Spannable text) {\r\n    String joinedTags = TextUtils.join(\" \", editField.getTags());\r\n\r\n    String first = text.toString().replaceFirst(joinedTags, \"\");\r\n    return first;\r\n  }\r\n\r\n  @Override\r\n  public boolean shouldShowPopup(Spannable text, int cursorPos) {\r\n    String fixedText = getFixedText(text);\r\n    return fixedText.length() > 1;\r\n  }\r\n\r\n  @Override\r\n  public boolean shouldDismissPopup(Spannable text, int cursorPos) {\r\n    String fixedText = getFixedText(text);\r\n    return fixedText.length() < 2;\r\n\r\n  }\r\n\r\n  @Override\r\n  public CharSequence getQuery(Spannable text) {\r\n    return getFixedText(text);\r\n\r\n  }\r\n\r\n  @Override\r\n  public void onDismiss(Spannable text) {\r\n  }\r\n}\r\n```\r\n\r\n"}}
{"actor":{"display_login":"re3lex"}}