Hello! friends today i focus a small problem to replace text in the variable. in the beginning the developer create text with variable and try to replace text inside of this variable like given below image.

Remember that variable value can’t be change after add.

Don’t worry here is solution for replace text in variable. as we know the variable value can’t change but we create new variable with new value from modify old variable value.for best understand i created a project.

1. In this project i set in On activity create a variable (variable_1) with some value and show the value in textview.

2. After that i created two EditText widgets and a button.

3. in the button on click event i add if else control block and create condition if variable_1 contain EditText_1 is true than create new variable_2 with replace text edittext_1 to EditText_2. please see image given below.

See video given below