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

  • Home
  • SEARCH
  • 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 6217827
In Process

The Archive Base Latest Questions

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

I am wondering how to take an EditText area that the user can enter

  • 0

I am wondering how to take an EditText area that the user can enter a number in, then make it an integer so it can be used in the program for adding, subtracting, dividing, etc. Basicaly I need the test the enter to be able to be used in a calculator which will be within the code and then it needs to be put into a TextView or string so the final answer can be seen by the user.

More info:
I have three EditText areas and the user has to fill in all three then press “equals” and it will tell them the answer, all the math and such needs to be in the code so the user just enters information and doesn’t actually calculate anything.
Thanks for the help, please ask me if you need any more info.

The best way to do this and the code would help me a lot.

I have added the code that was suggested but I still get an error on parseInt and I still need to add a button to calculate the numbers entered in the EditText areas. How would I do this? Sorry I am fairly to Java and Android development.

             package com.example.one;


             import com.example.one.R;

             import android.app.Activity;
             import android.content.Intent;
             import android.os.Bundle;
             import android.text.Editable;
             import android.view.View;
             import android.widget.Button;
             import android.widget.EditText;

             public class monthlyp extends Activity{

         @Override
        protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.monthlyp);


   EditText editone = (EditText) findViewById(R.id.editone);
   EditText editoneValue = (EditText) editone.getText();
   int editoneNum = Integer.parseInt(editoneValue);

    }
   ;

   }
  • 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-24T07:29:34+00:00Added an answer on May 24, 2026 at 7:29 am

    First, get an instance of the EditText:

    EditText myEdit = (EditText) findViewById(R.id.edittext1);
    

    Then get the string that is currently being displayed:

    String myEditValue = myEdit.getText().toString();
    

    Then parse it for an integer:

    int myEditNum = Integer.parseInt(myEditValue);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering if anyone knew of a program that can take a 3D
I'm wondering if there are algorithms that can take, say, a 100x70 image and
Hi I was wondering I could make my flash program take input from an
I'm wondering if someone has a script out there that can take my Localizable.strings
I was wondering if anyone knew of a Qt library method that can take
I'm wondering how I can take the cubed root of a number in Xcode,
Hi I was wondering if there is any jquery function around which can take
I'm wondering how fast I can take pictures one after another withoud surprises from
I was just wondering how disastrous integer overflow really is. Take the following example
I am wondering if macro definitions can contain space. Let's take for example this

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.