Android UI教程 - Android模拟锁
Android UI教程 - Android模拟锁
Android中的模拟时钟是一个双手时钟,用一只手的小时指示器和另一方面为分钟指示器。
该控件仅用于显示当前时间。
例子
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<AnalogClock
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Java代码
package com.java2s.app;
//from www . j a v a2 s . c o m
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}