Android的日历视图的日期选择器 [英] Android Calendar View for Date Picker

查看:236
本文介绍了Android的日历视图的日期选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写我的第一个应用程序,我有一个问题关于的DatePicker

我的应用程序要求用户输入的日期。最人性化的方式将弹出一个日历般的小工具,显示当月就像一个日历网格 - 是这样的:

我要使用代替的DatePicker 接口 - 这有月,日和年字段,每个具有向上和向下按钮增加/减少。

是这种类型的功能内置到所有的Andr​​oid窗口小部件或视图,或者我会设计自己的自定义组件来做到这一点?我想这将已经存在,看到多少这种类型的用户界面的使用非常频繁的非移动应用程序和网页。

谢谢!

解决方案
  

这类型的内置到所有的Andr​​oid窗口小部件或视图功能,否则我将不得不设计自己的自定义>组件来做到这一点?

目前是在Android SDK中没有元件,对不起。你说明部件太小的触摸屏。您可以实现更大的东西(见的日历应用程序),但在很大程度上是对自己的这一点。

I'm writing my first app, and I have a question about DatePicker.

My app requires the user to input a date. The most user-friendly way would be to popup a calendar-like widget that displays the current month like a calendar grid - something like this:

I want to use that in place of the DatePicker interface - which has Month, Day, and Year fields, each with an up and down button to increment/decrement.

Is this type of functionality built into any Android widget or view, or would I have to design my own custom component to do this? I figured this would already exist, seeing how much this type of UI is used so frequently in non-mobile apps and web pages.

Thanks!

解决方案

Is this type of functionality built into any android widget or view, or would I have to design my own custom > component to do this?

There is no component for that in the Android SDK, sorry. The widget you illustrate is too small for a touchscreen. You can implement something larger (see the Calendar app), but you are largely on your own for that.

这篇关于Android的日历视图的日期选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