In android bringToFront()
not working when trying to bring a view to the front of a card view. It seems that the card view always has a higher priority than other views. I try requestLayout()
plus bringToFront()
too but it doesn't work. Is there any idea on how to solve this problem? I tried to use elevation
but it does not work on android below API level 21.
view.post(() -> {
view.setVisibility(View.VISIBLE);
view.bringToFront();
view.requestLayout();
});