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

Commit b080d092 authored by Alexandre Elias's avatar Alexandre Elias Committed by Android (Google) Code Review
Browse files

Merge "Expose public API to control mIsChildViewEnabled"

parents db195347 5730e5c5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -55251,6 +55251,7 @@ package android.widget {
    method protected boolean isInFilterMode();
    method public boolean isItemChecked(int);
    method public boolean isScrollingCacheEnabled();
    method public boolean isSelectedChildViewEnabled();
    method public boolean isSmoothScrollbarEnabled();
    method public boolean isStackFromBottom();
    method public boolean isTextFilterEnabled();
@@ -55286,6 +55287,7 @@ package android.widget {
    method public void setRemoteViewsAdapter(android.content.Intent);
    method public void setScrollIndicators(android.view.View, android.view.View);
    method public void setScrollingCacheEnabled(boolean);
    method public void setSelectedChildViewEnabled(boolean);
    method public void setSelectionFromTop(int, int);
    method public void setSelector(@DrawableRes int);
    method public void setSelector(android.graphics.drawable.Drawable);
+21 −0
Original line number Diff line number Diff line
@@ -2656,6 +2656,27 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        }
    }

    /**
     * Returns whether the selected child view (from the adapter's getView) is enabled.
     *
     * @return true if enabled
     */
    public boolean isSelectedChildViewEnabled() {
        return mIsChildViewEnabled;
    }

    /**
     * Set whether the selected child view (from the adapter's getView) is enabled.
     *
     * When refreshDrawableState is called, AbsListView will control the "enabled" state
     * of the selector based on this.
     *
     * @param selectedChildViewEnabled true if enabled
     */
    public void setSelectedChildViewEnabled(boolean selectedChildViewEnabled) {
        mIsChildViewEnabled = selectedChildViewEnabled;
    }

    @Override
    protected void dispatchDraw(Canvas canvas) {
        int saveCount = 0;