a very good tutorial let me understand basic UI...
2012-02-17 16:19
309 查看
http://www.vogella.de/articles/Android/article.html#first
範列裡的
<?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才可以
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才可以
相关文章推荐
- Snagit (Windows): The Let Me Try Tutorial Comes up After Every Capture
- Good Explain on Sleep in Kernel, let me understanding the mechanism of avoiding "missing wake"
- Sherwood Dungeon -- very good game by shockwave
- JavaME UI设计之点阵字体
- UVa 357 Let Me Count The Ways
- 【音乐分享】Let Me Go
- The Cairo graphics tutorial -------Basic drawing in Cairo
- UVA 357 - Let Me Count The Ways
- Programming with ZooKeeper - A basic tutorial
- ui.theme
- Some good articles for me
- uva 357 - Let Me Count The Ways(动态规划-注意dp初始化的问题)
- here are some very good songs for you learn....
- A very simple question but it makes me very frustrated
- iPad for iPhone Developers 101 in iOS 6: UISplitView Tutorial
- UVa 357: Let Me Count The Ways
- gstreamer basic-tutorial-15 编译出现 basic-tutorial-15.c:1: fatal error: clutter-gst/clutter-gst.h......
- GPGPU::Basic Math Tutorial
- 内核_.config 内核配置[ZT]--make menuconfig(very good)
- uva357 Let Me Count The Ways