PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Sky/src/org/jsharkey/sky/InfoActivity.java

http://android-sky.googlecode.com/
Java | 51 lines | 25 code | 6 blank | 20 comment | 1 complexity | c80395e27d6f41abd2a73df3daa72821 MD5 | raw file
 1/*
 2 * Copyright (C) 2009 Jeff Sharkey, http://jsharkey.org/
 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 org.jsharkey.sky;
18
19import android.app.Activity;
20import android.os.Bundle;
21import android.view.View;
22import android.widget.Button;
23import android.widget.TextView;
24
25/**
26 * Information to tell users how to insert widgets, and credit to data sources.
27 */
28public class InfoActivity extends Activity implements View.OnClickListener {
29    @Override
30    public void onCreate(Bundle savedInstanceState) {
31        super.onCreate(savedInstanceState);
32        setContentView(R.layout.info);
33
34        // When linking text, force to always use default color. This works
35        // around a pressed color state bug.
36        TextView textView = (TextView)findViewById(R.id.info_credits);
37        int defaultColor = textView.getTextColors().getDefaultColor();
38        textView.setTextColor(defaultColor);
39
40        ((Button)findViewById(R.id.info_done)).setOnClickListener(this);
41    }
42
43    public void onClick(View v) {
44        switch (v.getId()) {
45            case R.id.info_done: {
46                finish();
47                break;
48            }
49        }
50    }
51}