diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/M3AlertDialogBuilder.java b/mastodon/src/main/java/org/joinmastodon/android/ui/M3AlertDialogBuilder.java index 7c54c920..18def132 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/M3AlertDialogBuilder.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/M3AlertDialogBuilder.java @@ -50,6 +50,11 @@ public class M3AlertDialogBuilder extends AlertDialog.Builder{ helpButton.setSelected(helpText.getVisibility()==View.VISIBLE); }); setCustomTitle(titleLayout); + }else if(!TextUtils.isEmpty(title)){ + View titleLayout=getContext().getSystemService(LayoutInflater.class).inflate(R.layout.alert_title, null); + TextView title=titleLayout.findViewById(R.id.title); + title.setText(this.title); + setCustomTitle(titleLayout); } alert=super.create(); diff --git a/mastodon/src/main/res/layout/alert_title.xml b/mastodon/src/main/res/layout/alert_title.xml new file mode 100644 index 00000000..eb1a78b4 --- /dev/null +++ b/mastodon/src/main/res/layout/alert_title.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/values/styles.xml b/mastodon/src/main/res/values/styles.xml index 8f26478f..98b54c11 100644 --- a/mastodon/src/main/res/values/styles.xml +++ b/mastodon/src/main/res/values/styles.xml @@ -215,8 +215,6 @@