Need some help on app please

  • Replies:0
Cavatar Swift
  • Forum posts: 1

Jun 7, 2017, 4:14:27 PM via Website

Hi there,

First of all thank you in advance for any help

I am using Android Studio 2.3.2. I started creating my first app to do calculations. I created 2x "number fields" and next them them 2x "buttons" and a 3rd button to be the Result button. The buttons next to the number boxes are just there so that I can write inside the bottons to explain what information must be put into the number boxes. So it looks something like:

___ measurement in mm
_____ measurement in metres
Result

So I have 2 questions I need help on ......
1. How do I make it so that no matter which one I fill in, the other one with display the answer. So if I write in the number1 box "123" then it will display "0.123" in the number2 box OR if I write in the number2 box "0.123" then it will display "123" in the number 1 box. So I basically need help with making a number field where I can write into it and at the same time also use it as a display to display an answer if there is nothing inside that box and I write in the other box. The math is easy as its just multiply with 1000 or divide with a 1000 but I don't know what box or boxes I should use in Android studio for it to do what I need.

  1. Is there a way I can automatically get the result displayed in number 2 box as I am typing the number into say the number 1 box?? or must there always be a "Result" button to click on to make the answer be displayed after clicking the Result button??

Again thank you so much for any help

Cav

Reply