"Android"中的WYSIWYG视图编辑器?

5 xml eclipse wysiwyg android editor

重复:Google Android是否有可用的表单设计器?

我想移动一个CheckBox,因此它显示在与main.xml中的Absolute Layout下面左上角不同的位置,用于"Android".我正在使用Eclipse编辑我的视图.我该怎么做?

在iPhone上,他们有一个名为Interface builder的工具,允许您以WYIWYG方式移动东西.Eclipse有类似的功能吗?

m6t*_*6tt 1

我建议使用相对布局。您可以相对于其他视图或父视图放置复选框,例如,如果您想将其放置在右侧和 TextView 下方,您可以使用类似

<RelativeLayout
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  >
  <TextView
    android:id="@+id/textview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Text"
    />
  <CheckBox
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/textview"
    />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

另请查看 droiddraw.org,但我建议您自己编写代码,因为如果您需要编辑/重复使用,它可以加快流程。

有关RelativeLayout的更多信息,请参阅http://d.android.com/reference/android/widget/RelativeLayout.html