diff options
author | Ricki Hirner <hirner@bitfire.at> | 2019-12-26 18:55:28 +0300 |
---|---|---|
committer | Ricki Hirner <hirner@bitfire.at> | 2019-12-26 18:56:08 +0300 |
commit | b552b2c440b43f86b6b3d69c97c0d9d62a351f9a (patch) | |
tree | 89273e8758a9adbf5f29f0340fa44a1095f1ca90 | |
parent | 3b6e552e74a39f11a0035512830af757b2901fcb (diff) |
Use new Material theme
-rw-r--r-- | build.gradle | 1 | ||||
-rw-r--r-- | src/main/AndroidManifest.xml | 3 | ||||
-rw-r--r-- | src/main/res/layout/activity_trust_certificate.xml | 25 |
3 files changed, 17 insertions, 12 deletions
diff --git a/build.gradle b/build.gradle index ac0c8e6..1f88fc4 100644 --- a/build.gradle +++ b/build.gradle @@ -61,6 +61,7 @@ dependencies { implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' implementation 'androidx.lifecycle:lifecycle-livedata:2.1.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' + implementation 'com.google.android.material:material:1.2.0-alpha03' implementation "org.conscrypt:conscrypt-android:${versions.conscrypt}" androidTestImplementation 'androidx.test:runner:1.2.0' diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 4295ab6..d3104a2 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="at.bitfire.cert4android"> + xmlns:tools="http://schemas.android.com/tools" + package="at.bitfire.cert4android"> <application> diff --git a/src/main/res/layout/activity_trust_certificate.xml b/src/main/res/layout/activity_trust_certificate.xml index 9470a59..acdfffb 100644 --- a/src/main/res/layout/activity_trust_certificate.xml +++ b/src/main/res/layout/activity_trust_certificate.xml @@ -25,21 +25,22 @@ android:text="@string/trust_certificate_unknown_certificate_found" android:textAppearance="?android:attr/textAppearanceMedium"/> - <androidx.cardview.widget.CardView + <com.google.android.material.card.MaterialCardView android:layout_width="match_parent" android:layout_height="wrap_content" - app:cardElevation="8dp"> + style="@style/Widget.MaterialComponents.CardView"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:layout_margin="8dp"> + android:layout_margin="8dp" + android:padding="8dp"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - style="@style/TextView.Heading" + style="@style/TextAppearance.MaterialComponents.Headline5" android:layout_marginBottom="16dp" android:text="@string/trust_certificate_x509_certificate_details"/> @@ -106,30 +107,32 @@ android:checked="@={model.verifiedByUser}" android:text="@string/trust_certificate_fingerprint_verified"/> - <androidx.appcompat.widget.ButtonBarLayout + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:orientation="horizontal"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" - style="@style/Widget.AppCompat.Button.Borderless.Colored" + android:layout_marginRight="16dp" + style="@style/Widget.MaterialComponents.Button" android:text="@string/trust_certificate_accept" android:onClick="acceptCertificate" - android:enabled="@{model.verifiedByUser}"/> + android:enabled="@{model.verifiedByUser}" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" - style="@style/Widget.AppCompat.Button.Borderless" + style="@style/Widget.MaterialComponents.Button.TextButton" android:text="@string/trust_certificate_reject" android:onClick="rejectCertificate"/> - </androidx.appcompat.widget.ButtonBarLayout> + </LinearLayout> </LinearLayout> - </androidx.cardview.widget.CardView> + </com.google.android.material.card.MaterialCardView> <TextView android:layout_width="match_parent" |