0

I want to re-adjust the elevation of the Swipe Refresh Layout.

In App Bar Layout we can get the effect by calling abl.setElevation(elevation);.

Is it possible for the Swipe Refresh Layout?

1 Answers1

1

According to the SwipeRefreshLayout Documentation page, it is possible.

It inherits the following method from android.view.View class:

void setElevation(float arg0)

So, I think it is possible for any view or layout which inherits android.view.View class.

Harshvardhan Joshi
  • 2,855
  • 2
  • 18
  • 31
  • But `swipeRefreshLayout.setElevation(elevation);` is not working for me. What should I do? –  Apr 10 '20 at 12:46
  • not working, as in showing error or not reflecting in the UI? – Harshvardhan Joshi Apr 10 '20 at 12:49
  • Not reflecting in the UI –  Apr 10 '20 at 13:55
  • try setting elevation along with a background color. I think only the shadow is not rendered. https://stackoverflow.com/a/36955904/8112679 – Harshvardhan Joshi Apr 10 '20 at 14:11
  • `android:background="@android:color/white" android:elevation="10dp"` adding elevation to ouside of the container of `swipe refresh layout` but I want to elevate the round refershing view. –  Apr 15 '20 at 19:55