diff options
| author | Romain Guy <romainguy@google.com> | 2012-10-31 20:35:07 -0700 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2012-10-31 20:35:07 -0700 |
| commit | a161dd29940e7d930dc7d83a27a845e9750c3be2 (patch) | |
| tree | 1aa41c0b6f92a5c5771cc0e6a65782a1c95b4b44 /samples/ApiDemos/src/com/example/android/apis/view/TextClockDemo.java | |
| parent | b7e8a4ecb1b5f5a46e8e5c42c29425bbb16fc2fc (diff) | |
Add sample code for the new widget android.widget.TextClock
Change-Id: I0b65fcc35db8d9f15d9b7c4ada0658d806a601b8
Diffstat (limited to 'samples/ApiDemos/src/com/example/android/apis/view/TextClockDemo.java')
| -rw-r--r-- | samples/ApiDemos/src/com/example/android/apis/view/TextClockDemo.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/samples/ApiDemos/src/com/example/android/apis/view/TextClockDemo.java b/samples/ApiDemos/src/com/example/android/apis/view/TextClockDemo.java new file mode 100644 index 000000000..f2b85cedc --- /dev/null +++ b/samples/ApiDemos/src/com/example/android/apis/view/TextClockDemo.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.android.apis.view; + +// Need the following import to get access to the app resources, since this +// class is in a sub-package. +import android.text.Html; +import android.widget.TextClock; +import com.example.android.apis.R; + +import android.app.Activity; +import android.os.Bundle; + +/** + * Variants of {@link TextClock}. + */ +public class TextClockDemo extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.textclock); + } +} |
