Project

General

Profile

« Previous | Next » 

Revision d84f5b73

Added by Leszek Koltunski over 5 years ago

Minor improvement to the Dynamic app

View differences:

src/main/java/org/distorted/examples/dynamic/DynamicActivity.java
164 164
      view.addPoint(x,y);
165 165
      }
166 166

  
167
///////////////////////////////////////////////////////////////////////////////////////////////////
168

  
169
    void clearPoints()
170
      {
171
      DynamicSpeedSurfaceView view = findViewById(R.id.dynamicSpeedSurfaceView);
172
      view.clearPoints();
173
      }
174

  
167 175
///////////////////////////////////////////////////////////////////////////////////////////////////
168 176

  
169 177
    public void setDim(int dim)
......
199 207

  
200 208
    public void Reset(View v)
201 209
      {
202
      DynamicSurfaceView v1 = findViewById(R.id.dynamicSurfaceView);
203
      v1.resetPoints();
204
      v1.stopDynamic();
205
      DynamicSpeedSurfaceView v2 = findViewById(R.id.dynamicSpeedSurfaceView);
206
      v2.clearPoints();
210
      DynamicSurfaceView view = findViewById(R.id.dynamicSurfaceView);
211
      view.resetPoints();
212
      view.stopDynamic();
207 213
      }
208 214

  
209 215
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/examples/dynamic/DynamicSurfaceView.java
297 297
          case DIM_3DXZ: di3D.removeAll(); break;
298 298
          }
299 299

  
300
        mAct.get().setNumRedPoints(0);
300
        DynamicActivity act = mAct.get();
301
        act.setNumRedPoints(0);
302
        act.clearPoints();
301 303
        }
302 304
      }
303 305

  

Also available in: Unified diff