Android - Dim app screen on longpress listitem

295 views Asked by At

I have an app with a listview. If you long press an item in the listview, you will get a DragShadow. Now if you got the dragshadow for drag&drop actions, I want to dim my appscreen like the way it is done in a dialog.

So is it possible to get a dim on your appscreen without using a dialog?

I want to achieve this background dim/blur without using a dialog

1

There are 1 answers

1
Vaibhav Agarwal On BEST ANSWER

You can use alpha animation on your parent layout of taht screen on long press, with the help of this you can make your screen dim without dialog

  Animation animation2 = new AlphaAnimation(1.0f, 0.2f);
  animation2.setDuration(1000);
  animation2.setStartOffset(5000);
  layout.startAnimation(animation2);

or use animation through xml file

XML Animations