私はアンドロイドでカスタム対話を設計していますでは正しく表示されないようViewは、この目的のために、私はxmlファイルを設計し、アンドロイドレイアウト
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@color/item_bg_color"
android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/custom_dialog_text"
android:textColor="#000000"
android:textSize="14dip"
android:typeface="serif"
android:singleLine="false"
android:text="You are not authorized to use this application."
android:layout_marginTop="10dip"/>
<Button android:id="@+id/custom_button_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ok"
android:layout_below="@+id/custom_dialog_text"
android:layout_toRightOf="@+id/custom_dialog_text"/>
</RelativeLayout>
問題:私は最後にボタンを表示したい
(右)、Textviewのテキストは複数の行になければなりません(複数の文字を表示する必要がある場合)。しかし、私がこのレイアウトを使用しているとき、ボタンはどこにも表示されません。
LinearLayoutとTableLayoutも使用していますが、どちらの場合でもボタンは少ししか表示されません。どこが間違っていますか? layout_alignParentRight、アンドロイド:ボタンの
下回ってみてください。私のために働いていますが、レイアウトの深さを見ましたか?この2つのビューだけの良いデザインですか? –
重量合計のコンセプトを使用した場合は、それを使用したように画面を壊すことは決してあなたのデザインでは決してありません。あなたは直接テキストビューとワイト・サム・コンセプト – Nikhil
にボタンを与えて、この答えがうまく働いていればそれをアップヴォートすることができます。 – Nikhil