a very good tutorial let me understand basic UI...

 

http://www.vogella.de/articles/Android/article.html#first

9. Your first Android project

由於版本原因,

範列裡的

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical" android:layout_width="fill_parent"
 android:layout_height="fill_parent">
 
 <EditText android:layout_height="wrap_content" android:id="@+id/editText1"
  android:layout_width="match_parent" android:text="EditText"></EditText>
  
 <RadioGroup android:layout_height="wrap_content" android:id="@+id/radioGroup1"
  android:layout_width="match_parent">
  <RadioButton android:text="RadioButton"
   android:layout_width="wrap_content" android:id="@+id/radio0"
   android:layout_height="wrap_content" android:checked="true"></RadioButton>
  <RadioButton android:text="RadioButton"
   android:layout_width="wrap_content" android:id="@+id/radio1"
   android:layout_height="wrap_content"></RadioButton>
 </RadioGroup>
 <Button android:text="Button" android:id="@+id/button1"
  android:layout_width="wrap_content" android:layout_height="wrap_content"></Button>
</LinearLayout>
會報錯,

將match_parent改為fill_parent才可以

 

你可能感兴趣的:(a very good tutorial let me understand basic UI...)