有安卓的NumericUpDown按钮?按钮、有安卓、NumericUpDown

由网友(吕:吕孩子啦、那美吕归、吕氏春秋)分享简介:我试图找到的NumericUpDown按钮在Android中,但未能成功。你知道什么是控制器称为Android的 - 请让我知道I've tried to find the NumericUpDown button in Android, but failed. Do you know what the contro...

我试图找到的NumericUpDown按钮在Android中,但未能成功。你知道什么是控制器称为Android的 - 请让我知道

I've tried to find the NumericUpDown button in Android, but failed. Do you know what the controller is called in Android - please let me know!

<?xml version="1.0" encoding="utf-8"?>
<!-- 
 main.xml 
 7/22 2010 
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 >
 <GridView 
  android:id="@+id/GridView" 
  android:layout_width="fill_parent"  
  android:layout_height="fill_parent"
  android:numColumns="3"
  android:verticalSpacing="10dp"
  android:horizontalSpacing="10dp"
  android:columnWidth="90dp"
  android:stretchMode="columnWidth"
  android:gravity="center"
  android:background="@color/white"
  >
 </GridView>
 <ButtonUpDown>
  <!-- The real name is??? -->
 </ButtonUpDown>
</LinearLayout>

感谢名单为您的时间 修改

Thanx for your time

控制器看起来是这样的:

The controller looks like this:

推荐答案

你有你的截屏视图看上去喜欢 com.android.iternal.widget.NumberPicker 这是所使用的一些标准的部件,诸如DatePicker.

The view you have on your screenshot looks likes com.android.iternal.widget.NumberPicker which is used by some of the standard components, such as DatePicker.

不幸的是,这个组件并不意味着给公众使用 - 因此内部包名。有some招数,你可以用它来得到它,但我建议不要直接访问它。由于这是c中的API维护者私人$ C $不会担心不同版本的Andr​​oid外部的兼容性,所以,即使你能得到现在的工作,它可能会导致在未来的问题。

Unfortunately, this component is not meant for public use - hence the internal in the package name. There are some tricks you can use to get to it, but I would recommend against accessing it directly. As this is "private" code the API maintainers aren't going to worry about external compatibility in different versions of Android, so even if you can get it working now it will probably cause your problems in future.

您最好的选择是get在$ C $下 NumberPicker 从公开的Andr​​oid源代码库,然后剪切并粘贴到自己的类来创建你的电话号码选取器插件。

Your best bet is to get the code for NumberPicker from the public Android source repository and cut and paste it in to your own class to create your Number Picker widget.

或者,如果你不想自己做,工作拉 NumberPicker 从源头已经完成,并在网站上发布供您下载和使用。

Or if you didn't want to do this yourself, the work to pull NumberPicker from the source has already been done and posted on a website for you to download and use.

阅读全文

相关推荐

最新文章