Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8917337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:27:37+00:00 2026-06-15T05:27:37+00:00

**UPDATE** After implement on my way I am able to cancel text control but

  • 0
**UPDATE**

After implement on my way I am able to cancel text control but in gingerbread version upto.
In this jelly been no keycode combination was worked I have tried with this example also but no more luck for new version to manually dispatch keyevent.

I have webview in viewpager now user can copy text from webview on long click on webview, but the problem is when user long click on webview and cursor are shown on view for selected text area and they move right/left then viewpager also move. To over come this I have disable viewpager paging change event on long click and it works.

Now to enable this and clear/deselecting high lighten text on webview to cancel copy text process I didn’t find any solution.

check Image here

enter image description here

Edited

Does anybody knows how to programmatically cancel this process like we click on right/done button?

here is the code start selection on text on long click of webview

public void SelectText(View v) {
    try {
        KeyEvent shiftPressEvent = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
                KeyEvent.KEYCODE_SHIFT_LEFT, 0, 0);
        shiftPressEvent.dispatch(v);
    } catch (Exception e) {
        throw new AssertionError(e);
    }
}

now how to cancel/dismiss this selection and clear lightening text as programmatically.

I have tried same code with ACTION_UP with above code but no luck
does anybody tried know about this?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:27:38+00:00Added an answer on June 15, 2026 at 5:27 am

    For cancel

    I have do this

    public void SelectText(View v) {
        try {
            KeyEvent shiftPressEvent = new KeyEvent(0, 0, KeyEvent.ACTION_DOWN,
                    KeyEvent.KEYCODE_ESCAPE, 0, 0);
            shiftPressEvent.dispatch(v);
        } catch (Exception e) {
            throw new AssertionError(e);
        }
    }
    

    and this worked for gingerbread version but not working in 4.0 version I don’t know why this not working but try to find way also

    Thank you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update: I've created a suggestion to implement hint control in a future version of
UPDATE: After searching a bit I don't seem to be alone about this problem:
Update: After playing around with this for a few hours, went with a multi-query
Update: After some more reading I see that this problem is totally general, you
I am fairly new to Objective-C, but haven't been able to find the answer
Sorry if this was covered before in some way that I wasn't able to
UPDATE: So, I've found this , and apparently that's why this old way of
UPDATE: After updating to stylus 0.7.4 and express 2.3.12 I can no longer reproduce
Because of min time betwwen update it display the location update after 1 sec
Is it possible to update the same view with new data? Using UPDATE after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.