summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget
diff options
context:
space:
mode:
authorPhilip Milne <pmilne@google.com>2011-07-18 16:12:19 -0700
committerPhilip Milne <pmilne@google.com>2011-07-19 09:51:56 -0700
commitf51d91c3ab232154b6c00d7f71377ff2421f79bf (patch)
tree0be7081765a23962d396638823c4b23dba264646 /core/java/android/widget
parenta97eba3d489722097412aab836babc3ddfc7a178 (diff)
downloadframeworks_base-f51d91c3ab232154b6c00d7f71377ff2421f79bf.zip
frameworks_base-f51d91c3ab232154b6c00d7f71377ff2421f79bf.tar.gz
frameworks_base-f51d91c3ab232154b6c00d7f71377ff2421f79bf.tar.bz2
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
Diffstat (limited to 'core/java/android/widget')
-rw-r--r--core/java/android/widget/GridLayout.java51
1 files changed, 4 insertions, 47 deletions
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:
* <ul>
* <li> {@code spec.span = [start, start + size]} </li>