Android的日历视图的日期选择器视图、日历、日期、选择器

由网友(青灯伴古佛)分享简介:我在写我的第一个应用程序,我有一个问题关于的DatePicker 。我的应用程序要求用户输入的日期。最人性化的方式将弹出一个日历般的小工具,显示当月就像一个日历网格 - 是这样的:我要使用代替的DatePicker 接口 - 这有月,日和年字段,每个具有向上和向下按钮增加/减少。 是这种类型的功能内置到所有的Andr​...

我在写我的第一个应用程序,我有一个问题关于的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:

Android开源 SelectDateAndTime 一款自定义日期时间选择器

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.

阅读全文

相关推荐

最新文章