.animate keyword in Android Studio is showing in red and not working : I'm creating an animation bulb app in which there are two image views having blue and green bulb and two buttons(named blue and green), on pressing them the image1's opacity increases and images2's decreases, the opposite happens when the other button is tapped(alpha values are 1 for both initially), but the animate keyword is showing up in red and the code is not compiling. 

**MainActivity**

     package com.example.honey1.animatedbulb;

    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.support.v7.widget.AppCompatImageView;
    import android.view.View;
    import android.widget.Button;
    import android.widget.ImageView;

    public class MainActivity extends AppCompatActivity {

    public void greenTapped(View view)
    {
        ImageView blue=(ImageView)findViewById(R.id.bluebulb);
        ImageView green=(ImageView)findViewById(R.id.greenbulb);
        blue.animate.alpha(1).setDuration(2000);
        green.animate.alpha(0).setDuration(2000);

    }
    public void blueTapped(View view)
    {
        ImageView blue=(ImageView)findViewById(R.id.bluebulb);
        ImageView green=(ImageView)findViewById(R.id.greenbulb);
        blue.animate.alpha(0).setDuration(2000);
        green.animate.alpha(1).setDuration(2000);

    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    }

[main activity screenshot][1]


[XML file screenshot][2]


  [1]: https://i.stack.imgur.com/WBZmV.png
  [2]: https://i.stack.imgur.com/f0uQi.png