Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 141b837b authored by Wenyi Wang's avatar Wenyi Wang
Browse files

Set elevation when the first item is not completely visible

* This CL fixes a bug where elevation is not seen in group view when the
  first item is not completely visible.
* The bug is only seen in group view and not in account view, because
  there is a "search_header" in account view. The "search_header" is an
  item in list view but is not a visible contact. So the first contact
  in account view is actually the second item in the list view.

Bug 30358448

Change-Id: I04b9d7f54a154f8aea9515f376886abe13781df0
parent 967cffda
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -330,7 +330,13 @@ public abstract class MultiSelectContactsListFragment<T extends MultiSelectEntry
        if (accountFilterContainer == null) {
            return;
        }
        if (firstVisibleItem == 0) {

        int firstCompletelyVisibleItem = firstVisibleItem;
        if (view != null && view.getChildAt(0) != null && view.getChildAt(0).getTop() < 0) {
            firstCompletelyVisibleItem++;
        }

        if (firstCompletelyVisibleItem == 0) {
            ViewCompat.setElevation(accountFilterContainer, 0);
        } else {
            ViewCompat.setElevation(accountFilterContainer,