Use branding color for account switcher dialog

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-07-22 15:10:06 +02:00 committed by Tobias Kaminsky
parent e7eda9bbbe
commit 43c0e3dbc3
2 changed files with 10 additions and 3 deletions

View file

@ -7,6 +7,7 @@
*/
package it.niedermann.owncloud.notes.accountswitcher;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
@ -21,6 +22,7 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import it.niedermann.owncloud.notes.NotesApplication;
import it.niedermann.owncloud.notes.R;
import it.niedermann.owncloud.notes.branding.BrandedDialogFragment;
import it.niedermann.owncloud.notes.branding.BrandingUtil;
@ -107,9 +109,12 @@ public class AccountSwitcherDialog extends BrandedDialogFragment {
dismiss();
});
return new MaterialAlertDialogBuilder(requireContext())
.setView(binding.getRoot())
.create();
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireContext())
.setView(binding.getRoot());
NotesApplication.brandingUtil().dialog.colorMaterialAlertDialogBackground(requireContext(), builder);
return builder.create();
}
public static DialogFragment newInstance(long currentAccountId) {

View file

@ -101,6 +101,7 @@
android:contentDescription="@null"
android:focusable="false"
android:scaleType="center"
app:tint="@color/black"
app:srcCompat="@drawable/ic_person_add_grey600_24dp" />
<TextView
@ -131,6 +132,7 @@
android:contentDescription="@null"
android:focusable="false"
android:scaleType="center"
app:tint="@color/black"
app:srcCompat="@drawable/ic_settings_grey600_24dp" />
<TextView