Hallo Senior Entwickler.Wie controll alertdialog Taste Textgröße auf Android?
vor kurzem erstelle ich alertdialog.
Ich weiß Titel Größe, Nachrichtengröße controll
aber ich weiß nicht, controll Schaltfläche Textgröße
Wie controll Taste Textgröße?
Ich muss dieses Format bitte danke.
View view = getLayoutInflater().inflate(R.layout.connecting_error_dialog, null);
TextView txtTitle = (TextView) view.findViewById(R.id.title);
txtTitle.setTextSize(40);
txtTitle.setTextColor(Color.RED);
txtTitle.setText("fail");
TextView message = (TextView) view.findViewById(R.id.message);
message.setTextSize(30);
message.setText("dddddd");
AlertDialog.Builder builder = new AlertDialog.Builder(Connectingreceiver.this);
builder.setView(view)
.setCancelable(false)
.setPositiveButton("ok",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
moveTaskToBack(true);
finish();
android.os.Process.killProcess(android.os.Process.myPid());
}
});
AlertDialog alertDialog = builder.create();
alertDialog.show();
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="HelloAlert!"/>
<TextView android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dip"/>
</LinearLayout>
Was haben Sie versucht? Was genau läuft schief? Haben Sie Fehler? Was sind diese Fehler? Was haben Sie versucht, um diese Fehler zu beheben? Was ist passiert, als du das getan hast? Denken Sie daran, diese Dinge zu berücksichtigen, wenn Sie Ihre Frage stellen. Befolgen Sie diese Anleitung, um sicherzustellen, dass Ihre Fragen von hoher Qualität sind: https://stackoverflow.com/help/how-to-ask –