Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set Explicit Character?

See original GitHub issue

Hello, Currently I am using WordTokenizer with MentionsEditText as showed in GridMentions Sample! This is my config : private WordTokenizerConfig tokenizerConfig = new WordTokenizerConfig.Builder().setMaxNumKeywords(3).setThreshold(3).build();

Problem is that this triggers the OnQueryReceived and looks for suggestions on any random text input but I want that to be triggered only when the user uses @ keyword.

This currently works like this -> User Input: I went (Query Is Triggered) on a dinner

What I want -> User Input: I went on a dinner with @Faraz (Here I want the query to be triggered and show suggestions)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

nhibnercommented, Apr 29, 2017

If you want a quick way to only allow explicit mentions, you can configure the WordTokenizer with a large threshold. This configuration should work:

new WordTokenizerConfig
            .setWordBreakChars(", ")
nhibnercommented, Apr 29, 2017

@farazappy You can call getText().getMentionSpans() to get a list of the mentions in the text. For more help on saving/restoring these mentions from a database, see the discussions on #35

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using wildcard symbols as explicit characters in a form
To search for the actual characters that serve as wildcard symbols, you must force the system to interpret these wildcard characters as ...
Read more >
Copy the 'explicit' or 'E' symbol from songs in the iOS Music app
I have songs in my Music app that are marked as 'explicit'. Is there a way to copy this 'explicit'/'E' symbol so I...
Read more >
How to assure that only explicit characters in given list are ...
In this code, you will return True only after you checked all the characters and the sequence is not an empty string.
Read more >
10.3.3 Database Character Set and Collation
To override this, provide explicit CHARACTER SET and COLLATE table options. For LOAD DATA statements that include no CHARACTER SET clause, the server...
Read more >
How to Get and Set Default Character Encoding or Charset in ...
The same combination of bytes can denote different characters in different character encoding. Therefore, the specification of the right ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found