如何在Android应用使用NumberPicker与API 7? [英] How to use NumberPicker in Android app with API 7?

查看:175
本文介绍了如何在Android应用使用NumberPicker与API 7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序的最小SDK是7,但我可以用DialogFragment这是从SDK版本11,因为它是在支持库这是在我的lib目录下。

我想作这样的例子:的http:/ /developer.android.com/guide/topics/ui/controls/pickers.html

但我想使用 NumberPicker 小部件,它是从SDK版本11过,但我的应用程序不允许这样。我一定要添加其他支持库?

我如何使用这个组件?

感谢您。


解决方案

  

我一定要添加其他支持库?


Android的支持库不提供 NumberPicker 。其他人都创建了自己的 NumberPicker 的反向移植,你可以使用,如 SimonVT的之一。

The minimum sdk of my app is 7, but I can use DialogFragment which is from sdk version 11, because it is in the support library which is in my lib directory.

I'd like to make something like this example: http://developer.android.com/guide/topics/ui/controls/pickers.html

But I want to use the NumberPicker widget, which is from sdk version 11 too, but my app does not allow this. Do I have to add other support library?

How can I use this component?

Thank you.

解决方案

Do I have to add other support library?

The Android Support library does not offer NumberPicker. Other people have created their own backports of NumberPicker that you could use, such as SimonVT's one.

这篇关于如何在Android应用使用NumberPicker与API 7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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