タイトルバーのないカスタムダイアログを作成しようとしています.SOの提案に従って、次のことを行います
propDiag = new Dialog(this);
propDiag.requestWindowFeature(Window.FEATURE_NO_TITLE);
propDiag.setContentView(R.layout.property_daig);
ここに私のxmlの一部があります
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/background"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation= "horizontal">
<LinearLayout android:layout_width="wrap_content"
android:layout_height="fill_parent" android:orientation= "vertical" android:layout_weight="1" >
//COUPLE OF buttons
</LinearLayout>
<View android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.5" ></View>
<LinearLayout android:layout_width="wrap_content"
android:layout_height="fill_parent" android:orientation= "vertical" android:layout_weight="1" >
//COUPLE OF buttons
</LinearLayout>
</LinearLayout>
レイアウトが台無しになり、すべてが左右に最大にプッシュされるという問題
requestWindowFeature なしでそれを行うと、タイトルが表示されることを除いて、すべてが素晴らしいです!.
誰かが解決策を説明して推奨できますか? ありがとう