Project

General

Profile

« Previous | Next » 

Revision a9df241d

Added by Leszek Koltunski about 4 years ago

More support for using the library from more than one activity

View differences:

src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldActivity.java
35 35
    protected void onCreate(Bundle savedState)
36 36
      {
37 37
      super.onCreate(savedState);
38
      DistortedLibrary.onCreate();
39

  
38 40
      setContentView(R.layout.aroundtheworldlayout);
39 41

  
40 42
      AroundTheWorldSurfaceView       view = findViewById(R.id.aroundTheWorldSurfaceView);
src/main/java/org/distorted/examples/bean/BeanActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      mView = new BeanSurfaceView(this);
40 41
      setContentView(mView);
41 42
      }
src/main/java/org/distorted/examples/blur/BlurActivity.java
41 41
    protected void onCreate(Bundle icicle) 
42 42
      {
43 43
      super.onCreate(icicle);
44
      DistortedLibrary.onCreate();
45

  
44 46
      setContentView(R.layout.blurlayout);
45 47

  
46 48
      textBlur = findViewById(R.id.blurText);
src/main/java/org/distorted/examples/catanddog/CatAndDogActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      mView = new CatAndDogSurfaceView(this);
40 41
      setContentView(mView);
41 42
      }
src/main/java/org/distorted/examples/check/CheckActivity.java
42 42
    protected void onCreate(Bundle icicle) 
43 43
      {
44 44
      super.onCreate(icicle);
45
      DistortedLibrary.onCreate();
45 46
      setContentView(R.layout.check1layout);
46 47
       
47 48
      mVPicker = findViewById(R.id.check1NumberPickerVertex);
src/main/java/org/distorted/examples/deferredjob/DeferredJobActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      setContentView(R.layout.deferredjoblayout);
40 41
      }
41 42

  
src/main/java/org/distorted/examples/deform/DeformActivity.java
45 45
    protected void onCreate(Bundle savedState)
46 46
      {
47 47
      super.onCreate(savedState);
48
      DistortedLibrary.onCreate();
48 49
      setContentView(R.layout.deformlayout);
49 50

  
50 51
      textR = findViewById(R.id.deformTextRadius);
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      mView = new DifferentBitmapsSurfaceView(this);
40 41
      setContentView(mView);
41 42
      }
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      mView = new DifferentEffectsSurfaceView(this);
40 41
      setContentView(mView);
41 42
      }
src/main/java/org/distorted/examples/dynamic/DynamicActivity.java
51 51
    protected void onCreate(Bundle savedState)
