I am wondering how to take the EditText area into which the user can enter a number, and then make it integer so that it can be used in the program to add, subtract, divide, etc. Basically, I need an input test to be able to be used in a calculator that will be inside the code, and then it needs to be placed in a TextView or a string so that the user can see the final answer.
Additional information: I have three EditText fields, and the user must fill in all three, then click "equals" and he will answer them, all the mathematical data and such needs should be in the code so that the user simply enters the information and does not actually calculate what- sometime. Thanks for the help, please ask me if you need more information.
The best way to do this and the code will help me a lot.
I added the code that was suggested, but I still get the parseInt error message, and I still need to add a button to calculate the numbers entered in the EditText area. How can I do it? Sorry, I'm fair for 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) {
androidguy
source share