我想在以下的main.xml中把TextView和EditText放在同一行。我该怎么做?
<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="@string/txtTotalAmt" android:id="@+id/txtTotalAmt" ></TextView>
<EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/TotalAmt" android:maxLength="6" android:text="0.00" android:inputType="number|numberDecimal"></EditText>
感谢您的帮助。
<linearLayout android:orientation="vertical"><other text box here></linearLayout>
。但是,如果你正在创建更复杂的行(我假设这是一个列表行?),那么最好使用表格行。一个问题是不要过度使用子布局或表格,因为它会消耗资源(http://developer.android.com/resources/tutorials/views/hello-tablelayout.html)。 - wired00