52 52
      {
53 53
      super.onCreate(savedState);
54
      DistortedLibrary.onCreate();
54 55
      setContentView(R.layout.dynamicslayout);
55 56

  
56 57
      textDuration = findViewById(R.id.dynamicTextDuration);
......
129 130
    protected void onResume() 
130 131
      {
131 132
      super.onResume();
132
      
133

  
133 134
      GLSurfaceView v1 = findViewById(R.id.dynamicSurfaceView);
134 135
      v1.onResume();
135 136
      DynamicSpeedSurfaceView v2 = findViewById(R.id.dynamicSpeedSurfaceView);
src/main/java/org/distorted/examples/earth/EarthActivity.java
45 45
    protected void onCreate(Bundle savedState)
46 46
      {
47 47
      super.onCreate(savedState);
48

  
48
      DistortedLibrary.onCreate();
49 49
      setContentView(R.layout.earthlayout);
50 50

  
51 51
      SeekBar levelBar = findViewById(R.id.earthInflateLevel);
......
82 82
    protected void onResume() 
83 83
      {
84 84
      super.onResume();
85
      
85

  
86 86
      GLSurfaceView view = findViewById(R.id.earthSurfaceView);
87 87
      view.onResume();
88 88

  
src/main/java/org/distorted/examples/effectqueue/EffectQueueActivity.java
70 70
  protected void onCreate(Bundle savedInstanceState) 
71 71
    {
72 72
    super.onCreate(savedInstanceState);
73
 
73
    DistortedLibrary.onCreate();
74 74
    setContentView(R.layout.effectqueuelayout);
75 75

  
76 76
    mPosID   = 0;
src/main/java/org/distorted/examples/flag/FlagActivity.java
44 44
    protected void onCreate(Bundle savedState) 
45 45
      {
46 46
      super.onCreate(savedState);
47
      DistortedLibrary.onCreate();
47 48
      setContentView(R.layout.flaglayout);
48 49

  
49 50
      mNoise = new Static5D(0,0,0,0,0);
src/main/java/org/distorted/examples/generic/GenericActivity2.java
59 59
  protected void onCreate(Bundle savedState)
60 60
    {
61 61
    super.onCreate(savedState);
62

  
62
    DistortedLibrary.onCreate();
63 63
    setTheme(R.style.CustomActivityThemeNoActionBar);
64 64

  
65 65
    Bundle b = getIntent().getExtras();
src/main/java/org/distorted/examples/girl/GirlActivity.java
41 41
    protected void onCreate(Bundle icicle) 
42 42
      {
43 43
      super.onCreate(icicle);
44
      
44
      DistortedLibrary.onCreate();
45 45
      setContentView(R.layout.girllayout);
46 46
           
47 47
      textSwing = findViewById(R.id.girlTextSwing);
src/main/java/org/distorted/examples/glow/GlowActivity.java
43 43
    protected void onCreate(Bundle savedState)
44 44
      {
45 45
      super.onCreate(savedState);
46
      DistortedLibrary.onCreate();
46 47
      setContentView(R.layout.glowlayout);
47 48

  
48 49
      textRadius  = findViewById(R.id.glowTextRadius);
src/main/java/org/distorted/examples/inflate/InflateActivity2.java
51 51
    private MeshBase mMesh;
52 52
    private int mNumRows, mNumCols, mNumSlic;
53 53

  
54
///////////////////////////////////////////////////////////////////////////////////////////////////
55
    
56
    @Override
57
    protected void onPause() 
58
      {
59
      super.onPause();
60
      GLSurfaceView view = findViewById(R.id.inflateSurfaceView);
61
      view.onPause();
62
      DistortedLibrary.onPause();
63
      }
64

  
65
///////////////////////////////////////////////////////////////////////////////////////////////////
66
    
67
    @Override
68
    protected void onResume() 
69
      {
70
      super.onResume();
71
      GLSurfaceView view = findViewById(R.id.inflateSurfaceView);
72
      view.onResume();
73
      }
74
    
75
///////////////////////////////////////////////////////////////////////////////////////////////////
76
    
77
    @Override
78
    protected void onDestroy() 
79
      {
80
      DistortedLibrary.onDestroy();
81
      super.onDestroy();
82
      }
83

  
84 54
///////////////////////////////////////////////////////////////////////////////////////////////////
85 55

  
86 56
    @Override
87 57
    protected void onCreate(Bundle savedState)
88 58
      {
89 59
      super.onCreate(savedState);
90

  
60
      DistortedLibrary.onCreate();
91 61
      Bundle b = getIntent().getExtras();
92 62

  
93 63
      String str     = b.getString("string");
......
125 95
      inflateBar.setProgress(50);
126 96
      }
127 97

  
98
///////////////////////////////////////////////////////////////////////////////////////////////////
99
    
100
    @Override
101
    protected void onPause() 
102
      {
103
      super.onPause();
104
      GLSurfaceView view = findViewById(R.id.inflateSurfaceView);
105
      view.onPause();
106
      DistortedLibrary.onPause();
107
      }
108

  
109
///////////////////////////////////////////////////////////////////////////////////////////////////
110
    
111
    @Override
112
    protected void onResume() 
113
      {
114
      super.onResume();
115
      GLSurfaceView view = findViewById(R.id.inflateSurfaceView);
116
      view.onResume();
117
      }
118
    
119
///////////////////////////////////////////////////////////////////////////////////////////////////
120
    
121
    @Override
122
    protected void onDestroy() 
123
      {
124
      DistortedLibrary.onDestroy();
125
      super.onDestroy();
126
      }
127

  
128 128
///////////////////////////////////////////////////////////////////////////////////////////////////
129 129

  
130 130
    private void createBitmap(int size, int bitmapID)
src/main/java/org/distorted/examples/listener/ListenerActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      mView = new ListenerSurfaceView(this);
40 41
      setContentView(mView);
41 42
      }
src/main/java/org/distorted/examples/meshfile/MeshFileActivity.java
66 66
    protected void onCreate(Bundle icicle) 
67 67
      {
68 68
      super.onCreate(icicle);
69
      DistortedLibrary.onCreate();
69 70
      setContentView(R.layout.meshfilelayout);
70 71

  
71 72
      Spinner meshSpinner  = findViewById(R.id.meshfileSpinner);
src/main/java/org/distorted/examples/meshjoin/MeshJoinActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      setContentView(R.layout.meshjoinlayout);
40 41
      }
41 42

  
src/main/java/org/distorted/examples/mirror/MirrorActivity.java
40 40
    protected void onCreate(Bundle icicle) 
41 41
      {
42 42
      super.onCreate(icicle);
43
      DistortedLibrary.onCreate();
43 44
      setContentView(R.layout.mirrorlayout);
44 45
       
45 46
      SeekBar bar = findViewById(R.id.mirrorSeek);
src/main/java/org/distorted/examples/monalisa/MonaLisaActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      mView = new MonaLisaSurfaceView(this);
40 41
      setContentView(mView);
41 42
      }
src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
44 44
    protected void onCreate(Bundle savedState) 
45 45
      {
46 46
      super.onCreate(savedState);
47
  
47
      DistortedLibrary.onCreate();
48 48
      setContentView(R.layout.movingeffectslayout);
49 49
      
50 50
      mAbort = findViewById(R.id.movingeffectsAbort);
src/main/java/org/distorted/examples/movingglow/MovingGlowActivity.java
35 35
    protected void onCreate(Bundle savedState)
36 36
      {
37 37
      super.onCreate(savedState);
38
      DistortedLibrary.onCreate();
38 39
      mView = new MovingGlowSurfaceView(this);
39 40
      setContentView(mView);
40 41
      }
src/main/java/org/distorted/examples/multiblur/MultiblurActivity.java
45 45
    protected void onCreate(Bundle savedState) 
46 46
      {
47 47
      super.onCreate(savedState);
48
      DistortedLibrary.onCreate();
48 49
      setContentView(R.layout.multiblurlayout);
49 50

  
50 51
      SeekBar distanceBar = findViewById(R.id.multiblurDistanceSeek);
src/main/java/org/distorted/examples/objecttree/ObjectTreeActivity.java
38 38
    protected void onCreate(Bundle savedState)
39 39
      {
40 40
      super.onCreate(savedState);
41
      DistortedLibrary.onCreate();
41 42
      setContentView(R.layout.objecttreelayout);
42 43

  
43 44
      if( savedState==null )
src/main/java/org/distorted/examples/olimpic/OlimpicActivity.java
42 42
    protected void onCreate(Bundle savedState)
43 43
      {
44 44
      super.onCreate(savedState);
45
      DistortedLibrary.onCreate();
45 46
      setContentView(R.layout.olimpiclayout);
46 47
      mText = findViewById(R.id.olimpicText);
47 48

  
src/main/java/org/distorted/examples/postprocesstree/PostprocessTreeActivity.java
40 40
    protected void onCreate(Bundle savedState)
41 41
      {
42 42
      super.onCreate(savedState);
43
      DistortedLibrary.onCreate();
43 44
      setContentView(R.layout.postprocesstreelayout);
44 45
      mText = findViewById(R.id.postprocesstreeText);
45 46
      SeekBar bar = findViewById(R.id.postprocesstreeSeek);
src/main/java/org/distorted/examples/predeform/PredeformActivity2.java
49 49
    private MeshBase mMesh;
50 50
    private int mNumRows, mNumCols, mNumSlic;
51 51

  
52
///////////////////////////////////////////////////////////////////////////////////////////////////
53
    
54
    @Override
55
    protected void onPause() 
56
      {
57
      super.onPause();
58
      GLSurfaceView view = findViewById(R.id.predeformSurfaceView);
59
      view.onPause();
60
      DistortedLibrary.onPause();
61
      }
62

  
63
///////////////////////////////////////////////////////////////////////////////////////////////////
64
    
65
    @Override
66
    protected void onResume() 
67
      {
68
      super.onResume();
69
      GLSurfaceView view = findViewById(R.id.predeformSurfaceView);
70
      view.onResume();
71
      }
72
    
73
///////////////////////////////////////////////////////////////////////////////////////////////////
74
    
75
    @Override
76
    protected void onDestroy() 
77
      {
78
      DistortedLibrary.onDestroy();
79
      super.onDestroy();
80
      }
81

  
82 52
///////////////////////////////////////////////////////////////////////////////////////////////////
83 53

  
84 54
    @Override
85 55
    protected void onCreate(Bundle savedState)
86 56
      {
87 57
      super.onCreate(savedState);
88

  
58
      DistortedLibrary.onCreate();
89 59
      Bundle b = getIntent().getExtras();
90 60

  
91 61
      int objectType = b.getInt("type");
......
112 82
      inflateBar.setProgress(50);
113 83
      }
114 84

  
85
///////////////////////////////////////////////////////////////////////////////////////////////////
86
    
87
    @Override
88
    protected void onPause() 
89
      {
90
      super.onPause();
91
      GLSurfaceView view = findViewById(R.id.predeformSurfaceView);
92
      view.onPause();
93
      DistortedLibrary.onPause();
94
      }
95

  
96
///////////////////////////////////////////////////////////////////////////////////////////////////
97
    
98
    @Override
99
    protected void onResume() 
100
      {
101
      super.onResume();
102
      GLSurfaceView view = findViewById(R.id.predeformSurfaceView);
103
      view.onResume();
104
      }
105
    
106
///////////////////////////////////////////////////////////////////////////////////////////////////
107
    
108
    @Override
109
    protected void onDestroy() 
110
      {
111
      DistortedLibrary.onDestroy();
112
      super.onDestroy();
113
      }
114

  
115 115
///////////////////////////////////////////////////////////////////////////////////////////////////
116 116

  
117 117
    public void showNormal(View view)
src/main/java/org/distorted/examples/projection/ProjectionActivity.java
41 41
    protected void onCreate(Bundle savedState)
42 42
      {
43 43
      super.onCreate(savedState);
44
      DistortedLibrary.onCreate();
44 45
      setContentView(R.layout.projectionlayout);
45 46

  
46 47
      textF = findViewById(R.id.projectionTextFOV);
src/main/java/org/distorted/examples/quaternion/QuaternionActivity.java
36 36
  protected void onCreate(Bundle icicle) 
37 37
    {
38 38
    super.onCreate(icicle);
39
    DistortedLibrary.onCreate();
39 40
    mView = new QuaternionSurfaceView(this);
40 41
    setContentView(mView);     
41 42
    }
......
56 57
  protected void onResume() 
57 58
    {
58 59
    super.onResume();
59
    mView.onResume();  
60
    mView.onResume();
60 61
    }
61 62
    
62 63
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/examples/rubik/RubikActivity.java
40 40
    protected void onCreate(Bundle icicle)
41 41
      {
42 42
      super.onCreate(icicle);
43
      DistortedLibrary.onCreate();
43 44
      setContentView(R.layout.rubiklayout);
44 45

  
45 46
      mText = findViewById(R.id.rubikText);
src/main/java/org/distorted/examples/save/SaveActivity.java
62 62
  protected void onCreate(Bundle icicle) 
63 63
    {
64 64
    super.onCreate(icicle);
65
     
65
    DistortedLibrary.onCreate();
66 66
    setContentView(R.layout.savelayout);
67 67

  
68 68
    SeekBar barSize  = findViewById(R.id.saveSeekBarSize);
src/main/java/org/distorted/examples/singlemesh/SingleMeshActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      setContentView(R.layout.singlemeshlayout);
40 41
      }
41 42

  
src/main/java/org/distorted/examples/sink/SinkActivity.java
36 36
  protected void onCreate(Bundle icicle) 
37 37
    {
38 38
    super.onCreate(icicle);
39
    DistortedLibrary.onCreate();
39 40
    mView = new SinkSurfaceView(this);
40 41
    setContentView(mView);
41 42
    }
src/main/java/org/distorted/examples/starwars/StarWarsActivity.java
36 36
  protected void onCreate(Bundle icicle) 
37 37
    {
38 38
    super.onCreate(icicle);
39
    DistortedLibrary.onCreate();
39 40
    mView = new StarWarsSurfaceView(this);
40 41
    setContentView(mView);
41 42
    }
src/main/java/org/distorted/examples/stencil/StencilActivity.java
38 38
    protected void onCreate(Bundle savedState)
39 39
      {
40 40
      super.onCreate(savedState);
41
      DistortedLibrary.onCreate();
41 42
      setContentView(R.layout.stencillayout);
42 43

  
43 44
      if( savedState==null )
src/main/java/org/distorted/examples/surfaceview/SurfaceViewActivity.java
36 36
    protected void onCreate(Bundle icicle) 
37 37
      {
38 38
      super.onCreate(icicle);
39
      DistortedLibrary.onCreate();
39 40
      mView = new SurfaceViewSurfaceView(this);
40 41
      setContentView(mView);
41 42
      }
src/main/java/org/distorted/examples/transparency/TransparencyActivity.java
44 44
    protected void onCreate(Bundle savedState) 
45 45
      {
46 46
      super.onCreate(savedState);
47
      DistortedLibrary.onCreate();
47 48
      setContentView(R.layout.transparencylayout);
48 49

  
49 50
      SeekBar barRed    = findViewById(R.id.transparencySeekRed);
src/main/java/org/distorted/examples/triblur/TriblurActivity.java
55 55
    protected void onCreate(Bundle savedState) 
56 56
      {
57 57
      super.onCreate(savedState);
58
      DistortedLibrary.onCreate();
58 59
      setContentView(R.layout.triblurlayout);
59 60

  
60 61
      SeekBar radiusBar0 = findViewById(R.id.triblurSeek0);
src/main/java/org/distorted/examples/wind/WindActivity.java
40 40
    protected void onCreate(Bundle icicle) 
41 41
      {
42 42
      super.onCreate(icicle);
43
      DistortedLibrary.onCreate();
43 44
      setContentView(R.layout.windlayout);
44 45
       
45 46
      SeekBar bar = findViewById(R.id.windSeek);

Also available in: Unified diff