Project

General

Profile

Download (3.45 KB) Statistics
| Branch: | Revision:

examples / src / main / java / org / distorted / examples / olimpic / OlimpicActivity.java @ 722c6ed3

1 bc0a685b Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2016 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Distorted.                                                               //
5
//                                                                                               //
6
// Distorted is free software: you can redistribute it and/or modify                             //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Distorted is distributed in the hope that it will be useful,                                  //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19 427ab7bf Leszek Koltunski
20 5068fa06 Leszek Koltunski
package org.distorted.examples.olimpic;
21 427ab7bf Leszek Koltunski
22 722c6ed3 Leszek Koltunski
import org.distorted.examples.R;
23 5068fa06 Leszek Koltunski
import org.distorted.library.Distorted;
24 427ab7bf Leszek Koltunski
25
import android.app.Activity;
26 722c6ed3 Leszek Koltunski
import android.opengl.GLSurfaceView;
27 427ab7bf Leszek Koltunski
import android.os.Bundle;
28 722c6ed3 Leszek Koltunski
import android.widget.TextView;
29 427ab7bf Leszek Koltunski
30
///////////////////////////////////////////////////////////////////////////////////////////////////
31
32
public class OlimpicActivity extends Activity 
33
{
34 722c6ed3 Leszek Koltunski
    private TextView mText;
35 427ab7bf Leszek Koltunski
36
///////////////////////////////////////////////////////////////////////////////////////////////////
37 722c6ed3 Leszek Koltunski
38
    void setText(String text)
39
      {
40
      mText.setText(text);
41
      }
42
43
///////////////////////////////////////////////////////////////////////////////////////////////////
44
45 427ab7bf Leszek Koltunski
    @Override
46
    protected void onCreate(Bundle icicle) 
47
      {
48
      super.onCreate(icicle);
49 722c6ed3 Leszek Koltunski
      setContentView(R.layout.olimpiclayout);
50
      mText = (TextView)findViewById(R.id.olimpicText);
51 427ab7bf Leszek Koltunski
      }
52
53
///////////////////////////////////////////////////////////////////////////////////////////////////
54
    
55
    @Override
56
    protected void onPause() 
57
      {
58 722c6ed3 Leszek Koltunski
      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.olimpicSurfaceView);
59
      view.onPause();
60 427ab7bf Leszek Koltunski
      super.onPause();
61
      }
62
63
///////////////////////////////////////////////////////////////////////////////////////////////////
64
    
65
    @Override
66
    protected void onResume() 
67
      {
68
      super.onResume();
69 722c6ed3 Leszek Koltunski
      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.olimpicSurfaceView);
70
      view.onResume();
71 427ab7bf Leszek Koltunski
      }
72
 
73
///////////////////////////////////////////////////////////////////////////////////////////////////
74
    
75
    @Override
76
    protected void onDestroy() 
77
      {
78
      Distorted.onDestroy();  
79
      super.onDestroy();
80
      }    
81
}