Use M3 and branding util for ExceptionActivity

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-07-23 10:38:53 +02:00 committed by Tobias Kaminsky
parent 03156e89f8
commit 4d7472f190
2 changed files with 8 additions and 2 deletions

View file

@ -19,6 +19,7 @@ import java.util.Collections;
import it.niedermann.android.util.ClipboardUtil;
import it.niedermann.nextcloud.exception.ExceptionUtil;
import it.niedermann.owncloud.notes.BuildConfig;
import it.niedermann.owncloud.notes.NotesApplication;
import it.niedermann.owncloud.notes.R;
import it.niedermann.owncloud.notes.databinding.ActivityExceptionBinding;
import it.niedermann.owncloud.notes.exception.tips.TipsAdapter;
@ -53,6 +54,11 @@ public class ExceptionActivity extends AppCompatActivity {
binding.copy.setOnClickListener((v) -> ClipboardUtil.copyToClipboard(this, getString(R.string.simple_exception), "```\n" + debugInfos + "\n```"));
binding.close.setOnClickListener((v) -> finish());
NotesApplication.brandingUtil().platform.themeStatusBar(this);
NotesApplication.brandingUtil().material.themeToolbar(binding.toolbar);
NotesApplication.brandingUtil().material.colorMaterialButtonPrimaryBorderless(binding.close);
NotesApplication.brandingUtil().material.colorMaterialButtonPrimaryFilled(binding.copy);
adapter.setThrowables(Collections.singletonList(throwable));
}

View file

@ -81,7 +81,7 @@
android:orientation="horizontal"
android:weightSum="1.0">
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/close"
style="@style/Widget.Material3.Button.TextButton"
android:layout_width="wrap_content"
@ -90,7 +90,7 @@
android:text="@string/simple_close"
android:textColor="@color/defaultBrand" />
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/copy"
style="@style/Widget.Material3.Button"
android:layout_width="wrap_content"