标签:imp intent blank pack mat ica gets eth rri
java.lang.Object;
android.view.View;
android.widget.TextView;
android.widget.DigitalClock;
完整project:http://download.csdn.net/detail/sweetloveft/9413393
仅仅须要在 XML 里面贴图即可了!注意高版本号中使用 TextClock 替代
package com.sweetlover.activity; import com.sweetlover.digitalclockdemo.R; import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
<?xml version="1.0" encoding="utf-8"?
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="30dp" android:orientation="vertical" > <DigitalClock android:id="@+id/digitalClock1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textSize="30sp" /> </LinearLayout>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sweetlover.digitalclockdemo" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.sweetlover.activity.MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest>
标签:imp intent blank pack mat ica gets eth rri
原文地址:http://www.cnblogs.com/cynchanpin/p/7081528.html