Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/Android-SingleSignOn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁlvaro Brey <alvaro.brey@nextcloud.com>2022-11-07 15:13:14 +0300
committerÁlvaro Brey <alvaro.brey@nextcloud.com>2022-11-07 15:13:14 +0300
commitedb34d1cb80af96d310a2838df1e1a9873bca129 (patch)
treee5c8f797d8ec1d42789ab033357cc0a39412d5cb
parent69d70e182d0cf5b273d781b532210693e1ffe31f (diff)
Use material 3 for error dialogs and sample appmaterial-3
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
-rw-r--r--lib/build.gradle2
-rw-r--r--lib/src/main/java/com/nextcloud/android/sso/ui/UiExceptionManager.java3
-rw-r--r--sample/src/main/res/values-night/themes.xml4
-rw-r--r--sample/src/main/res/values/themes.xml4
4 files changed, 8 insertions, 5 deletions
diff --git a/lib/build.gradle b/lib/build.gradle
index df9665a..e7844b3 100644
--- a/lib/build.gradle
+++ b/lib/build.gradle
@@ -105,6 +105,8 @@ dependencies {
implementation 'androidx.core:core:1.8.0'
implementation 'androidx.fragment:fragment:1.5.4'
+ implementation 'com.google.android.material:material:1.6.1'
+
compileOnly "org.projectlombok:lombok:1.18.24"
annotationProcessor "org.projectlombok:lombok:1.18.24"
diff --git a/lib/src/main/java/com/nextcloud/android/sso/ui/UiExceptionManager.java b/lib/src/main/java/com/nextcloud/android/sso/ui/UiExceptionManager.java
index 4068c33..eeee37f 100644
--- a/lib/src/main/java/com/nextcloud/android/sso/ui/UiExceptionManager.java
+++ b/lib/src/main/java/com/nextcloud/android/sso/ui/UiExceptionManager.java
@@ -14,6 +14,7 @@ import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.NotificationCompat;
+import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.nextcloud.android.sso.R;
import com.nextcloud.android.sso.exceptions.NextcloudApiNotRespondingException;
import com.nextcloud.android.sso.exceptions.SSOException;
@@ -53,7 +54,7 @@ public final class UiExceptionManager {
final SpannableString message = new SpannableString(exception.getMessage(context));
Linkify.addLinks(message, Linkify.ALL);
- AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context)
+ AlertDialog.Builder dialogBuilder = new MaterialAlertDialogBuilder(context)
.setTitle(exception.getTitle(context))
.setMessage(message)
.setPositiveButton(android.R.string.yes, callback)
diff --git a/sample/src/main/res/values-night/themes.xml b/sample/src/main/res/values-night/themes.xml
index 78d9b4c..698f19e 100644
--- a/sample/src/main/res/values-night/themes.xml
+++ b/sample/src/main/res/values-night/themes.xml
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
- <style name="Theme.AndroidSingleSignOn" parent="Theme.MaterialComponents.DayNight.NoActionBar">
+ <style name="Theme.AndroidSingleSignOn" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/nextcloud_blue</item>
<item name="colorPrimaryVariant">@color/nextcloud_blue</item>
@@ -13,4 +13,4 @@
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
-</resources> \ No newline at end of file
+</resources>
diff --git a/sample/src/main/res/values/themes.xml b/sample/src/main/res/values/themes.xml
index e2ee5bf..e433d8a 100644
--- a/sample/src/main/res/values/themes.xml
+++ b/sample/src/main/res/values/themes.xml
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
- <style name="Theme.AndroidSingleSignOn" parent="Theme.MaterialComponents.DayNight.NoActionBar">
+ <style name="Theme.AndroidSingleSignOn" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/nextcloud_blue</item>
<item name="colorPrimaryVariant">@color/nextcloud_blue</item>
@@ -13,4 +13,4 @@
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
-</resources> \ No newline at end of file
+</resources>