写代码的人

代码:

<?xml version=”1.0″ encoding=”utf-8″?>

<RelativeLayout

xmlns:android=”http://schemas.android.com/apk/res/android&#8221;

android:layout_width=”fill_parent”

android:layout_height=”wrap_content”

android:padding=”10px”>

<TextView android:id=”@+id/label”

android:layout_width=”fill_parent”

android:layout_height=”wrap_content”

android:text=”Type Here:”

/>

<EditText android:id=”@+id/entry”

android:layout_width=”fill_parent”

android:layout_height=”wrap_content”

android:background=”@android:drawable/editbox_background”

android:layout_below=”@+id/label”/>

<Button android:id=”@+id/ok”

android:layout_width=”wrap_content”

android:layout_height=”wrap_content”

android:layout_below=”@id/entry”

android:layout_alignParentRight=”true”

android:layout_marginLeft=”10px”

android:text=”ok”/>

<Button android:id=”@+id/cancel”

android:layout_width=”wrap_content”

android:layout_height=”wrap_content”

android:layout_toLeftOf=”@id/ok”

android:layout_alignTop=”@id/ok”

android:text=”cancel”/>

</RelativeLayout>

效果: 界面使用xml跟silverlight很像

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: