[問題] Layout排版
A question
我在某個範例程式中,它的XML檔在宣告元件排版時
是使用relativelayout配置
其中使用了某些元件如textview和button
但是在宣告某個元件時使用了這段語法
android:layout_below="@+id/entry"
我在全部專案中的xml全找遍了
都沒有一個id叫作entry的元件
何解?
以下是我main.xml中的程式碼 向板上各位大大求助 謝謝
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/entry"
android:text="@string/label_text"/>
<TextView
android:text="@string/textview01_text"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_below="@+id/text1"
android:id="@+id/text2"></TextView>
<TextView
android:text="@string/textview01_text"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_below="@+id/text2"
android:id="@+id/text3"></TextView>
<Button
android:id="@+id/startpreview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/entry"
android:layout_alignParentRight="true"
android:layout_marginLeft="10dip"
android:text="@string/startpreview_text" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/startpreview"
android:layout_alignTop="@id/startpreview"
android:text="@string/stoppreview_text"
android:id="@+id/stoppreview"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/startpreview"
android:text="@string/txtAcceleration"
android:id="@+id/btnAcceleration"/>
</RelativeLayout>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.118.20.62
→
06/23 04:57, , 1F
06/23 04:57, 1F
→
06/23 04:58, , 2F
06/23 04:58, 2F
→
06/23 15:57, , 3F
06/23 15:57, 3F
→
06/23 18:59, , 4F
06/23 18:59, 4F
→
06/23 19:29, , 5F
06/23 19:29, 5F
→
06/23 19:30, , 6F
06/23 19:30, 6F
推
06/23 22:35, , 7F
06/23 22:35, 7F
→
06/23 23:20, , 8F
06/23 23:20, 8F
推
06/24 00:46, , 9F
06/24 00:46, 9F
→
06/24 00:48, , 10F
06/24 00:48, 10F
→
06/24 00:49, , 11F
06/24 00:49, 11F
→
06/24 08:08, , 12F
06/24 08:08, 12F
→
06/24 08:09, , 13F
06/24 08:09, 13F
推
06/24 11:26, , 14F
06/24 11:26, 14F
推
06/24 18:22, , 15F
06/24 18:22, 15F
→
06/24 21:16, , 16F
06/24 21:16, 16F
→
06/24 21:16, , 17F
06/24 21:16, 17F
推
06/25 00:10, , 18F
06/25 00:10, 18F
→
06/26 21:17, , 19F
06/26 21:17, 19F