アンドロイド - レイアウトファイルから、私はカスタムダイアログを作ってるんだ
Javaコード奇妙なレイアウトを示すカスタムダイアログ:
Dialog dialog = new Dialog(CategoryActivity.this);
dialog.setContentView(R.layout.content_privacy_dialog);
TextView dialog_title = (TextView) dialog.findViewById(R.id.dialog_title);
dialog_title.setText(getString(R.string.nav_privacy));
dialog.show();
レイアウトファイル:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:background="@color/dialogBg"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:padding="24dp"
android:layout_height="wrap_content"
android:id="@+id/dialog_title"
android:text="About"
android:textSize="20sp"
android:textColor="@android:color/white"
/>
</LinearLayout>
を私はこれを取得しています結果:
トップとブルーバーの空白を非表示にするにはどうすればよいですか?
何か助けていただければ幸いです。
お返事ありがとうございました。それは今働いている。 – Asym