0

私はスピナーを使用しましたが、テキストビューを使用してテキストを編集しましたが、アプリケーションを実行しても表示されません..エミュレーターに表示されない理由がわかりません。また、.javaでedittextを宣言しましたが、edittextも表示されていません..スピナーのbcozだと思います。なぜこれが起こっているのか知っている人はいますか?

これが私の完全な.xmlコードです。

<?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" 
    android:background="@drawable/background">

<TextView
    android:id="@+id/textView_navbar_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:background="@drawable/navigation"
    android:gravity="center"
    android:text="@string/string_subscription"
    android:textColor="#ffffff"
    android:textSize="20sp" />

<ImageView
    android:id="@+id/imageView_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="5pt"
    android:contentDescription="@string/todo_image"
    android:src="@drawable/bg_transparent" />

<TextView
    android:id="@+id/textView_startDate_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/textView_navbar_susa"
    android:layout_marginLeft="44dp"
    android:layout_marginTop="76dp"
    android:text="@string/string_startDate_susa" />

<EditText
    android:id="@+id/editText_startDate_susa"
    android:layout_width="150sp"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@+id/textView_startDate_susa"
    android:layout_alignBottom="@+id/textView_startDate_susa"
    android:layout_alignParentRight="true"
    android:layout_marginRight="50sp"
    android:background="@drawable/subscription_textarea_gray"
    android:inputType="date"
    android:paddingLeft="10sp"
    android:focusable="false" />

<TextView
    android:id="@+id/textView_endDate_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView_startDate_susa"
    android:layout_below="@+id/editText_startDate_susa"
    android:layout_marginTop="38dp"
    android:text="@string/string_endDate_susa" />

<EditText
    android:id="@+id/editText_endDate_susa"
    android:layout_width="150sp"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@+id/textView_endDate_susa"
    android:layout_alignBottom="@+id/textView_endDate_susa"
    android:layout_alignLeft="@+id/editText_startDate_susa"
    android:layout_alignRight="@+id/editText_startDate_susa"
    android:background="@drawable/subscription_textarea_gray"
    android:inputType="date"
    android:paddingLeft="10sp" 
    android:focusable="false"/>

<TextView
    android:id="@+id/textView_type_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView_endDate_susa"
    android:layout_below="@+id/editText_endDate_susa"
    android:layout_marginTop="38sp"
    android:text="@string/string_subscription_type" />

<Spinner
    android:id="@+id/spinner_type_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/editText_endDate_susa"
    android:layout_alignRight="@+id/editText_endDate_susa"
    android:layout_centerVertical="true" />

<TextView
    android:id="@+id/textView_amount_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView_type_susa"
    android:layout_below="@+id/spinner_type_susa"
    android:layout_marginTop="230sp"
    android:text="@string/string_amount_susa" />

<EditText
    android:id="@+id/editText_amount_susa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/spinner_type_susa"
    android:layout_alignRight="@+id/spinner_type_susa"
    android:layout_alignTop="@+id/textView_amount_susa"
    android:background="@drawable/subscription_textarea_gray"
    android:paddingLeft="10sp"
    android:inputType="number" />

 </RelativeLayout>
4

2 に答える 2

0

「layout_below」があるので、RelaviteLayoutを使用していると思います。trueの場合は、次を追加する必要があります。

android:layout_below = "@ + id / textView_amount_susa"

EditTextで。

trueでない場合は、完全なxmlファイルを投稿してください。

于 2013-02-19T13:28:24.737 に答える