summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/view/BasePieView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/view/BasePieView.java')
-rw-r--r--src/com/android/browser/view/BasePieView.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/browser/view/BasePieView.java b/src/com/android/browser/view/BasePieView.java
index 515545a..2120215 100644
--- a/src/com/android/browser/view/BasePieView.java
+++ b/src/com/android/browser/view/BasePieView.java
@@ -33,6 +33,8 @@ public abstract class BasePieView implements PieMenu.PieView {
private DataSetObserver mObserver;
protected ArrayList<View> mViews;
+ protected OnLayoutListener mListener;
+
protected int mCurrent;
protected int mChildWidth;
protected int mChildHeight;
@@ -44,6 +46,10 @@ public abstract class BasePieView implements PieMenu.PieView {
public BasePieView() {
}
+ public void setLayoutListener(OnLayoutListener l) {
+ mListener = l;
+ }
+
public void setAdapter(Adapter adapter) {
mAdapter = adapter;
if (adapter == null) {
@@ -103,7 +109,12 @@ public abstract class BasePieView implements PieMenu.PieView {
* needs to set top, left, width, height
*/
@Override
- public abstract void layout(int anchorX, int anchorY, boolean left);
+ public void layout(int anchorX, int anchorY, boolean left) {
+ if (mListener != null) {
+ mListener.onLayout(anchorX, anchorY, left);
+ }
+ }
+
@Override
public abstract void draw(Canvas canvas);