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

Commit 7840055f authored by Chet Haase's avatar Chet Haase
Browse files

Fix problem with transparent background on Twitter app

ListViews whose items don't cover their entire content area should not
return true for isOpaque()

Change-Id: I9165c0315a49bb5774bdcd4c1b89c1be0ebfcebf
parent 6e38d26c
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -3015,8 +3015,22 @@ public class ListView extends AbsListView {

    @Override
    public boolean isOpaque() {
        return (mCachingActive && mIsCacheColorOpaque && mDividerIsOpaque &&
        boolean retValue = (mCachingActive && mIsCacheColorOpaque && mDividerIsOpaque &&
                hasOpaqueScrollbars()) || super.isOpaque();
        if (retValue) {
            // only return true if the list items cover the entire area of the view
            final int listTop = mListPadding.top;
            View first = getChildAt(0);
            if (first == null || first.getTop() > listTop) {
                return false;
            }
            final int listBottom = getHeight() - mListPadding.bottom;
            View last = getChildAt(getChildCount() - 1);
            if (last == null || last.getBottom() < listBottom) {
                return false;
            }
        }
        return retValue;
    }

    @Override