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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:33:09+00:00 2026-05-29T07:33:09+00:00

My layout is: 1 EditText (id = etvalue1) 1 EditText (id = etvalue2) 1

  • 0

My layout is:

1 EditText (id = etvalue1)
1 EditText (id = etvalue2)
1 Button (id = save)

I need to know how to do the following with these widgets:

  • If the User clicks on the button with the EditText empty display a message and wait for the User to enter the value.
  • Display the message until the User and enter the value after the value is to enter the calculation (etvalue1 + etvalue2) and show the result.
  • 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-29T07:33:10+00:00Added an answer on May 29, 2026 at 7:33 am

    In onclicklistener for the button do the following

    if(edit1.getText().equals("") || edit2.getText().equals(""))  
    {
         //toast the error message 
         return;
    }
     //calculate the result
    

    The maximum time for toast is Toast.LENGTH_LONG. If you want the message to be displayed till the user enters data in edittext, then use a textview to display the message. Set onTextChangedListener on both the EditTexts to check if the text is changed. in afterTextChanged method you can do the calculation.

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

Sidebar

Related Questions

My layout has 4 EditText views and a submit Button view. I need to
I've got this Table layout with 3 EditText fields & a button that performs
My layout have 4 EditText views aligned vertically. but there is empty spacing after
I need to input latitude and longitude separately in 2 EditText s and display
In the layout you can set the EditText widget to be non-editable via the
I want to create a layout in such a way that on top edittext
Project layout: /project_a /shared /project_b /shared /shared project_a and project_b both need to contain
I want the following layout to appear on the screen: FieldName 1 [Field input
I need to layout a html datatable with CSS. The actual content of the
Whenever I add an EditText widget to the layout of my home screen widget

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.