私は自分のプロジェクトの別のxmlファイルで作成したカスタムダイアログを使用していますが、メインウィンドウの色は青い灰色で、 ですが、メインヘッダーはデフォルトの白色のままです。アンドロイドスタジオのダイアログヘッダーをカスタマイズする方法は?
ヘッダーのフォントの色、サイズ、背景を変更する方法はありませんか?
私はヘッダーのテキストを変更することができますか?
のxml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:background="#3edfbc"
android:orientation="vertical">
<TextView
android:id="@+id/textaligmentManager_loader_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ffffff"
android:text="Initlizing Wifi"
android:textAppearance="?android:attr/textAppearanceLarge" />
<com.github.ybq.android.spinkit.SpinKitView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/barcodeScanning_spinkit"
style="@style/SpinKitView.Large.FoldingCube"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_below="@+id/textaligmentManager_loader_textview"
android:padding="20dp"
android:layout_centerHorizontal="true"
app:SpinKit_Color="#ffffff" />
</RelativeLayout>
ダイアログ:
Dialog dialog = new Dialog(Scanning_Barcode_Activity.this);
dialog.setContentView(R.layout.aligment_manager_loader_layout);
dialog.setTitle("Loading");
dialog.setCancelable(false);
//set up text
loaderScreenMainText = (TextView) dialog.findViewById(R.id.textaligmentManager_loader_textview);
loaderScreenMainText.setText("Loading Wifi");
//progressBar = (ProgressBar) dialog.findViewById(R.id.barcodeScanning_spinkit);
//DoubleBounce doubleBounce = new DoubleBounce();
//progressBar.setIndeterminateDrawable(doubleBounce);
//now that the dialog is set up, it's time to show it
dialog.show();
まだタイトル領域が表示されます...テキストなし...まだ画面に白い領域が表示されています。 –
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); –
この段階では、この段階でこれを行うことはできません。作成のビューにコンテンツが既に設定されているため(これは機能しません)... –