Revision 77e66c58
Added by Leszek Koltunski 11 months ago
src/main/java/org/distorted/examples/projection/ProjectionActivity.java | ||
---|---|---|
99 | 99 |
|
100 | 100 |
public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) |
101 | 101 |
{ |
102 |
float ret;
|
|
103 |
ProjectionSurfaceView view = findViewById(R.id.surfaceViewProjection);
|
|
104 |
ProjectionRenderer renderer = view.getRenderer();
|
|
102 |
ProjectionSurfaceView v = findViewById(R.id.surfaceViewProjection);
|
|
103 |
ProjectionRenderer r = v.getRenderer();
|
|
104 |
int id = bar.getId();
|
|
105 | 105 |
|
106 |
switch (bar.getId())
|
|
106 |
if( id == R.id.projectionSeekFOV )
|
|
107 | 107 |
{ |
108 |
case R.id.projectionSeekFOV : ret = renderer.setFOV(progress); |
|
109 |
textF.setText(getString(R.string.fov_placeholder,(int)ret)); |
|
110 |
break; |
|
111 |
case R.id.projectionSeekNear: ret = renderer.setNear(progress); |
|
112 |
textN.setText(getString(R.string.near_placeholder,ret)); |
|
113 |
break; |
|
108 |
float ret = r.setFOV(progress); |
|
109 |
textF.setText(getString(R.string.fov_placeholder,(int)ret)); |
|
110 |
} |
|
111 |
if( id == R.id.projectionSeekNear) |
|
112 |
{ |
|
113 |
float ret = r.setNear(progress); |
|
114 |
textN.setText(getString(R.string.near_placeholder,ret)); |
|
114 | 115 |
} |
115 | 116 |
} |
116 | 117 |
|
Also available in: Unified diff
in API 34 R.id. things are no loger constants and cannot be used in switches.