·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> app软件开发 >> Android开发 >> Android DigitalClock组件用法实例

Android DigitalClock组件用法实例

作者:佚名      Android开发编辑:admin      更新时间:2022-07-23

本文实例讲述了Android DigitalClock组件用法。分享给大家供大家参考,具体如下:

DigitalClock组件的使用很简单,先看看效果图:

DigitalClock只需要在布局文件中,用于显示时间的地方使用此组件即可,无需用java代码进行实例化。

<?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
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="center_horizontal"/>
</LinearLayout>

更多关于Android开发相关内容感兴趣的读者可查看本站专题:《Android基本组件用法总结》及《Android开发入门与进阶教程》

希望本文所述对大家Android程序设计有所帮助。