ダイアログに一部のテキストを表示できません。ユーザーがパスワードを忘れた場合、「パスワードを忘れた」を使用してTextView、メール アドレスを入力するとどうなるかを説明するメッセージを表示します。このレイアウトは次のとおりです。
<TextView
android:id="@+id/forgotpasswordtextview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/forgotpassword"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/md_text_yellow"
android:gravity="right" />
<LinearLayout></LinearLayout>次のプロパティを持つa の内部にあります。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/base_panel"
android:orientation="vertical"
android:padding="6dip" >
1 行のビューから始まり、4 行のビューに拡張されます。
ダイアログ コンストラクター内に、次のレイアウト命令があります。
mParent = LayoutInflater.from(context).inflate(R.layout.login, null);
setContentView(mParent, new ViewGroup.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
これを変更して、ダイアログの高さを 600 にしました (うまくいきました - 1 つの垂直方向に引き伸ばされたダイアログ) TextView。
何が原因でしょうか?
編集:
を に変更するTextViewとandroid:textAppearance="?android:attr/textAppearanceSmall"、文字列が同じポイントで切断され、3 本の線が表示されます。これが文字列の問題であり、問題ではないかどうか疑問に思っていTextViewます。
元の文字列は次のとおりです。
Please enter your registered email and we will send you details of how to reset your password. If you do not know your email then please contact us.
そして、それは次の場所で途切れます:
Please enter your registered email and we will send you details of how to reset your password. If you do not
小さいテキスト (3 行) と
Please enter your registered email and we will send you details of how to reset your password. If you do not know
中程度のテキスト (4 行)。
私が入れた新しいテスト文字列は次のとおりです。
0________ 1________ 2________ 3________ 4________ 5________ 6________ 7________ 8________ 9________ 10_______ 11_______ 12_______ 13_______ 14_______ 15_______ 16_______ 17_______
そして、それは次の場所で途切れます:
0________ 1________ 2________ 3________ 4________ 5________ 6________ 7________ 8________ 9________ 10_______ 11_______ 12_______ 13_______ 14_______
小さなテキスト (5 行) と
0________ 1________ 2________ 3________ 4________ 5________ 6________ 7________ 8________ 9________ 10_______ 11_______
中程度のテキスト (6 行)。
さらに編集:
文字列を短くすると、最後の行または 2 行が切り取られていることがわかります。Android: last line of textview cut off のようになる可能性があります。文字列ファイルに改行を追加すると、別の行が得られますが、文字列全体ではありません!