Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -24730,6 +24730,7 @@ package android.widget { method public void beforeTextChanged(java.lang.CharSequence, int, int, int); method public void clearChoices(); method public void clearTextFilter(); method public void deferNotifyDataSetChanged(); method public int getCacheColorHint(); method public int getCheckedItemCount(); method public long[] getCheckedItemIds(); Loading Loading @@ -24945,6 +24946,7 @@ package android.widget { ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet); ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet, int); method public void advance(); method public void deferNotifyDataSetChanged(); method public void fyiWillBeAdvancedByHostKThx(); method public android.widget.Adapter getAdapter(); method public android.view.View getCurrentView(); core/java/android/appwidget/AppWidgetHostView.java +6 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.widget.BaseAdapter; import android.widget.FrameLayout; import android.widget.RemoteViews; import android.widget.TextView; import android.widget.RemoteViewsAdapter.RemoteAdapterConnectionCallback; /** * Provides the glue to show AppWidget views. This class offers automatic animation Loading Loading @@ -276,6 +277,11 @@ public class AppWidgetHostView extends FrameLayout { if (adapter instanceof BaseAdapter) { BaseAdapter baseAdapter = (BaseAdapter) adapter; baseAdapter.notifyDataSetChanged(); } else if (adapter == null && adapterView instanceof RemoteAdapterConnectionCallback) { // If the adapter is null, it may mean that the RemoteViewsAapter has not yet // connected to its associated service, and hence the adapter hasn't been set. // In this case, we need to defer the notify call until it has been set. ((RemoteAdapterConnectionCallback) adapterView).deferNotifyDataSetChanged(); } } } Loading core/java/android/widget/AbsListView.java +18 −1 Original line number Diff line number Diff line Loading @@ -260,6 +260,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te */ private RemoteViewsAdapter mRemoteAdapter; /** * This flag indicates the a full notify is required when the RemoteViewsAdapter connects */ private boolean mDeferNotifyDataSetChanged = false; /** * Indicates whether the list selector should be drawn on top of the children or behind */ Loading Loading @@ -5392,17 +5397,29 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te return; } } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteAdapter = new RemoteViewsAdapter(getContext(), intent, this); } /** * This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not * connected yet. */ public void deferNotifyDataSetChanged() { mDeferNotifyDataSetChanged = true; } /** * Called back when the adapter connects to the RemoteViewsService. */ public boolean onRemoteAdapterConnected() { if (mRemoteAdapter != mAdapter) { setAdapter(mRemoteAdapter); if (mDeferNotifyDataSetChanged) { mRemoteAdapter.notifyDataSetChanged(); mDeferNotifyDataSetChanged = false; } return false; } else if (mRemoteAdapter != null) { mRemoteAdapter.superNotifyDataSetChanged(); Loading core/java/android/widget/AdapterViewAnimator.java +22 −5 Original line number Diff line number Diff line Loading @@ -16,16 +16,12 @@ package android.widget; import java.util.ArrayList; import java.util.HashMap; import android.animation.AnimatorInflater; import android.animation.ObjectAnimator; import android.content.Context; import android.content.Intent; import android.content.res.TypedArray; import android.os.Handler; import android.os.Looper; import android.os.Parcel; import android.os.Parcelable; import android.util.AttributeSet; Loading @@ -34,6 +30,9 @@ import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import java.util.ArrayList; import java.util.HashMap; /** * Base class for a {@link AdapterView} that will perform animations * when switching between its views. Loading Loading @@ -117,6 +116,11 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> */ RemoteViewsAdapter mRemoteViewsAdapter; /** * The remote adapter containing the data to be displayed by this view to be set */ boolean mDeferNotifyDataSetChanged = false; /** * Specifies whether this is the first time the animator is showing views */ Loading Loading @@ -966,7 +970,7 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> return; } } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteViewsAdapter = new RemoteViewsAdapter(getContext(), intent, this); } Loading @@ -981,6 +985,14 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> return getViewAtRelativeIndex(mActiveOffset); } /** * This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not * connected yet. */ public void deferNotifyDataSetChanged() { mDeferNotifyDataSetChanged = true; } /** * Called back when the adapter connects to the RemoteViewsService. */ Loading @@ -988,6 +1000,11 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> if (mRemoteViewsAdapter != mAdapter) { setAdapter(mRemoteViewsAdapter); if (mDeferNotifyDataSetChanged) { mRemoteViewsAdapter.notifyDataSetChanged(); mDeferNotifyDataSetChanged = false; } // Restore the previous position (see onRestoreInstanceState) if (mRestoreWhichChild > -1) { setDisplayedChild(mRestoreWhichChild, false); Loading core/java/android/widget/RemoteViewsAdapter.java +6 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,12 @@ public class RemoteViewsAdapter extends BaseAdapter implements Handler.Callback public boolean onRemoteAdapterConnected(); public void onRemoteAdapterDisconnected(); /** * This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not * connected yet. */ public void deferNotifyDataSetChanged(); } /** Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -24730,6 +24730,7 @@ package android.widget { method public void beforeTextChanged(java.lang.CharSequence, int, int, int); method public void clearChoices(); method public void clearTextFilter(); method public void deferNotifyDataSetChanged(); method public int getCacheColorHint(); method public int getCheckedItemCount(); method public long[] getCheckedItemIds(); Loading Loading @@ -24945,6 +24946,7 @@ package android.widget { ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet); ctor public AdapterViewAnimator(android.content.Context, android.util.AttributeSet, int); method public void advance(); method public void deferNotifyDataSetChanged(); method public void fyiWillBeAdvancedByHostKThx(); method public android.widget.Adapter getAdapter(); method public android.view.View getCurrentView();
core/java/android/appwidget/AppWidgetHostView.java +6 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.widget.BaseAdapter; import android.widget.FrameLayout; import android.widget.RemoteViews; import android.widget.TextView; import android.widget.RemoteViewsAdapter.RemoteAdapterConnectionCallback; /** * Provides the glue to show AppWidget views. This class offers automatic animation Loading Loading @@ -276,6 +277,11 @@ public class AppWidgetHostView extends FrameLayout { if (adapter instanceof BaseAdapter) { BaseAdapter baseAdapter = (BaseAdapter) adapter; baseAdapter.notifyDataSetChanged(); } else if (adapter == null && adapterView instanceof RemoteAdapterConnectionCallback) { // If the adapter is null, it may mean that the RemoteViewsAapter has not yet // connected to its associated service, and hence the adapter hasn't been set. // In this case, we need to defer the notify call until it has been set. ((RemoteAdapterConnectionCallback) adapterView).deferNotifyDataSetChanged(); } } } Loading
core/java/android/widget/AbsListView.java +18 −1 Original line number Diff line number Diff line Loading @@ -260,6 +260,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te */ private RemoteViewsAdapter mRemoteAdapter; /** * This flag indicates the a full notify is required when the RemoteViewsAdapter connects */ private boolean mDeferNotifyDataSetChanged = false; /** * Indicates whether the list selector should be drawn on top of the children or behind */ Loading Loading @@ -5392,17 +5397,29 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te return; } } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteAdapter = new RemoteViewsAdapter(getContext(), intent, this); } /** * This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not * connected yet. */ public void deferNotifyDataSetChanged() { mDeferNotifyDataSetChanged = true; } /** * Called back when the adapter connects to the RemoteViewsService. */ public boolean onRemoteAdapterConnected() { if (mRemoteAdapter != mAdapter) { setAdapter(mRemoteAdapter); if (mDeferNotifyDataSetChanged) { mRemoteAdapter.notifyDataSetChanged(); mDeferNotifyDataSetChanged = false; } return false; } else if (mRemoteAdapter != null) { mRemoteAdapter.superNotifyDataSetChanged(); Loading
core/java/android/widget/AdapterViewAnimator.java +22 −5 Original line number Diff line number Diff line Loading @@ -16,16 +16,12 @@ package android.widget; import java.util.ArrayList; import java.util.HashMap; import android.animation.AnimatorInflater; import android.animation.ObjectAnimator; import android.content.Context; import android.content.Intent; import android.content.res.TypedArray; import android.os.Handler; import android.os.Looper; import android.os.Parcel; import android.os.Parcelable; import android.util.AttributeSet; Loading @@ -34,6 +30,9 @@ import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import java.util.ArrayList; import java.util.HashMap; /** * Base class for a {@link AdapterView} that will perform animations * when switching between its views. Loading Loading @@ -117,6 +116,11 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> */ RemoteViewsAdapter mRemoteViewsAdapter; /** * The remote adapter containing the data to be displayed by this view to be set */ boolean mDeferNotifyDataSetChanged = false; /** * Specifies whether this is the first time the animator is showing views */ Loading Loading @@ -966,7 +970,7 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> return; } } mDeferNotifyDataSetChanged = false; // Otherwise, create a new RemoteViewsAdapter for binding mRemoteViewsAdapter = new RemoteViewsAdapter(getContext(), intent, this); } Loading @@ -981,6 +985,14 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> return getViewAtRelativeIndex(mActiveOffset); } /** * This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not * connected yet. */ public void deferNotifyDataSetChanged() { mDeferNotifyDataSetChanged = true; } /** * Called back when the adapter connects to the RemoteViewsService. */ Loading @@ -988,6 +1000,11 @@ public abstract class AdapterViewAnimator extends AdapterView<Adapter> if (mRemoteViewsAdapter != mAdapter) { setAdapter(mRemoteViewsAdapter); if (mDeferNotifyDataSetChanged) { mRemoteViewsAdapter.notifyDataSetChanged(); mDeferNotifyDataSetChanged = false; } // Restore the previous position (see onRestoreInstanceState) if (mRestoreWhichChild > -1) { setDisplayedChild(mRestoreWhichChild, false); Loading
core/java/android/widget/RemoteViewsAdapter.java +6 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,12 @@ public class RemoteViewsAdapter extends BaseAdapter implements Handler.Callback public boolean onRemoteAdapterConnected(); public void onRemoteAdapterDisconnected(); /** * This defers a notifyDataSetChanged on the pending RemoteViewsAdapter if it has not * connected yet. */ public void deferNotifyDataSetChanged(); } /** Loading