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

Commit 433cb1d4 authored by Ember Rose's avatar Ember Rose
Browse files

Improve widget getters

Add range annotations to ToggleButton#getDisableAlpha() and
ViewFlipper#getFlipInterval().

Rename AbsListView#getDrawSelectorOnTop() to #isDrawSelectorOnTop()

Test: m framework
Change-Id: Ieda5b45d10677a9be19a4fc61e8e25d491633428
Fix: 126391791
parent b1011334
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -54947,7 +54947,6 @@ package android.widget {
    method public int getCheckedItemPosition();
    method public android.util.SparseBooleanArray getCheckedItemPositions();
    method public int getChoiceMode();
    method public boolean getDrawSelectorOnTop();
    method public int getListPaddingBottom();
    method public int getListPaddingLeft();
    method public int getListPaddingRight();
@@ -54960,6 +54959,7 @@ package android.widget {
    method protected void handleDataChanged();
    method public boolean hasTextFilter();
    method public void invalidateViews();
    method public boolean isDrawSelectorOnTop();
    method public boolean isFastScrollAlwaysVisible();
    method @android.view.ViewDebug.ExportedProperty public boolean isFastScrollEnabled();
    method protected boolean isInFilterMode();
@@ -57548,7 +57548,7 @@ package android.widget {
    ctor public ToggleButton(android.content.Context, android.util.AttributeSet, int);
    ctor public ToggleButton(android.content.Context, android.util.AttributeSet);
    ctor public ToggleButton(android.content.Context);
    method public float getDisabledAlpha();
    method @FloatRange(from=0.0, to=1.0) public float getDisabledAlpha();
    method public CharSequence getTextOff();
    method public CharSequence getTextOn();
    method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
@@ -57709,11 +57709,11 @@ package android.widget {
  @android.widget.RemoteViews.RemoteView public class ViewFlipper extends android.widget.ViewAnimator {
    ctor public ViewFlipper(android.content.Context);
    ctor public ViewFlipper(android.content.Context, android.util.AttributeSet);
    method public int getFlipInterval();
    method @IntRange(from=0) public int getFlipInterval();
    method public boolean isAutoStart();
    method public boolean isFlipping();
    method public void setAutoStart(boolean);
    method public void setFlipInterval(int);
    method public void setFlipInterval(@IntRange(from=0) int);
    method public void startFlipping();
    method public void stopFlipping();
  }
+1 −1
Original line number Diff line number Diff line
@@ -2821,7 +2821,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @attr ref android.R.styleable#AbsListView_drawSelectorOnTop
     */
    @InspectableProperty
    public boolean getDrawSelectorOnTop() {
    public boolean isDrawSelectorOnTop() {
        return mDrawSelectorOnTop;
    }

+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.widget;

import android.annotation.FloatRange;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
@@ -129,6 +130,7 @@ public class ToggleButton extends CompoundButton {
     * @return the alpha value, 0.0-1.0
     */
    @InspectableProperty
    @FloatRange(from = 0.0, to = 1.0)
    public float getDisabledAlpha() {
        return mDisabledAlpha;
    }
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.widget;

import android.annotation.IntRange;
import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -130,7 +131,7 @@ public class ViewFlipper extends ViewAnimator {
     *            time in milliseconds
     */
    @android.view.RemotableViewMethod
    public void setFlipInterval(int milliseconds) {
    public void setFlipInterval(@IntRange(from = 0) int milliseconds) {
        mFlipInterval = milliseconds;
    }

@@ -140,6 +141,7 @@ public class ViewFlipper extends ViewAnimator {
     * @return delay time in milliseconds
     */
    @InspectableProperty
    @IntRange(from = 0)
    public int getFlipInterval() {
        return mFlipInterval;
    }