安卓开发_时间、日期选择器的简单使用
2013-08-17 23:10
309 查看
这里介绍两个控件来简单实现日期,时间的功能
两个控件都只要在xml文件中添加一下即可
一、AnalogClock控件
二、DialogClock控件
效果图:
两个控件都只要在xml文件中添加一下即可
一、AnalogClock控件
<?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:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="AnalogClock组件" android:textSize="18dp" android:paddingTop="10dp" android:layout_gravity="center" /> <AnalogClock android:id="@+id/analogClock1" android:layout_width="wrap_content" android:layout_gravity="center" android:layout_height="wrap_content" /> </LinearLayout>
二、DialogClock控件
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <DigitalClock android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="DiaitalClock" android:id="@+id/id_clock_digitalclock" android:textSize="30dp" android:gravity="center" android:textColor="#ff0000" /> </RelativeLayout>
效果图:
相关文章推荐
- 安卓原生自带的日期选择器DatePickerDialog、时间选择器TimePickerDialog使用方法
- 安卓开发笔记2--简单的使用按钮
- IOS风格的时间选择器在安卓中的简单实现
- 不一样的Android选择器,简单方便,地址日期时间都好用!
- bootstrap-datetimepicker日期时间选择器使用文档
- 39.Oracle数据库SQL开发之 日期和时间的存储与处理——几个简单的存储检索日期
- 43.Oracle数据库SQL开发之 日期和时间的存储与处理——使用时间值函数
- 安卓开发简单管理应用程序使用的内存
- C#实现多级子目录Zip压缩解压实例 NET4.6下的UTC时间转换 [译]ASP.NET Core Web API 中使用Oracle数据库和Dapper看这篇就够了 asp.Net Core免费开源分布式异常日志收集框架Exceptionless安装配置以及简单使用图文教程 asp.net core异步进行新增操作并且需要判断某些字段是否重复的三种解决方案 .NET Core开发日志
- [安卓开发] Glide图片加载库的简单封装使用
- Android中日期时间选择器的使用及常见的问题
- 安卓通知的使用系列7:对话框通知的使用之日期对话框、时间对话框
- 安卓简单app开发实践,代码完成后没报错,但功能就是无法使用,学生菜鸟,求指导
- 安卓开发-对话框的简单使用
- 命令行下使用android SDK工具手工开发简单安卓小项目
- 安卓开发_复选按钮控件(CheckBox)的简单使用
- 40.Oracle数据库SQL开发之 日期和时间的存储与处理——使用TO_CHAR和TO_DATE
- 安卓选择器类库,包括日期选择器、时间选择器、单项选择器、数字选择器、二三级联动选择器、省市区地址选择器、颜色选择器、文件目录选择器等,可自定义顶部及底部界面,可自定义窗口动画
- 日期及时间处理包 Carbon 在 Laravel 中的简单使用
- Laravel中日期时间处理包Carbon的简单使用