RsList.java revision e5f2f66f8c802d64ecf869081036ae13d4e9e19c
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
17package com.example.android.rs.miscsamples;
18
19import android.app.Activity;
20import android.os.Bundle;
21
22public class RsList extends Activity {
23
24    private RsListView 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 RsListView(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 loses 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 loses focus
48        super.onPause();
49        mView.pause();
50    }
51
52}
53
54