forked from dotnet/android-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GLCubeActivity.cs
45 lines (39 loc) · 1.09 KB
/
GLCubeActivity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using Android.App;
using Android.OS;
using Android.Util;
using Android.Views;
using Android.Widget;
using Android.Content.PM;
namespace Mono.Samples.GLCube
{
[Activity (Label = "@string/app_name", MainLauncher = true, Icon = "@drawable/app_glcube",
#if __ANDROID_11__
HardwareAccelerated=false,
#endif
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden, LaunchMode = LaunchMode.SingleTask)]
public class GLCubeActivity : Activity
{
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);
// Inflate our UI from its XML layout description
// - should match filename res/layout/main.xml ?
SetContentView (Resource.Layout.main);
// Load the view
FindViewById (Resource.Id.paintingview);
}
protected override void OnPause ()
{
base.OnPause ();
var view = FindViewById<PaintingView> (Resource.Id.paintingview);
view.Pause ();
}
protected override void OnResume ()
{
base.OnResume ();
var view = FindViewById<PaintingView> (Resource.Id.paintingview);
view.Resume ();
}
}
}