我設計的安卓定製的對話,爲此我設計的XML文件作爲查看無法正常顯示Android的佈局
<?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,和textview的文本應該在多行(如果更多的字符必須顯示)。但是當我使用這種佈局時,按鈕不會出現在任何地方。
我還使用了LinearLayout和TableLayout,並且在這兩種情況下,按鈕都顯示一小部分。我錯在哪裏?
你的答案是爲我工作,但你看到佈局的深度?這是僅有兩種觀點的好設計嗎? –
如果你使用重量總和的概念,最好的是從來沒有你的設計打破任何屏幕,以便我已經使用過。如果找到這個答案正在工作,然後upvote它可以直接給textview和按鈕以總和概念 – Nikhil
。 – Nikhil