aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java')
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java
new file mode 100644
index 000000000..14f092c81
--- /dev/null
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/CollapsibleActionViewWrapper.java
@@ -0,0 +1,30 @@
+package com.actionbarsherlock.internal.widget;
+
+import android.view.View;
+import android.widget.FrameLayout;
+import com.actionbarsherlock.view.CollapsibleActionView;
+
+/**
+ * Wraps an ABS collapsible action view in a native container that delegates the calls.
+ */
+public class CollapsibleActionViewWrapper extends FrameLayout implements android.view.CollapsibleActionView {
+ private final CollapsibleActionView child;
+
+ public CollapsibleActionViewWrapper(View child) {
+ super(child.getContext());
+ this.child = (CollapsibleActionView) child;
+ addView(child);
+ }
+
+ @Override public void onActionViewExpanded() {
+ child.onActionViewExpanded();
+ }
+
+ @Override public void onActionViewCollapsed() {
+ child.onActionViewCollapsed();
+ }
+
+ public View unwrap() {
+ return getChildAt(0);
+ }
+}