首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >超大NumberPicker

超大NumberPicker
EN

Stack Overflow用户
提问于 2013-12-13 16:08:17
回答 2查看 684关注 0票数 0

这是我的布局XML文件:

代码语言:javascript
复制
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <ScrollView
        android:id="@+id/scroller"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        >

        <TableLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" >

            <TableRow
                android:id="@+id/tableRow1"
                android:layout_width="fill_parent"
                android:layout_height="50dp" >

                <RadioButton
                    android:id="@+id/radioButton1"
                    android:layout_width="wrap_content"
                    android:layout_height="50dp"
                    android:drawableRight="@android:drawable/btn_radio"
                    android:button="@null"
                    android:textSize="12sp"
                    android:text="RadioButton" />

                <NumberPicker
                    android:id="@+id/numberPicker1"
                    android:layout_width="wrap_content"
                    android:layout_height="50dp" />

            </TableRow>

            <TableRow
                android:id="@+id/tableRow2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" >

            </TableRow>

            <TableRow
                android:id="@+id/tableRow3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" >
            </TableRow>

            <TableRow
                android:id="@+id/tableRow4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" >
            </TableRow>
        </TableLayout>

    </ScrollView>



</RelativeLayout>

在这里,这里有一个巨大的问题。请看下图,看看NumberPicker有多大!

我需要的NumberPicker是类似下面这样的东西。

我试着设置高度和固定,但似乎没有太大的影响。此设计适用于手机和平板电脑。如何才能使这个NumberPicker变小,如上图所示?

EN

回答 2

Stack Overflow用户

发布于 2013-12-13 16:53:54

使用

代码语言:javascript
复制
android:scaleX="0.5"
android:scaleY="0.5"

并玩弄这些价值。

票数 1
EN

Stack Overflow用户

发布于 2013-12-13 16:32:51

你可以创建你自己的自定义numberpickerview.or,否则你可以使用wheelpicker (和iphone一样),它的设计会很难看。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20561821

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档