I am stuck in a condition that I can’t keep the sub layout faded after using the fade animation
FrameLayout mapLayout = (FrameLayout)findViewById(R.id.mapLayout);
Animation fadeAnim = AnimationUtils.loadAnimation(this, android.R.anim.fade_out);
mapLayout.startAnimation(fadeAnim);
Please guide how can I achieve this in android. This animation and shaded effect occurs when I click the ‘Pause’ Button and to reverse the effect I will press the ‘Resume’ Button(Sorry I made the image with ‘Pause’ button in shaded view, in actual it is ‘Resume’)

Both above answers helped me in solving the issue, but both answers weren’t the actual solution to my problem. The solution I made is
I defined two animations according to my need
When I clicked ‘Pause’ button I executed following line
Then to resume from paused state, I executed following line
Thanks Simon and Deepak!