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

Commit d78036bb authored by Alan Viverette's avatar Alan Viverette
Browse files

Add accessors for TabWidget strip drawables

Change-Id: Ia6aef6a2221096c2653ae39fcec60289fa0ee2fb
parent 6bfab4e4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -41441,6 +41441,8 @@ package android.widget {
    method public void dispatchDraw(android.graphics.Canvas);
    method public void focusCurrentTab(int);
    method public android.view.View getChildTabViewAt(int);
    method public android.graphics.drawable.Drawable getLeftStripDrawable();
    method public android.graphics.drawable.Drawable getRightStripDrawable();
    method public int getTabCount();
    method public boolean isStripEnabled();
    method public void onFocusChange(android.view.View, boolean);
+2 −0
Original line number Diff line number Diff line
@@ -44087,6 +44087,8 @@ package android.widget {
    method public void dispatchDraw(android.graphics.Canvas);
    method public void focusCurrentTab(int);
    method public android.view.View getChildTabViewAt(int);
    method public android.graphics.drawable.Drawable getLeftStripDrawable();
    method public android.graphics.drawable.Drawable getRightStripDrawable();
    method public int getTabCount();
    method public boolean isStripEnabled();
    method public void onFocusChange(android.view.View, boolean);
+28 −0
Original line number Diff line number Diff line
@@ -256,6 +256,7 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
     * indicators.
     *
     * @param drawable the left strip drawable
     * @see #getLeftStripDrawable()
     * @attr ref android.R.styleable#TabWidget_tabStripLeft
     */
    public void setLeftStripDrawable(@Nullable Drawable drawable) {
@@ -270,17 +271,31 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
     *
     * @param resId the resource identifier of the drawable to use as the left
     *              strip drawable
     * @see #getLeftStripDrawable()
     * @attr ref android.R.styleable#TabWidget_tabStripLeft
     */
    public void setLeftStripDrawable(@DrawableRes int resId) {
        setLeftStripDrawable(mContext.getDrawable(resId));
    }

    /**
     * @return the drawable used as the left part of the strip below the tab
     *         indicators, may be {@code null}
     * @see #setLeftStripDrawable(int)
     * @see #setLeftStripDrawable(Drawable)
     * @attr ref android.R.styleable#TabWidget_tabStripLeft
     */
    @Nullable
    public Drawable getLeftStripDrawable() {
        return mLeftStrip;
    }

    /**
     * Sets the drawable to use as the right part of the strip below the tab
     * indicators.
     *
     * @param drawable the right strip drawable
     * @see #getRightStripDrawable()
     * @attr ref android.R.styleable#TabWidget_tabStripRight
     */
    public void setRightStripDrawable(@Nullable Drawable drawable) {
@@ -295,12 +310,25 @@ public class TabWidget extends LinearLayout implements OnFocusChangeListener {
     *
     * @param resId the resource identifier of the drawable to use as the right
     *              strip drawable
     * @see #getRightStripDrawable()
     * @attr ref android.R.styleable#TabWidget_tabStripRight
     */
    public void setRightStripDrawable(@DrawableRes int resId) {
        setRightStripDrawable(mContext.getDrawable(resId));
    }

    /**
     * @return the drawable used as the right part of the strip below the tab
     *         indicators, may be {@code null}
     * @see #setRightStripDrawable(int)
     * @see #setRightStripDrawable(Drawable)
     * @attr ref android.R.styleable#TabWidget_tabStripRight
     */
    @Nullable
    public Drawable getRightStripDrawable() {
        return mRightStrip;
    }

    /**
     * Controls whether the bottom strips on the tab indicators are drawn or
     * not.  The default is to draw them.  If the user specifies a custom