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

Commit 0f7eac3c authored by Josh Guilfoyle's avatar Josh Guilfoyle
Browse files

ESPRESSO-823: Removed listItemBackground.

This was originally used to support unselected row highlights.
parent 1c3913c8
Loading
Loading
Loading
Loading
+3 −23
Original line number Diff line number Diff line
@@ -124,8 +124,6 @@ public class ListView extends AbsListView {
    private boolean mHeaderDividersEnabled;
    private boolean mFooterDividersEnabled;

    private Drawable.ConstantState mDefaultItemBackground;

    private boolean mAreAllItemsSelectable = true;

    private boolean mItemsCanFocus = false;
@@ -181,11 +179,6 @@ public class ListView extends AbsListView {
        mHeaderDividersEnabled = a.getBoolean(R.styleable.ListView_headerDividersEnabled, true);
        mFooterDividersEnabled = a.getBoolean(R.styleable.ListView_footerDividersEnabled, true);

        Drawable defaultItemBackground = a.getDrawable(com.android.internal.R.styleable.ListView_listItemBackground); 
        if (defaultItemBackground != null) {
            mDefaultItemBackground = defaultItemBackground.getConstantState();
        }

        a.recycle();
    }

@@ -1673,11 +1666,6 @@ public class ListView extends AbsListView {

        // Make a new view for this position, or convert an unused view if possible
        child = obtainView(position);
        if (child.getBackground() == null && mDefaultItemBackground != null) {            
            if (mAdapter.getItemViewType(position) != Adapter.IGNORE_ITEM_VIEW_TYPE) {                
                child.setBackgroundDrawable(mDefaultItemBackground.newDrawable());        
            }
        }  

        // This needs to be positioned and measured
        setupChild(child, position, y, flow, childrenLeft, selected, false);
@@ -2836,10 +2824,6 @@ public class ListView extends AbsListView {
    private View addViewAbove(View theView, int position) {
        int abovePosition = position - 1;
        View view = obtainView(abovePosition);
        if (view.getBackground() == null && mDefaultItemBackground != null) {            
            if (mAdapter.getItemViewType(position) != Adapter.IGNORE_ITEM_VIEW_TYPE)                
                view.setBackgroundDrawable(mDefaultItemBackground.newDrawable());
        }
        int edgeOfNewChild = theView.getTop() - mDividerHeight;
        setupChild(view, abovePosition, edgeOfNewChild, false, mListPadding.left, false, false);
        return view;
@@ -2848,10 +2832,6 @@ public class ListView extends AbsListView {
    private View addViewBelow(View theView, int position) {
        int belowPosition = position + 1;
        View view = obtainView(belowPosition);
        if (view.getBackground() == null && mDefaultItemBackground != null) {            
            if (mAdapter.getItemViewType(position) != Adapter.IGNORE_ITEM_VIEW_TYPE)                
                view.setBackgroundDrawable(mDefaultItemBackground.newDrawable());  
        }
        int edgeOfNewChild = theView.getBottom() + mDividerHeight;
        setupChild(view, belowPosition, edgeOfNewChild, true, mListPadding.left, false, false);
        return view;
+0 −2
Original line number Diff line number Diff line
@@ -1728,8 +1728,6 @@
        <!-- When set to false, the ListView will not draw the divider before each footer view.
             The default value is true. -->
        <attr name="footerDividersEnabled" format="boolean" />
        <!-- Drawable used to colorize an item's background in the list. -->
        <attr name="listItemBackground" format="color|reference" />
    </declare-styleable>
    <declare-styleable name="MenuView">
        <!-- Default appearance of menu item text. -->
+1 −3
Original line number Diff line number Diff line
@@ -1225,9 +1225,7 @@
     =============================================================== -->
  <eat-comment />

  <public type="attr" name="listItemBackground" id="0x010102c1" />

  <public type="attr" name="expandedMenuTheme" />
  <public type="attr" name="expandedMenuTheme" id="0x010102c1" />
  <public type="attr" name="iconMenuTheme" />

  <!-- The following have been temporarily added here to avoid any accidental