Home | History | Annotate | Download | only in miscsamples
      1 /*
      2  * Copyright (C) 2008 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.example.android.rs.miscsamples;
     18 
     19 import android.app.Activity;
     20 import android.os.Bundle;
     21 
     22 public class RsRenderStates extends Activity {
     23 
     24     private RsRenderStatesView mView;
     25 
     26     @Override
     27     public void onCreate(Bundle icicle) {
     28         super.onCreate(icicle);
     29 
     30         // Create our Preview view and set it as the content of our
     31         // Activity
     32         mView = new RsRenderStatesView(this);
     33         setContentView(mView);
     34     }
     35 
     36     @Override
     37     protected void onResume() {
     38         // Ideally a game should implement onResume() and onPause()
     39         // to take appropriate action when the activity looses focus
     40         super.onResume();
     41         mView.resume();
     42     }
     43 
     44     @Override
     45     protected void onPause() {
     46         // Ideally a game should implement onResume() and onPause()
     47         // to take appropriate action when the activity looses focus
     48         super.onPause();
     49         mView.pause();
     50     }
     51 
     52 }
     53 
     54