diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/widget/AdapterView.java | 7 | ||||
| -rw-r--r-- | core/java/android/widget/FrameLayout.java | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index 9b977fa..72cb0b5 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -16,6 +16,7 @@ package android.widget; +import android.annotation.Nullable; import android.content.Context; import android.database.DataSetObserver; import android.os.Parcelable; @@ -276,7 +277,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { * * @param listener The callback that will be invoked. */ - public void setOnItemClickListener(OnItemClickListener listener) { + public void setOnItemClickListener(@Nullable OnItemClickListener listener) { mOnItemClickListener = listener; } @@ -284,6 +285,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { * @return The callback to be invoked with an item in this AdapterView has * been clicked, or null id no callback has been set. */ + @Nullable public final OnItemClickListener getOnItemClickListener() { return mOnItemClickListener; } @@ -394,10 +396,11 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { * * @param listener The callback that will run */ - public void setOnItemSelectedListener(OnItemSelectedListener listener) { + public void setOnItemSelectedListener(@Nullable OnItemSelectedListener listener) { mOnItemSelectedListener = listener; } + @Nullable public final OnItemSelectedListener getOnItemSelectedListener() { return mOnItemSelectedListener; } diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java index 57bbc42..dde8604 100644 --- a/core/java/android/widget/FrameLayout.java +++ b/core/java/android/widget/FrameLayout.java @@ -104,15 +104,16 @@ public class FrameLayout extends ViewGroup { super(context); } - public FrameLayout(Context context, AttributeSet attrs) { + public FrameLayout(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } - public FrameLayout(Context context, AttributeSet attrs, int defStyleAttr) { + public FrameLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { this(context, attrs, defStyleAttr, 0); } - public FrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + public FrameLayout( + Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); final TypedArray a = context.obtainStyledAttributes( |
