Loading api/current.xml +27 −1 Original line number Diff line number Diff line Loading @@ -181308,6 +181308,32 @@ <parameter name="object" type="T"> </parameter> </method> <method name="addAll" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="collection" type="java.util.Collection<? extends T>"> </parameter> </method> <method name="addAll" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="items" type="T..."> </parameter> </method> <method name="clear" return="void" abstract="false" Loading Loading @@ -197251,7 +197277,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface> core/java/android/widget/ArrayAdapter.java +41 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.view.ViewGroup; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Comparator; import java.util.Collections; Loading Loading @@ -180,6 +181,44 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable { } } /** * Adds the specified Collection at the end of the array. * * @param collection The Collection to add at the end of the array. */ public void addAll(Collection<? extends T> collection) { if (mOriginalValues != null) { synchronized (mLock) { mOriginalValues.addAll(collection); if (mNotifyOnChange) notifyDataSetChanged(); } } else { mObjects.addAll(collection); if (mNotifyOnChange) notifyDataSetChanged(); } } /** * Adds the specified items at the end of the array. * * @param items The items to add at the end of the array. */ public void addAll(T ... items) { if (mOriginalValues != null) { synchronized (mLock) { for (T item : items) { mOriginalValues.add(item); } if (mNotifyOnChange) notifyDataSetChanged(); } } else { for (T item : items) { mObjects.add(item); } if (mNotifyOnChange) notifyDataSetChanged(); } } /** * Inserts the specified object at the specified index in the array. * Loading Loading
api/current.xml +27 −1 Original line number Diff line number Diff line Loading @@ -181308,6 +181308,32 @@ <parameter name="object" type="T"> </parameter> </method> <method name="addAll" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="collection" type="java.util.Collection<? extends T>"> </parameter> </method> <method name="addAll" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="items" type="T..."> </parameter> </method> <method name="clear" return="void" abstract="false" Loading Loading @@ -197251,7 +197277,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface>
core/java/android/widget/ArrayAdapter.java +41 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.view.ViewGroup; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Comparator; import java.util.Collections; Loading Loading @@ -180,6 +181,44 @@ public class ArrayAdapter<T> extends BaseAdapter implements Filterable { } } /** * Adds the specified Collection at the end of the array. * * @param collection The Collection to add at the end of the array. */ public void addAll(Collection<? extends T> collection) { if (mOriginalValues != null) { synchronized (mLock) { mOriginalValues.addAll(collection); if (mNotifyOnChange) notifyDataSetChanged(); } } else { mObjects.addAll(collection); if (mNotifyOnChange) notifyDataSetChanged(); } } /** * Adds the specified items at the end of the array. * * @param items The items to add at the end of the array. */ public void addAll(T ... items) { if (mOriginalValues != null) { synchronized (mLock) { for (T item : items) { mOriginalValues.add(item); } if (mNotifyOnChange) notifyDataSetChanged(); } } else { for (T item : items) { mObjects.add(item); } if (mNotifyOnChange) notifyDataSetChanged(); } } /** * Inserts the specified object at the specified index in the array. * Loading