Add favorite
This commit is contained in:
1 parent
59c14245ee
commit
ee7a3ac3b3
15 files changed
+855
-159
No files matched your search
@@ -35,6 +35,8 @@ public class SceneView extends AbsoluteLayout {
|
||||
private float mStartX = -1f;
|
||||
private float mStartY = -1f;
|
||||
|
||||
private Scene mScene;
|
||||
|
||||
public SceneView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
@@ -55,6 +57,29 @@ public class SceneView extends AbsoluteLayout {
|
||||
mPath = new Path();
|
||||
}
|
||||
|
||||
public void setScene(Scene scene) {
|
||||
mScene = scene;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
|
||||
if (mScene != null) {
|
||||
mScene.onAttachedToWindow();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
|
||||
if (mScene != null) {
|
||||
mScene.onDetachedFromeWindow();
|
||||
mScene = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setEnableTouch(boolean enableTouch) {
|
||||
mEnableTouch = enableTouch;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user