Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 安卓:旁边有两个旋转器_Java_Android - Fatal编程技术网

Java 安卓:旁边有两个旋转器

Java 安卓:旁边有两个旋转器,java,android,Java,Android,我想在两个不同的微调器旁边显示价格值:from和to,我想在两个微调器旁边显示,其中一个将包含from值 另一个是价值观 在android中如何实现这一点?您可以在布局XML中使用表布局: <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"

我想在两个不同的微调器旁边显示价格值:from和to,我想在两个微调器旁边显示,其中一个将包含from值 另一个是价值观


在android中如何实现这一点?

您可以在布局XML中使用表布局:

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:stretchColumns="0,1,2"
    android:layout_width="wrap_content" android:layout_height="wrap_content"
    android:gravity="center">
    <TableRow>
        <Spinner android:id="@+id/widget1" android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:drawSelectorOnTop="false" />
        <Spinner android:id="@+id/widget2" android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:drawSelectorOnTop="false" />
    </TableRow>

</TableLayout> 
我并没有编译这个或者确保它能工作,这只是给你们一个想法

祝你好运