Loading api/current.txt +2 −4 Original line number Diff line number Diff line Loading @@ -44081,8 +44081,8 @@ package android.view { method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int); method public final android.view.View findViewWithTag(java.lang.Object); method public final <T extends android.view.View> T findViewById(int); method public final <T extends android.view.View> T findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int); method protected deprecated boolean fitSystemWindows(android.graphics.Rect); method public android.view.View focusSearch(int); Loading Loading @@ -49026,8 +49026,6 @@ package android.widget { method public void addHeaderView(android.view.View); method public boolean areFooterDividersEnabled(); method public boolean areHeaderDividersEnabled(); method protected android.view.View findViewTraversal(int); method protected android.view.View findViewWithTagTraversal(java.lang.Object); method public android.widget.ListAdapter getAdapter(); method public deprecated long[] getCheckItemIds(); method public android.graphics.drawable.Drawable getDivider(); api/system-current.txt +2 −4 Original line number Diff line number Diff line Loading @@ -47485,8 +47485,8 @@ package android.view { method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int); method public final android.view.View findViewWithTag(java.lang.Object); method public final <T extends android.view.View> T findViewById(int); method public final <T extends android.view.View> T findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int); method protected deprecated boolean fitSystemWindows(android.graphics.Rect); method public android.view.View focusSearch(int); Loading Loading @@ -52794,8 +52794,6 @@ package android.widget { method public void addHeaderView(android.view.View); method public boolean areFooterDividersEnabled(); method public boolean areHeaderDividersEnabled(); method protected android.view.View findViewTraversal(int); method protected android.view.View findViewWithTagTraversal(java.lang.Object); method public android.widget.ListAdapter getAdapter(); method public deprecated long[] getCheckItemIds(); method public android.graphics.drawable.Drawable getDivider(); api/test-current.txt +2 −4 Original line number Diff line number Diff line Loading @@ -44387,8 +44387,8 @@ package android.view { method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int); method public final android.view.View findViewWithTag(java.lang.Object); method public final <T extends android.view.View> T findViewById(int); method public final <T extends android.view.View> T findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int); method protected deprecated boolean fitSystemWindows(android.graphics.Rect); method public android.view.View focusSearch(int); Loading Loading @@ -49343,8 +49343,6 @@ package android.widget { method public void addHeaderView(android.view.View); method public boolean areFooterDividersEnabled(); method public boolean areHeaderDividersEnabled(); method protected android.view.View findViewTraversal(int); method protected android.view.View findViewWithTagTraversal(java.lang.Object); method public android.widget.ListAdapter getAdapter(); method public deprecated long[] getCheckItemIds(); method public android.graphics.drawable.Drawable getDivider(); core/java/android/view/View.java +22 −21 Original line number Diff line number Diff line Loading @@ -19987,38 +19987,39 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** * {@hide} * @param id the id of the view to be found * @return the view of the specified id, null if cannot be found * @hide */ protected View findViewTraversal(@IdRes int id) { protected <T extends View> T findViewTraversal(@IdRes int id) { if (id == mID) { return this; return (T) this; } return null; } /** * {@hide} * @param tag the tag of the view to be found * @return the view of specified tag, null if cannot be found * @hide */ protected View findViewWithTagTraversal(Object tag) { protected <T extends View> T findViewWithTagTraversal(Object tag) { if (tag != null && tag.equals(mTag)) { return this; return (T) this; } return null; } /** * {@hide} * @param predicate The predicate to evaluate. * @param childToSkip If not null, ignores this child during the recursive traversal. * @return The first view that matches the predicate or null. * @hide */ protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { if (predicate.apply(this)) { return this; return (T) this; } return null; } Loading @@ -20031,7 +20032,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return The view that has the given id in the hierarchy or null */ @Nullable public final View findViewById(@IdRes int id) { public final <T extends View> T findViewById(@IdRes int id) { if (id < 0) { return null; } Loading @@ -20044,11 +20045,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param accessibilityId The searched accessibility id. * @return The found view. */ final View findViewByAccessibilityId(int accessibilityId) { final <T extends View> T findViewByAccessibilityId(int accessibilityId) { if (accessibilityId < 0) { return null; } View view = findViewByAccessibilityIdTraversal(accessibilityId); T view = findViewByAccessibilityIdTraversal(accessibilityId); if (view != null) { return view.includeForAccessibility() ? view : null; } Loading @@ -20067,12 +20068,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @param accessibilityId The accessibility id. * @return The found view. * * @hide */ public View findViewByAccessibilityIdTraversal(int accessibilityId) { public <T extends View> T findViewByAccessibilityIdTraversal(int accessibilityId) { if (getAccessibilityViewId() == accessibilityId) { return this; return (T) this; } return null; } Loading @@ -20084,7 +20084,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param tag The tag to search for, using "tag.equals(getTag())". * @return The View that has the given tag in the hierarchy or null */ public final View findViewWithTag(Object tag) { public final <T extends View> T findViewWithTag(Object tag) { if (tag == null) { return null; } Loading @@ -20092,19 +20092,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** * {@hide} * Look for a child view that matches the specified predicate. * If this view matches the predicate, return this view. * * @param predicate The predicate to evaluate. * @return The first view that matches the predicate or null. * @hide */ public final View findViewByPredicate(Predicate<View> predicate) { public final <T extends View> T findViewByPredicate(Predicate<View> predicate) { return findViewByPredicateTraversal(predicate, null); } /** * {@hide} * Look for a child view that matches the specified predicate, * starting with the specified view and its descendents and then * recusively searching the ancestors and siblings of that view Loading @@ -20118,11 +20117,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param start The view to start from. * @param predicate The predicate to evaluate. * @return The first view that matches the predicate or null. * @hide */ public final View findViewByPredicateInsideOut(View start, Predicate<View> predicate) { public final <T extends View> T findViewByPredicateInsideOut( View start, Predicate<View> predicate) { View childToSkip = null; for (;;) { View view = start.findViewByPredicateTraversal(predicate, childToSkip); T view = start.findViewByPredicateTraversal(predicate, childToSkip); if (view != null || start == this) { return view; } core/java/android/view/ViewGroup.java +10 −9 Original line number Diff line number Diff line Loading @@ -4211,9 +4211,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@hide} */ @Override protected View findViewTraversal(@IdRes int id) { protected <T extends View> T findViewTraversal(@IdRes int id) { if (id == mID) { return this; return (T) this; } final View[] where = mChildren; Loading @@ -4226,7 +4226,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager v = v.findViewById(id); if (v != null) { return v; return (T) v; } } } Loading @@ -4238,9 +4238,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@hide} */ @Override protected View findViewWithTagTraversal(Object tag) { protected <T extends View> T findViewWithTagTraversal(Object tag) { if (tag != null && tag.equals(mTag)) { return this; return (T) this; } final View[] where = mChildren; Loading @@ -4253,7 +4253,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager v = v.findViewWithTag(tag); if (v != null) { return v; return (T) v; } } } Loading @@ -4265,9 +4265,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@hide} */ @Override protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { if (predicate.apply(this)) { return this; return (T) this; } final View[] where = mChildren; Loading @@ -4280,7 +4281,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager v = v.findViewByPredicate(predicate); if (v != null) { return v; return (T) v; } } } Loading Loading
api/current.txt +2 −4 Original line number Diff line number Diff line Loading @@ -44081,8 +44081,8 @@ package android.view { method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int); method public final android.view.View findViewWithTag(java.lang.Object); method public final <T extends android.view.View> T findViewById(int); method public final <T extends android.view.View> T findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int); method protected deprecated boolean fitSystemWindows(android.graphics.Rect); method public android.view.View focusSearch(int); Loading Loading @@ -49026,8 +49026,6 @@ package android.widget { method public void addHeaderView(android.view.View); method public boolean areFooterDividersEnabled(); method public boolean areHeaderDividersEnabled(); method protected android.view.View findViewTraversal(int); method protected android.view.View findViewWithTagTraversal(java.lang.Object); method public android.widget.ListAdapter getAdapter(); method public deprecated long[] getCheckItemIds(); method public android.graphics.drawable.Drawable getDivider();
api/system-current.txt +2 −4 Original line number Diff line number Diff line Loading @@ -47485,8 +47485,8 @@ package android.view { method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int); method public final android.view.View findViewWithTag(java.lang.Object); method public final <T extends android.view.View> T findViewById(int); method public final <T extends android.view.View> T findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int); method protected deprecated boolean fitSystemWindows(android.graphics.Rect); method public android.view.View focusSearch(int); Loading Loading @@ -52794,8 +52794,6 @@ package android.widget { method public void addHeaderView(android.view.View); method public boolean areFooterDividersEnabled(); method public boolean areHeaderDividersEnabled(); method protected android.view.View findViewTraversal(int); method protected android.view.View findViewWithTagTraversal(java.lang.Object); method public android.widget.ListAdapter getAdapter(); method public deprecated long[] getCheckItemIds(); method public android.graphics.drawable.Drawable getDivider();
api/test-current.txt +2 −4 Original line number Diff line number Diff line Loading @@ -44387,8 +44387,8 @@ package android.view { method public void drawableHotspotChanged(float, float); method protected void drawableStateChanged(); method public android.view.View findFocus(); method public final android.view.View findViewById(int); method public final android.view.View findViewWithTag(java.lang.Object); method public final <T extends android.view.View> T findViewById(int); method public final <T extends android.view.View> T findViewWithTag(java.lang.Object); method public void findViewsWithText(java.util.ArrayList<android.view.View>, java.lang.CharSequence, int); method protected deprecated boolean fitSystemWindows(android.graphics.Rect); method public android.view.View focusSearch(int); Loading Loading @@ -49343,8 +49343,6 @@ package android.widget { method public void addHeaderView(android.view.View); method public boolean areFooterDividersEnabled(); method public boolean areHeaderDividersEnabled(); method protected android.view.View findViewTraversal(int); method protected android.view.View findViewWithTagTraversal(java.lang.Object); method public android.widget.ListAdapter getAdapter(); method public deprecated long[] getCheckItemIds(); method public android.graphics.drawable.Drawable getDivider();
core/java/android/view/View.java +22 −21 Original line number Diff line number Diff line Loading @@ -19987,38 +19987,39 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** * {@hide} * @param id the id of the view to be found * @return the view of the specified id, null if cannot be found * @hide */ protected View findViewTraversal(@IdRes int id) { protected <T extends View> T findViewTraversal(@IdRes int id) { if (id == mID) { return this; return (T) this; } return null; } /** * {@hide} * @param tag the tag of the view to be found * @return the view of specified tag, null if cannot be found * @hide */ protected View findViewWithTagTraversal(Object tag) { protected <T extends View> T findViewWithTagTraversal(Object tag) { if (tag != null && tag.equals(mTag)) { return this; return (T) this; } return null; } /** * {@hide} * @param predicate The predicate to evaluate. * @param childToSkip If not null, ignores this child during the recursive traversal. * @return The first view that matches the predicate or null. * @hide */ protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { if (predicate.apply(this)) { return this; return (T) this; } return null; } Loading @@ -20031,7 +20032,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return The view that has the given id in the hierarchy or null */ @Nullable public final View findViewById(@IdRes int id) { public final <T extends View> T findViewById(@IdRes int id) { if (id < 0) { return null; } Loading @@ -20044,11 +20045,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param accessibilityId The searched accessibility id. * @return The found view. */ final View findViewByAccessibilityId(int accessibilityId) { final <T extends View> T findViewByAccessibilityId(int accessibilityId) { if (accessibilityId < 0) { return null; } View view = findViewByAccessibilityIdTraversal(accessibilityId); T view = findViewByAccessibilityIdTraversal(accessibilityId); if (view != null) { return view.includeForAccessibility() ? view : null; } Loading @@ -20067,12 +20068,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @param accessibilityId The accessibility id. * @return The found view. * * @hide */ public View findViewByAccessibilityIdTraversal(int accessibilityId) { public <T extends View> T findViewByAccessibilityIdTraversal(int accessibilityId) { if (getAccessibilityViewId() == accessibilityId) { return this; return (T) this; } return null; } Loading @@ -20084,7 +20084,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param tag The tag to search for, using "tag.equals(getTag())". * @return The View that has the given tag in the hierarchy or null */ public final View findViewWithTag(Object tag) { public final <T extends View> T findViewWithTag(Object tag) { if (tag == null) { return null; } Loading @@ -20092,19 +20092,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** * {@hide} * Look for a child view that matches the specified predicate. * If this view matches the predicate, return this view. * * @param predicate The predicate to evaluate. * @return The first view that matches the predicate or null. * @hide */ public final View findViewByPredicate(Predicate<View> predicate) { public final <T extends View> T findViewByPredicate(Predicate<View> predicate) { return findViewByPredicateTraversal(predicate, null); } /** * {@hide} * Look for a child view that matches the specified predicate, * starting with the specified view and its descendents and then * recusively searching the ancestors and siblings of that view Loading @@ -20118,11 +20117,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param start The view to start from. * @param predicate The predicate to evaluate. * @return The first view that matches the predicate or null. * @hide */ public final View findViewByPredicateInsideOut(View start, Predicate<View> predicate) { public final <T extends View> T findViewByPredicateInsideOut( View start, Predicate<View> predicate) { View childToSkip = null; for (;;) { View view = start.findViewByPredicateTraversal(predicate, childToSkip); T view = start.findViewByPredicateTraversal(predicate, childToSkip); if (view != null || start == this) { return view; }
core/java/android/view/ViewGroup.java +10 −9 Original line number Diff line number Diff line Loading @@ -4211,9 +4211,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@hide} */ @Override protected View findViewTraversal(@IdRes int id) { protected <T extends View> T findViewTraversal(@IdRes int id) { if (id == mID) { return this; return (T) this; } final View[] where = mChildren; Loading @@ -4226,7 +4226,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager v = v.findViewById(id); if (v != null) { return v; return (T) v; } } } Loading @@ -4238,9 +4238,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@hide} */ @Override protected View findViewWithTagTraversal(Object tag) { protected <T extends View> T findViewWithTagTraversal(Object tag) { if (tag != null && tag.equals(mTag)) { return this; return (T) this; } final View[] where = mChildren; Loading @@ -4253,7 +4253,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager v = v.findViewWithTag(tag); if (v != null) { return v; return (T) v; } } } Loading @@ -4265,9 +4265,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@hide} */ @Override protected View findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { protected <T extends View> T findViewByPredicateTraversal(Predicate<View> predicate, View childToSkip) { if (predicate.apply(this)) { return this; return (T) this; } final View[] where = mChildren; Loading @@ -4280,7 +4281,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager v = v.findViewByPredicate(predicate); if (v != null) { return v; return (T) v; } } } Loading