I have a editText in my view. Their is a else if statement connected to that editText. When you type in a certain word some code will run.
But when i type in the keyword the code isn't running. I think the problem is that their is a enter key. I just type the word in, if i hit enter afterwards it just creates a new line, rather then entering the text.
here is the code from my else if
public void editText (String editText)
{
final ImageView image = (ImageView) findViewById(R.id.image1);
final ImageView image1 = (ImageView) findViewById(R.id.imageView2);
if(editText=="closer")
{
((ViewGroup.MarginLayoutParams) image.getLayoutParams()).topMargin += 1;
// image.setRotation(image.getRotation() + 1);
image.requestLayout();
((ViewGroup.MarginLayoutParams) image1.getLayoutParams()).topMargin -= 1;
// image2.setRotation(image2.getRotation() + 1);
}