私のTextView
とそのすべてのコンテナはlayout_height
〜wrap_content
に設定されています。 some text was lost.
テキストが空白なしで長いテキストを表示するとテキストが失われる
text without space
を追加すると正しく動作しているように見えます(例:英語)。空白のないテキスト(例:英語) 2つのスペースと1文字。 :(以下
msg += " a";
は私のレイアウトである理由すっごい私は知りません。任意の助けが理解されるであろう!おかげさま
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/push_header_bg" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
android:layout_marginLeft="1dp"
android:layout_marginBottom="0dp"
android:src="@drawable/push_logo" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="40dp"
android:text="@string/app_name"
android:textColor="@android:color/white"
android:textSize="22dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/push_center_bg"
android:orientation="vertical" >
<TextView
android:id="@+id/tv_push_sub_header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/push_sub_header"
android:textSize="20dp"
android:layout_marginTop="10dp"
android:textColor="@android:color/black"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_push"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="20dp"
android:text="今日は、何事にもパワフルなエネルギーに満ちている1日。また..."
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="10dp"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:paddingLeft="30dp"
android:paddingRight="30dp"
android:background="@drawable/push_footer_bg" >
<Button
android:id="@+id/btn_close"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:background="@drawable/button_selector"
android:text="@string/push_btn_close"
android:textColor="@android:color/white"
android:textStyle="bold"
android:padding="10dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp" />
<Button
android:id="@+id/btn_open"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:background="@drawable/button_selector"
android:text="@string/push_btn_open_app"
android:textColor="@android:color/white"
android:textStyle="bold"
android:padding="10dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="10dp" />
</LinearLayout>
ありがとうございます。その文字列は単なる例であり、Text文字列はプログラムでJavaコードで設定されます。 – Wayne
このアプリに使用しているAPIはどれですか? – Andy
こんにちは、私はAndroid 2.2を使用しました – Wayne