Project

General

Profile

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

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

1
///////////////////////////////////////////////////////////////////////////////////////////////////
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

    
20
package org.distorted.examples.olimpic;
21

    
22
import org.distorted.examples.R;
23
import org.distorted.library.Distorted;
24

    
25
import android.app.Activity;
26
import android.opengl.GLSurfaceView;
27
import android.os.Bundle;
28
import android.widget.TextView;
29

    
30
///////////////////////////////////////////////////////////////////////////////////////////////////
31

    
32
public class OlimpicActivity extends Activity 
33
{
34
    private TextView mText;
35

    
36
///////////////////////////////////////////////////////////////////////////////////////////////////
37

    
38
    void setText(String text)
39
      {
40
      mText.setText(text);
41
      }
42

    
43
///////////////////////////////////////////////////////////////////////////////////////////////////
44

    
45
    @Override
46
    protected void onCreate(Bundle icicle) 
47
      {
48
      super.onCreate(icicle);
49
      setContentView(R.layout.olimpiclayout);
50
      mText = (TextView)findViewById(R.id.olimpicText);
51
      }
52

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

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