直接在xml中加入analog clock和digital clock组件!

来源:互联网 发布:华为路由器 端口转发 编辑:程序博客网 时间:2024/06/07 03:42
<FrameLayout android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
            <RelativeLayout android:id="@+id/tabFirst"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="vertical">
            <AnalogClock
                android:id="@+id/widget31"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true">
            </AnalogClock>

            </RelativeLayout>>
            <RelativeLayout android:id="@+id/tabSecond"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="vertical">
                <DigitalClock
                    android:layout_centerInParent="true"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">
                </DigitalClock>

            </RelativeLayout>
        </FrameLayout>
原创粉丝点击