From f51d91c3ab232154b6c00d7f71377ff2421f79bf Mon Sep 17 00:00:00 2001 From: Philip Milne Date: Mon, 18 Jul 2011 16:12:19 -0700 Subject: Gather View's hierarchy notifications into methods that can easily be overidden. Also: . Remove backward compatibility Group class now that AppsCustomizePagedView has been updated. Change-Id: Ie3eabbdf57a539b28cdc3fd6d48cd984a4014960 --- core/java/android/widget/GridLayout.java | 51 +++----------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) (limited to 'core/java/android/widget') diff --git a/core/java/android/widget/GridLayout.java b/core/java/android/widget/GridLayout.java index f82c61a..6df8efb 100644 --- a/core/java/android/widget/GridLayout.java +++ b/core/java/android/widget/GridLayout.java @@ -758,38 +758,14 @@ public class GridLayout extends ViewGroup { // Add/remove @Override - public void addView(View child, int index, ViewGroup.LayoutParams params) { - super.addView(child, index, params); + protected void onViewAdded(View child) { + super.onViewAdded(child); invalidateStructure(); } @Override - public void removeView(View view) { - super.removeView(view); - invalidateStructure(); - } - - @Override - public void removeViewInLayout(View view) { - super.removeViewInLayout(view); - invalidateStructure(); - } - - @Override - public void removeViewsInLayout(int start, int count) { - super.removeViewsInLayout(start, count); - invalidateStructure(); - } - - @Override - public void removeViewAt(int index) { - super.removeViewAt(index); - invalidateStructure(); - } - - @Override - public void removeAllViews() { - super.removeAllViews(); + protected void onViewRemoved(View child) { + super.onViewRemoved(child); invalidateStructure(); } @@ -2301,25 +2277,6 @@ public class GridLayout extends ViewGroup { } /** - * Temporary backward compatibility class for Launcher - to avoid - * dependent multi-project commit. This class will be deleted after - * AppsCustomizePagedView is updated to new API. - * - * @hide - */ - @Deprecated - public static class Group extends Spec { - /** - * @deprecated Please replace with {@link #spec(int, int, Alignment)} - * @hide - */ - @Deprecated - public Group(int start, int size, Alignment alignment) { - super(start, size, alignment, UNDEFINED_FLEXIBILITY); - } - } - - /** * Return a Spec, {@code spec}, where: *