Revision a4d59c0b
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldActivity.java | ||
---|---|---|
37 | 37 |
super.onCreate(savedState); |
38 | 38 |
setContentView(R.layout.aroundtheworldlayout); |
39 | 39 |
|
40 |
AroundTheWorldSurfaceView view = (AroundTheWorldSurfaceView) this.findViewById(R.id.aroundTheWorldSurfaceView);
|
|
41 |
AroundTheWorldSurfaceViewPicker pick = (AroundTheWorldSurfaceViewPicker) this.findViewById(R.id.aroundTheWorldSurfaceViewPicker);
|
|
40 |
AroundTheWorldSurfaceView view = findViewById(R.id.aroundTheWorldSurfaceView); |
|
41 |
AroundTheWorldSurfaceViewPicker pick = findViewById(R.id.aroundTheWorldSurfaceViewPicker); |
|
42 | 42 |
AroundTheWorldEffectsManager mana = view.getManager(); |
43 | 43 |
AroundTheWorldRendererPicker renp = pick.getRenderer(); |
44 | 44 |
|
... | ... | |
56 | 56 |
@Override |
57 | 57 |
protected void onPause() |
58 | 58 |
{ |
59 |
AroundTheWorldSurfaceView view = (AroundTheWorldSurfaceView) this.findViewById(R.id.aroundTheWorldSurfaceView);
|
|
59 |
AroundTheWorldSurfaceView view = findViewById(R.id.aroundTheWorldSurfaceView); |
|
60 | 60 |
view.onPause(); |
61 | 61 |
Distorted.onPause(); |
62 | 62 |
super.onPause(); |
... | ... | |
69 | 69 |
{ |
70 | 70 |
super.onResume(); |
71 | 71 |
|
72 |
AroundTheWorldSurfaceView view = (AroundTheWorldSurfaceView) this.findViewById(R.id.aroundTheWorldSurfaceView);
|
|
72 |
AroundTheWorldSurfaceView view = findViewById(R.id.aroundTheWorldSurfaceView); |
|
73 | 73 |
view.onResume(); |
74 | 74 |
} |
75 | 75 |
|
... | ... | |
89 | 89 |
{ |
90 | 90 |
super.onSaveInstanceState(savedInstanceState); |
91 | 91 |
|
92 |
AroundTheWorldSurfaceViewPicker pick = (AroundTheWorldSurfaceViewPicker) this.findViewById(R.id.aroundTheWorldSurfaceViewPicker);
|
|
92 |
AroundTheWorldSurfaceViewPicker pick = findViewById(R.id.aroundTheWorldSurfaceViewPicker); |
|
93 | 93 |
|
94 | 94 |
savedInstanceState.putFloat("x", pick.getx() ); |
95 | 95 |
savedInstanceState.putFloat("y", pick.gety() ); |
... | ... | |
102 | 102 |
{ |
103 | 103 |
super.onRestoreInstanceState(savedInstanceState); |
104 | 104 |
|
105 |
AroundTheWorldSurfaceViewPicker pick = (AroundTheWorldSurfaceViewPicker) this.findViewById(R.id.aroundTheWorldSurfaceViewPicker);
|
|
105 |
AroundTheWorldSurfaceViewPicker pick = findViewById(R.id.aroundTheWorldSurfaceViewPicker); |
|
106 | 106 |
|
107 | 107 |
float x = savedInstanceState.getFloat("x"); |
108 | 108 |
float y = savedInstanceState.getFloat("y"); |
Also available in: Unified diff
Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).