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 6573185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:06:03+00:00 2026-05-25T15:06:03+00:00

I want to get the after entered text.I have done using TextWatcher . There

  • 0

I want to get the after entered text.I have done using TextWatcher.

There are some issues:

For example I want to enter 32.5. In that method I want to add to SET<Product>.

Here each & every number its saving object.That means after enter 3 its add Product object into SET, then add 2 then also adding…

I want to avoid. Once I finish enter EditText,Then want to take it:

final EditText txtQty = new EditText(this);
txtQty.addTextChangedListener(new TextWatcher() {
   public void afterTextChanged(Editable s) { 
   Log.v("TAG", "afterTextChanged" + s.toString());
   String enterdPrice = txtPrice.getText().toString();
   double remainQty =0.00;
   Product enterdProduct = new Product();
   try{
      String enteredQty = s.toString();
      enterdProduct.setProductCode(txtCode.getText().toString());
      enterdProduct.setPrice(Double.parseDouble(enterdPrice));
      //enterdProduct.setQty(Double.parseDouble(enteredQty));
      // TO-DO  
      if (productSet.contains(enterdProduct)) {
          productSet.remove(enterdProduct);
      }
      productSet.add(enterdProduct);

      System.out.println("SIZE --" + productSet.size());
   }
   catch (Exception e) {
    e.printStackTrace();
    }
});      

Please give me idea, How we can get the EditText once enter I enetred text?

  • 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-05-25T15:06:04+00:00Added an answer on May 25, 2026 at 3:06 pm

    You can get entered text on pressing “Enter” button on keyboard.

    final EditText edittext = (EditText) findViewById(R.id.edittext);
    edittext.setOnKeyListener(new OnKeyListener() {
        public boolean onKey(View v, int keyCode, KeyEvent event) {
            // If the event is a key-down event on the "enter" button
            if ((event.getAction() == KeyEvent.ACTION_DOWN) &&
                (keyCode == KeyEvent.KEYCODE_ENTER)) {
              // Perform action on key press
              return true;
            }
            return false;
        }
    });
    

    Code from Android tutorial

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

Sidebar

Related Questions

I got this url /search/renttype-all.place-all.type-all.bedrooms-all.0.0/ I want to get the text after the second
I want to get started doing some game development using Microsoft's XNA. Part of
I have some questions regarding my MVC learning curve Goal: I want to get
I want to get the characters after the last / in an url like
Why would I want to get out of an Error Handler (after handling) with
I want get all of the Geom objects that are related to a certain
I want to get my databases under version control. I'll always want to have
I want to get an overview of files that are updated in TFS (that
I want to get the base 10 logarithm of a Fixnum using Ruby, but
i want to write a code in a way,if there is a text file

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.