3

Androidで最初の相対レイアウトをプログラムしようとしています。

私は正常に機能する線形レイアウトを持っているので、相対レイアウトxmlファイルはそれに基づいています。

次のエラーが発生します:

    error: No resource identifier found for attribute 'layout_bottom' in package 'android'

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/text_1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="--"
    android:layout_alignParentTop="true"
    /> 

    <RadioGroup                                <-- the error is given in this line
          android:id="@+id/kk"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:layout_bottom="@id/text_1"
          >

ありがとう

4

2 に答える 2

2

それはそうではありませんlayout_bottom、それはlayout_alignBottom

http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html

于 2012-11-18T15:38:31.207 に答える
0

次のように変更します。

   <RadioGroup
          android:id="@+id/kk"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:layout_below="@id/text_1"
       />
于 2012-11-18T15:44:06.383 に答える