Android控件(View)之TextView, Button, ImageButton, ImageView, CheckBox
2010-09-27 02:07:00 来源:WEB开发网analogclock.xml
代码
< ?xml version="1.0" encoding="utf-8"?>
< LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
< !--
AnalogClock - 钟表(带表盘的那种)控件
-->
< AnalogClock android:id="@+id/analogClock"
android:layout_width="wrap_content" android:layout_height="wrap_content">
< /AnalogClock>
< /LinearLayout>
_AnalogClock.java
代码
package com.webabcd.view;
import android.app.Activity;
import android.os.Bundle;
public class _AnalogClock extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
this.setContentView(R.layout.analogclcok);
setTitle("AnalogClock");
}
}
8、DigitalClock 的 Demo
digitalclock.xml
代码
< ?xml version="1.0" encoding="utf-8"?>
< LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
< !--
DigitalClock - 电子表控件
-->
< DigitalClock android:id="@+id/digitalClock"
android:layout_width="wrap_content" android:layout_height="wrap_content">
< /DigitalClock>
< /LinearLayout>
_DigitalClock.java
代码
package com.webabcd.view;
import android.app.Activity;
import android.os.Bundle;
public class _DigitalClock extends Activity {
更多精彩
赞助商链接