【发布时间】:2013-07-30 16:48:25
【问题描述】:
我想要的活动布局是 2个旋转器一个接一个 在微调器的右侧或左侧我想要一个图像视图 在微调器下方,我添加了各种 edittext 和 texviews。
我尝试了线性布局和相对布局都没有得到想要的结果。
我应该使用哪种布局?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="72dp"
android:layout_height="61dp"
android:src="@drawable/ic_launcher" />
<Spinner
android:id="@+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="9"
android:entries="@array/category"
android:prompt="@string/country_prompt"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
</LinearLayout>
【问题讨论】:
-
你有一些你想要实现的架构/草图吗?在我看来,LinearLayout 是最好的选择,但如果我们能看到您想要实现的目标,那就太好了。
-
另外,你能发布整个 XML 布局吗?您至少缺少 RelativeLayout 和根 ScrollLayout 的结束标记。结束标签前还有其他视图吗?
-
我的主要问题只是希望 imageview 和 spinner 在同一水平线上.....即在 spinner 右侧的 imageview...
标签: android layout imageview spinner