Android Programming, Display Certain word upon user entering Word

Ok so what i want to do is, make my app that Has 1 button "button1" and two TextInputs "TX1","TX2" display a certain word in "TX2" when the user types something in "TX1", For example, The User types "Hello" into "TX1" and i want "Test" to be displayed in "TX2" when the user clicks the button,i also want to be able to add multiple combinations, i have no idea how to make my app do this, perhaps using "Strings" and "If, Else". Thanks

BTW: i do have an alright understanding off android.


As per my understanding from your question,

you would be having two EditText and one button.

In the onClick event of the button, check the value of editext1, like this

Button button=(Button)findViewById(;
            button.setOnClickListener(new View.OnClickListener()
                public void OnClick(View v) 
                String val = Editext1.getText();

Need Your Help

How can I use powershell to list only the strings in a log file created in the last 3 hours?

powershell datetime grep gawk

I have a log file where dates and corresponding information are listed in strings with a format of:

How to include distance in co-ordinates using Wikipedia API?

c# json api wikipedia-api mediawiki-api

In my Wikipedia API I get Co-ordinate of a place. This co-ordinate contain lat, lon, dim, type etc. But I also want to add dist inside the co-ordinates so that I can get distance of each places fro...