Git Product home page Git Product logo

Comments (13)

2dxgujun avatar 2dxgujun commented on July 21, 2024

It seems the compatibility problem of the ime,
What's the ime you've been installed?

from androidtaggroup.

MGaetan89 avatar MGaetan89 commented on July 21, 2024

I'm using the default Android keyboard (in Android 5.0).

from androidtaggroup.

2dxgujun avatar 2dxgujun commented on July 21, 2024

Hi, I am using OnEditorActionListener to handle "Enter" key to "submit" a new tag and OnKeyListener to detect the "Backspace" key to delete the tag. which works fine with the third-part soft keyboard (e.g. QQ IME) or the hardware keyboard.

But it does not work with the Google Keyboard.

And I find the documentation states that the key events will only be propagated for the hardware key strokes, not software.

It is completely up to the manufacturer to honour that or to actually treat the soft and hard keyboards with equal terms.

Do you have a workaround deal with the Google Keyboard?

BTW, you can tap to blank area of the tag group to "submit" a new tag, and you can double-click the "Normal" state tag to delete it.

from androidtaggroup.

MGaetan89 avatar MGaetan89 commented on July 21, 2024

Thanks for the tips, I will try to see if it works.

Maybe you could try to use android:imeOptions and listen when the user press on that key on the keyboard? (maybe actionDone, or let the developer choose its own).

from androidtaggroup.

2dxgujun avatar 2dxgujun commented on July 21, 2024

Thank you, I have release the 1.1 version for some bug fixed, and a new method submitTag() to "submit" a new tag via code:)

from androidtaggroup.

MGaetan89 avatar MGaetan89 commented on July 21, 2024

Thank you for the new release. The submitTag() is helpful!

I found this SO question about this issue. I cloned your project and test the proposed solution, and it works.

I simply added the following in the TagView constructor:

setRawInputType(InputType.TYPE_CLASS_TEXT);
setImeOptions(EditorInfo.IME_ACTION_GO);

from androidtaggroup.

2dxgujun avatar 2dxgujun commented on July 21, 2024

Awesome, thank you the tips.

But I don't think the GO action is appropriate for the context.

And i found a SO question about detect the delete(backspace).

I will test it and keep looking for workaround :)

from androidtaggroup.

MGaetan89 avatar MGaetan89 commented on July 21, 2024

Maybe you can use GO something else) by default, and let the user customise the action he wants to use (via a method like setImeOptions()).

from androidtaggroup.

MGaetan89 avatar MGaetan89 commented on July 21, 2024

Do you have any news about this? Did you have time to test and find a workaround?

from androidtaggroup.

broakenmedia avatar broakenmedia commented on July 21, 2024

Having the same issue! 'Enter' on the stock keyboard just makes a new line

from androidtaggroup.

2dxgujun avatar 2dxgujun commented on July 21, 2024

I made some test but i didn't found how to solve it... As a workaround, you can set the IME_ACTION_GO.

from androidtaggroup.

broakenmedia avatar broakenmedia commented on July 21, 2024

I think it may help if you set the edittext to singleLine 'android:singleLine="true"' the 'enter' key then becomes 'done' and is easy to target

from androidtaggroup.

2dxgujun avatar 2dxgujun commented on July 21, 2024

Hi, i set the edittext to singleLine, then the 'enter' key becomes 'done' and it just collapse the soft keyboard when click, no new tag added, on the Google Keyboard.

from androidtaggroup.

Related Issues (20)

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.