diff --git a/SimpleLogin/app/build.gradle b/SimpleLogin/app/build.gradle index 3978839..70179d8 100755 --- a/SimpleLogin/app/build.gradle +++ b/SimpleLogin/app/build.gradle @@ -6,7 +6,7 @@ apply plugin: "androidx.navigation.safeargs" apply plugin: 'com.android.application' android { - compileSdk 34 + compileSdk 35 defaultConfig { applicationId "io.simplelogin.android" @@ -44,12 +44,12 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() + jvmTarget = JavaVersion.VERSION_21.toString() } flavorDimensions 'version' @@ -69,23 +69,23 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.7.0' - implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.core:core-ktx:1.15.0' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7' - implementation 'com.google.android.material:material:1.11.0' - implementation 'com.google.code.gson:gson:2.9.1' + implementation 'com.google.android.material:material:1.12.0' + implementation 'com.google.code.gson:gson:2.11.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation "androidx.recyclerview:recyclerview:1.3.2" implementation 'com.github.bumptech.glide:glide:4.11.0' implementation "androidx.biometric:biometric:1.1.0" - implementation "androidx.browser:browser:1.7.0" + implementation "androidx.browser:browser:1.8.0" // Navigation - implementation 'androidx.navigation:navigation-fragment-ktx:2.7.6' - implementation 'androidx.navigation:navigation-ui-ktx:2.7.6' + implementation 'androidx.navigation:navigation-fragment-ktx:2.8.3' + implementation 'androidx.navigation:navigation-ui-ktx:2.8.3' // Shared view model - implementation "androidx.fragment:fragment-ktx:1.6.2" + implementation "androidx.fragment:fragment-ktx:1.8.5" } diff --git a/SimpleLogin/app/src/main/java/io/simplelogin/android/module/share/ShareActivity.kt b/SimpleLogin/app/src/main/java/io/simplelogin/android/module/share/ShareActivity.kt index 7713c6a..e6b97b2 100755 --- a/SimpleLogin/app/src/main/java/io/simplelogin/android/module/share/ShareActivity.kt +++ b/SimpleLogin/app/src/main/java/io/simplelogin/android/module/share/ShareActivity.kt @@ -152,7 +152,11 @@ class ShareActivity : BaseAppCompatActivity() { } // Move cursor to the last character - binding.prefixEditText.setSelection(binding.prefixEditText.text.count()) + binding.prefixEditText.apply { + text?.let { + setSelection(it.length) + } + } } private fun setLoading(loading: Boolean) { diff --git a/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/extension/Context.kt b/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/extension/Context.kt index 25b6837..ae7c3a9 100755 --- a/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/extension/Context.kt +++ b/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/extension/Context.kt @@ -30,7 +30,7 @@ fun Context.toastUpToDate() = toastShortly("You are up to date") fun Context.getVersionName(): String { val packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES) - return packageInfo.versionName + return packageInfo.versionName.orEmpty() } fun Context.dpToPixel(dp: Float): Float = diff --git a/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/model/Alias.kt b/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/model/Alias.kt index 3c1d151..28f5913 100755 --- a/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/model/Alias.kt +++ b/SimpleLogin/app/src/main/java/io/simplelogin/android/utils/model/Alias.kt @@ -4,6 +4,7 @@ import android.content.Context import android.os.Parcelable import android.text.Spannable import android.text.SpannableStringBuilder +import android.util.TypedValue import androidx.core.content.ContextCompat import androidx.core.text.color import com.google.gson.annotations.SerializedName @@ -73,7 +74,7 @@ data class Alias( fun getCountSpannableString(context: Context): Spannable { if (_countSpannableString == null) { val darkGrayColor = ContextCompat.getColor(context, R.color.colorDarkGray) - val blackColor = ContextCompat.getColor(context, R.color.colorText) + val blackColor = getColorFromAttr(context, R.attr.colorOnSurface) val spannableString = SpannableStringBuilder() .color(blackColor) { append("$forwardCount ") } .color(darkGrayColor) { append(if (forwardCount > 1) "forwards," else "forwards,") } @@ -144,13 +145,19 @@ data class AliasArray( @SerializedName("aliases") val aliases: List ) +fun getColorFromAttr(context: Context, attr: Int): Int { + val typedValue = TypedValue() + context.theme.resolveAttribute(attr, typedValue, true) + return typedValue.data +} + fun List.toSpannableString(context: Context): Spannable { - val primaryColor = ContextCompat.getColor(context, R.color.colorPrimary) - val blackColor = ContextCompat.getColor(context, R.color.colorText) + val primaryColor = getColorFromAttr(context, R.attr.colorPrimary) + val textColor = getColorFromAttr(context, R.attr.colorOnSurface) val spannableString = SpannableStringBuilder() forEachIndexed { index, aliasMailbox -> - spannableString.color(blackColor) { append(" ${aliasMailbox.email} ") } + spannableString.color(textColor) { append(" ${aliasMailbox.email} ") } if (index != size - 1) { spannableString.color(primaryColor) { append("&") } } diff --git a/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityHeaderViewHolder.kt b/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityHeaderViewHolder.kt index bab7187..1a53219 100755 --- a/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityHeaderViewHolder.kt +++ b/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityHeaderViewHolder.kt @@ -93,7 +93,7 @@ class AliasActivityHeaderViewHolder(private val binding: RecyclerItemAliasActivi ContextCompat.getDrawable(context, R.drawable.ic_block_58dp) ) binding.blockedStat.rootLinearLayout.setBackgroundColor( - ContextCompat.getColor(context, R.color.colorNegative) + ContextCompat.getColor(context, R.color.color_error) ) binding.blockedStat.numberTextView.text = "${alias.blockCount}" binding.blockedStat.typeTextView.text = "Email blocked" diff --git a/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityViewHolder.kt b/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityViewHolder.kt index f5ae5b8..3da76a8 100755 --- a/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityViewHolder.kt +++ b/SimpleLogin/app/src/main/java/io/simplelogin/android/viewholder/AliasActivityViewHolder.kt @@ -36,7 +36,7 @@ class AliasActivityViewHolder(private val binding: RecyclerItemAliasActivityBind R.drawable.ic_send_28dp ) ) - binding.iconImageView.setTint(R.color.colorPrimary) + binding.iconImageView.setTint(R.color.color_primary) } Action.REPLY -> { @@ -47,7 +47,7 @@ class AliasActivityViewHolder(private val binding: RecyclerItemAliasActivityBind R.drawable.ic_reply_24dp ) ) - binding.iconImageView.setTint(R.color.colorPrimary) + binding.iconImageView.setTint(R.color.color_primary) } else -> { @@ -58,7 +58,7 @@ class AliasActivityViewHolder(private val binding: RecyclerItemAliasActivityBind R.drawable.ic_block_24dp ) ) - binding.iconImageView.setTint(R.color.colorNegative) + binding.iconImageView.setTint(R.color.color_error) } } } diff --git a/SimpleLogin/app/src/main/res/color/btn_text_color_state.xml b/SimpleLogin/app/src/main/res/color/btn_text_color_state.xml deleted file mode 100644 index 864f5e8..0000000 --- a/SimpleLogin/app/src/main/res/color/btn_text_color_state.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/color/sl_sign_in_text_color_state.xml b/SimpleLogin/app/src/main/res/color/sl_sign_in_text_color_state.xml index 7d8bdc2..4545ef3 100644 --- a/SimpleLogin/app/src/main/res/color/sl_sign_in_text_color_state.xml +++ b/SimpleLogin/app/src/main/res/color/sl_sign_in_text_color_state.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/color/switch_track_color_state.xml b/SimpleLogin/app/src/main/res/color/switch_track_color_state.xml deleted file mode 100644 index 7769440..0000000 --- a/SimpleLogin/app/src/main/res/color/switch_track_color_state.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/SimpleLogin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml index f61fc22..15d94f2 100755 --- a/SimpleLogin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ b/SimpleLogin/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -1,5 +1,4 @@ - - - - - - - - - - - - - - diff --git a/SimpleLogin/app/src/main/res/drawable/button_border_sl.xml b/SimpleLogin/app/src/main/res/drawable/button_border_sl.xml deleted file mode 100644 index 0882cf4..0000000 --- a/SimpleLogin/app/src/main/res/drawable/button_border_sl.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/SimpleLogin/app/src/main/res/drawable/card_shape_with_ripple.xml b/SimpleLogin/app/src/main/res/drawable/card_shape_with_ripple.xml index 8b12b00..267265e 100755 --- a/SimpleLogin/app/src/main/res/drawable/card_shape_with_ripple.xml +++ b/SimpleLogin/app/src/main/res/drawable/card_shape_with_ripple.xml @@ -8,8 +8,7 @@ - - + diff --git a/SimpleLogin/app/src/main/res/drawable/ic_chevron_left_24dp.xml b/SimpleLogin/app/src/main/res/drawable/ic_chevron_left_24dp.xml index 20d0b12..7d73f95 100755 --- a/SimpleLogin/app/src/main/res/drawable/ic_chevron_left_24dp.xml +++ b/SimpleLogin/app/src/main/res/drawable/ic_chevron_left_24dp.xml @@ -3,7 +3,7 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="@color/colorPrimary"> + android:tint="?attr/colorPrimary"> diff --git a/SimpleLogin/app/src/main/res/drawable/ic_close_24dp.xml b/SimpleLogin/app/src/main/res/drawable/ic_close_24dp.xml index 370d1f8..edcf0f5 100755 --- a/SimpleLogin/app/src/main/res/drawable/ic_close_24dp.xml +++ b/SimpleLogin/app/src/main/res/drawable/ic_close_24dp.xml @@ -3,7 +3,7 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="@color/colorPrimary"> + android:tint="?attr/colorPrimary"> diff --git a/SimpleLogin/app/src/main/res/drawable/ic_hamburger.xml b/SimpleLogin/app/src/main/res/drawable/ic_hamburger.xml index 17fbc0d..3d5162a 100755 --- a/SimpleLogin/app/src/main/res/drawable/ic_hamburger.xml +++ b/SimpleLogin/app/src/main/res/drawable/ic_hamburger.xml @@ -4,6 +4,6 @@ android:viewportWidth="24" android:viewportHeight="24"> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable/ic_user_48dp.xml b/SimpleLogin/app/src/main/res/drawable/ic_user_48dp.xml index 8572034..b587970 100755 --- a/SimpleLogin/app/src/main/res/drawable/ic_user_48dp.xml +++ b/SimpleLogin/app/src/main/res/drawable/ic_user_48dp.xml @@ -3,7 +3,7 @@ android:height="48dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="@color/colorPrimary"> + android:tint="?attr/colorPrimary"> diff --git a/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_root_view.xml b/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_root_view.xml index 693057c..fe9622f 100755 --- a/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_root_view.xml +++ b/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_root_view.xml @@ -1,10 +1,10 @@ - + + android:topLeftRadius="16dp" + android:topRightRadius="16dp" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_toolbar.xml b/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_toolbar.xml index 693057c..fe9622f 100755 --- a/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_toolbar.xml +++ b/SimpleLogin/app/src/main/res/drawable/shape_bottom_sheet_toolbar.xml @@ -1,10 +1,10 @@ - + + android:topLeftRadius="16dp" + android:topRightRadius="16dp" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable/shape_cornered_all_four_corners.xml b/SimpleLogin/app/src/main/res/drawable/shape_cornered_all_four_corners.xml index 4be4cd8..5852cda 100755 --- a/SimpleLogin/app/src/main/res/drawable/shape_cornered_all_four_corners.xml +++ b/SimpleLogin/app/src/main/res/drawable/shape_cornered_all_four_corners.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable/shape_default_mailbox.xml b/SimpleLogin/app/src/main/res/drawable/shape_default_mailbox.xml index 242533c..2dccdf8 100755 --- a/SimpleLogin/app/src/main/res/drawable/shape_default_mailbox.xml +++ b/SimpleLogin/app/src/main/res/drawable/shape_default_mailbox.xml @@ -2,5 +2,5 @@ - + \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable/shape_not_verified_mailbox.xml b/SimpleLogin/app/src/main/res/drawable/shape_not_verified_mailbox.xml index 8b8cbbe..2d6e4b2 100755 --- a/SimpleLogin/app/src/main/res/drawable/shape_not_verified_mailbox.xml +++ b/SimpleLogin/app/src/main/res/drawable/shape_not_verified_mailbox.xml @@ -2,5 +2,5 @@ - + \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable/shape_oval_outline_primary_color.xml b/SimpleLogin/app/src/main/res/drawable/shape_oval_outline_primary_color.xml index a448260..094122f 100755 --- a/SimpleLogin/app/src/main/res/drawable/shape_oval_outline_primary_color.xml +++ b/SimpleLogin/app/src/main/res/drawable/shape_oval_outline_primary_color.xml @@ -3,5 +3,5 @@ android:shape="oval"> + android:color="?attr/colorPrimary" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/drawable/switch_thumb.xml b/SimpleLogin/app/src/main/res/drawable/switch_thumb.xml deleted file mode 100755 index 5ced23d..0000000 --- a/SimpleLogin/app/src/main/res/drawable/switch_thumb.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/SimpleLogin/app/src/main/res/drawable/switch_track.xml b/SimpleLogin/app/src/main/res/drawable/switch_track.xml deleted file mode 100755 index 7e977eb..0000000 --- a/SimpleLogin/app/src/main/res/drawable/switch_track.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/SimpleLogin/app/src/main/res/layout/activity_about.xml b/SimpleLogin/app/src/main/res/layout/activity_about.xml index 257de22..b84248b 100755 --- a/SimpleLogin/app/src/main/res/layout/activity_about.xml +++ b/SimpleLogin/app/src/main/res/layout/activity_about.xml @@ -24,7 +24,7 @@ android:layout_height="match_parent" android:layout_gravity="start" app:headerLayout="@layout/menu_header" - app:itemIconTint="@color/colorPrimary" + app:itemIconTint="?attr/colorPrimary" app:itemTextColor="?attr/colorControlNormal" /> diff --git a/SimpleLogin/app/src/main/res/layout/activity_home.xml b/SimpleLogin/app/src/main/res/layout/activity_home.xml index 70fd3a1..77da1d2 100755 --- a/SimpleLogin/app/src/main/res/layout/activity_home.xml +++ b/SimpleLogin/app/src/main/res/layout/activity_home.xml @@ -21,13 +21,8 @@ android:id="@+id/navigation_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/colorItemBackground" android:layout_gravity="start" - app:itemIconPadding="@dimen/margin_20" - app:itemIconSize="22dp" app:headerLayout="@layout/menu_header" - app:itemIconTint="@color/colorPrimary" - app:itemTextColor="@color/colorControlNormal" app:menu="@menu/home_left_menu" /> diff --git a/SimpleLogin/app/src/main/res/layout/activity_login.xml b/SimpleLogin/app/src/main/res/layout/activity_login.xml index 25f578a..58b42fd 100755 --- a/SimpleLogin/app/src/main/res/layout/activity_login.xml +++ b/SimpleLogin/app/src/main/res/layout/activity_login.xml @@ -6,7 +6,7 @@ + android:background="?attr/colorSurface"> + android:textColor="?attr/colorOnSurface" /> @@ -70,20 +70,16 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textPassword" - android:textColor="@color/colorText" /> + android:textColor="?attr/colorOnSurface" /> - - + tools:ignore="HardcodedText" + style="@style/Widget.Material3.Button.OutlinedButton"/> - + android:layout_height="wrap_content"/> + android:background="?attr/colorOnSurface" /> - - + android:background="?attr/colorSurface"> - - @@ -69,7 +68,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textEmailAddress" - android:textColor="@color/colorText" /> + android:textColor="?attr/colorOnSurface" /> + android:textColor="?attr/colorOnSurface" /> + android:background="?attr/colorSurface"> - diff --git a/SimpleLogin/app/src/main/res/layout/activity_verification.xml b/SimpleLogin/app/src/main/res/layout/activity_verification.xml index 22e0e97..7fb8abe 100755 --- a/SimpleLogin/app/src/main/res/layout/activity_verification.xml +++ b/SimpleLogin/app/src/main/res/layout/activity_verification.xml @@ -6,7 +6,7 @@ + android:background="?attr/colorSurface"> - - @@ -57,68 +56,68 @@ android:layout_height="wrap_content" android:weightSum="6"> - - - - - - @@ -128,13 +127,13 @@ android:layout_width="match_parent" android:layout_height="20dp" /> - - - - @@ -193,42 +192,42 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - @@ -241,42 +240,42 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - @@ -289,7 +288,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - @@ -298,14 +297,14 @@ android:layout_width="15dp" android:layout_height="90dp" /> - + app:tint="?attr/colorOnSurface" /> - @@ -22,7 +22,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:alpha="0.2" - app:tint="@color/colorWhite" + app:tint="?attr/colorOnPrimary" tools:ignore="ContentDescription" tools:src="@drawable/ic_send_48dp" /> @@ -38,7 +38,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?attr/textAppearanceHeadline6" - android:textColor="@color/colorWhite" + android:textColor="?attr/colorOnPrimary" tools:text="50" /> + \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/bottom_sheet_change_api_url.xml b/SimpleLogin/app/src/main/res/layout/bottom_sheet_change_api_url.xml index f43a2c6..a788eca 100755 --- a/SimpleLogin/app/src/main/res/layout/bottom_sheet_change_api_url.xml +++ b/SimpleLogin/app/src/main/res/layout/bottom_sheet_change_api_url.xml @@ -27,14 +27,14 @@ android:textSize="16sp" tools:ignore="HardcodedText" /> - @@ -47,19 +47,19 @@ android:orientation="vertical" android:padding="20dp"> - + android:textColor="?attr/colorError" /> - + android:textColor="?attr/colorOnSurface" /> + android:textColor="?attr/colorOnSurface" /> @@ -92,6 +91,7 @@ style="@style/Widget.Material3.Button.TextButton" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/margin_8" android:layout_gravity="center" android:text="Reset to default value" android:textSize="16sp" @@ -99,12 +99,11 @@ - + android:layout_height="wrap_content" + android:layout_below="@id/toolbar" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/bottom_sheet_create_contact.xml b/SimpleLogin/app/src/main/res/layout/bottom_sheet_create_contact.xml index c8a66a4..614f761 100755 --- a/SimpleLogin/app/src/main/res/layout/bottom_sheet_create_contact.xml +++ b/SimpleLogin/app/src/main/res/layout/bottom_sheet_create_contact.xml @@ -19,14 +19,14 @@ android:background="@drawable/shape_bottom_sheet_toolbar" app:layout_constraintTop_toTopOf="parent"> - @@ -36,26 +36,25 @@ android:layout_height="wrap_content" android:layout_below="@id/toolbar" android:layout_centerInParent="true" - android:background="@color/colorItemBackground" android:orientation="vertical" android:padding="20dp"> - - + android:textColor="?attr/colorOnSurface" /> - + android:layout_height="wrap_content" + android:layout_below="@id/toolbar"/> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/bottom_sheet_enter_api_key.xml b/SimpleLogin/app/src/main/res/layout/bottom_sheet_enter_api_key.xml index 0e2680d..a1035ce 100755 --- a/SimpleLogin/app/src/main/res/layout/bottom_sheet_enter_api_key.xml +++ b/SimpleLogin/app/src/main/res/layout/bottom_sheet_enter_api_key.xml @@ -18,14 +18,14 @@ android:background="@drawable/shape_bottom_sheet_toolbar" app:layout_constraintTop_toTopOf="parent"> - @@ -35,14 +35,13 @@ android:layout_height="wrap_content" android:layout_below="@id/toolbar" android:layout_centerInParent="true" - android:background="@color/colorItemBackground" android:orientation="vertical" android:padding="20dp"> - + android:textColor="?attr/colorOnSurface" /> - + android:layout_height="wrap_content" + android:layout_below="@id/toolbar" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/bottom_sheet_forgot_password.xml b/SimpleLogin/app/src/main/res/layout/bottom_sheet_forgot_password.xml index 0c41987..d18ca56 100755 --- a/SimpleLogin/app/src/main/res/layout/bottom_sheet_forgot_password.xml +++ b/SimpleLogin/app/src/main/res/layout/bottom_sheet_forgot_password.xml @@ -18,14 +18,14 @@ android:background="@drawable/shape_bottom_sheet_toolbar" app:layout_constraintTop_toTopOf="parent"> - @@ -35,15 +35,14 @@ android:layout_height="wrap_content" android:layout_below="@id/toolbar" android:layout_centerInParent="true" - android:background="@color/colorItemBackground" android:orientation="vertical" android:padding="20dp"> - + android:textColor="?attr/colorError" /> + android:textColor="?attr/colorOnSurface" /> - + android:layout_height="wrap_content" + android:layout_below="@id/toolbar" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_send_mail.xml b/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_send_mail.xml index 62e69b8..68cc0a1 100755 --- a/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_send_mail.xml +++ b/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_send_mail.xml @@ -24,18 +24,18 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="15dp" - android:background="@color/colorItemBackground" + android:background="@android:color/transparent" android:src="@drawable/ic_close_24dp" tools:ignore="ContentDescription" /> - @@ -45,56 +45,54 @@ android:layout_height="wrap_content" android:layout_below="@id/toolbar" android:layout_centerInParent="true" - android:background="@color/colorItemBackground" android:orientation="vertical" android:padding="20dp"> - - + android:textColor="?attr/colorOnSurface" /> - + android:textColor="?attr/colorOnSurface" /> - + android:textColor="?attr/colorOnSurface" /> - - + android:layout_height="wrap_content" + android:layout_below="@id/toolbar"/> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_to_use_mailbox.xml b/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_to_use_mailbox.xml index 746f3d1..b5d8627 100755 --- a/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_to_use_mailbox.xml +++ b/SimpleLogin/app/src/main/res/layout/bottom_sheet_how_to_use_mailbox.xml @@ -24,38 +24,37 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="15dp" - android:background="@color/colorItemBackground" + android:background="@android:color/transparent" android:src="@drawable/ic_close_24dp" tools:ignore="ContentDescription" /> - - - + android:layout_height="wrap_content" + android:layout_below="@id/toolbar" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/dialog_view_edit_text.xml b/SimpleLogin/app/src/main/res/layout/dialog_view_edit_text.xml index 32b0240..963ae03 100755 --- a/SimpleLogin/app/src/main/res/layout/dialog_view_edit_text.xml +++ b/SimpleLogin/app/src/main/res/layout/dialog_view_edit_text.xml @@ -2,11 +2,11 @@ - \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/fragment_about.xml b/SimpleLogin/app/src/main/res/layout/fragment_about.xml index c26fb16..ee283a9 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_about.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_about.xml @@ -15,17 +15,16 @@ android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" app:navigationIcon="@drawable/ic_hamburger" - android:background="@color/colorItemBackground" app:contentInsetStartWithNavigation="0dp"> - @@ -35,7 +34,7 @@ android:id="@+id/rootNestedScrollView" android:layout_width="match_parent" android:layout_height="0dp" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -59,30 +58,22 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - - - + android:layout_height="wrap_content" + android:layout_below="@id/appVersionTextView"/> - - - @@ -116,31 +105,23 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - - - + android:layout_height="wrap_content" + android:layout_below="@id/howTextView"/> - - - - - - - + android:layout_height="wrap_content" + android:layout_below="@id/whatTextView"/> - - - @@ -215,31 +184,23 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - - - + android:layout_height="wrap_content" + android:layout_below="@id/teamTextView"/> - - - @@ -265,31 +224,23 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - - - + android:layout_height="wrap_content" + android:layout_below="@id/pricingTextView"/> - - - @@ -315,31 +264,23 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - - - + android:layout_height="wrap_content" + android:layout_below="@id/helpTextView"/> - - - @@ -365,31 +304,23 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - - - + android:layout_height="wrap_content" + android:layout_below="@id/termsTextView"/> - - - - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_alias_activity.xml b/SimpleLogin/app/src/main/res/layout/fragment_alias_activity.xml index c0e7b7f..830c3c3 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_alias_activity.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_alias_activity.xml @@ -16,11 +16,10 @@ android:layout_height="wrap_content" app:layout_constraintTop_toTopOf="parent" app:navigationIcon="@drawable/ic_chevron_left_24dp" - android:background="@color/colorItemBackground" app:menu="@menu/menu_alias_activity" app:contentInsetStartWithNavigation="0dp"> - @@ -55,18 +54,19 @@ android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" android:clipToPadding="false" android:paddingBottom="50dp" tools:listitem="@layout/recycler_item_alias_activity"/> - + android:layout_gravity="center" + android:indeterminate="true"/> - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_alias_create.xml b/SimpleLogin/app/src/main/res/layout/fragment_alias_create.xml index 658de68..dd15522 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_alias_create.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_alias_create.xml @@ -6,7 +6,7 @@ + android:background="?attr/colorSurface"> @@ -18,7 +18,7 @@ app:layout_constraintTop_toTopOf="parent" app:navigationIcon="@drawable/ic_close_24dp"> - @@ -51,7 +51,7 @@ android:layout_height="wrap_content" android:weightSum="2"> - @@ -78,12 +78,11 @@ android:layout_height="wrap_content" android:paddingBottom="10dp" android:text="@string/create_alias_warning" - android:textColor="@color/colorNegative" /> + android:textColor="?attr/colorError" /> - + android:layout_height="wrap_content" /> - - - + android:background="?attr/colorOnSurfaceVariant" /> - - @@ -169,14 +168,13 @@ android:layout_height="wrap_content" android:hint="Ex: Jane Doe" android:textAppearance="?textAppearanceBody2" - android:textColor="@color/colorText" + android:textColor="?attr/colorOnSurface" tools:ignore="HardcodedText" /> - + android:layout_height="wrap_content" /> - - @@ -219,13 +217,12 @@ android:layout_height="wrap_content" android:hint="Ex: For tech newsletters, online shopping..." android:textAppearance="?textAppearanceBody2" - android:textColor="@color/colorText" + android:textColor="?attr/colorOnSurface" tools:ignore="HardcodedText" /> - + android:textColor="?attr/colorOnSurfaceVariant" /> - + app:layout_constraintTop_toBottomOf="@id/toolbar" + android:indeterminate="true"/> - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_alias_list.xml b/SimpleLogin/app/src/main/res/layout/fragment_alias_list.xml index b4ec83f..e3c163b 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_alias_list.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_alias_list.xml @@ -7,13 +7,13 @@ + android:background="?attr/colorSurface"> + android:background="?attr/colorSurface"> @@ -26,13 +26,13 @@ app:navigationIcon="@drawable/ic_hamburger" app:contentInsetStartWithNavigation="0dp"> - @@ -45,12 +45,10 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/toolbar" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" app:tabIndicator="@drawable/tab_indicator" app:tabIndicatorFullWidth="false" - app:tabTextAppearance="@style/TabText" - app:tabTextColor="@color/colorControlNormal" - app:tabSelectedTextColor="@color/colorPrimary"> + app:tabTextAppearance="@style/TabText"> - @@ -102,7 +99,7 @@ android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" android:clipToPadding="false" android:paddingBottom="50dp" tools:listitem="@layout/recycler_item_alias"/> @@ -115,20 +112,19 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="24dp" - android:backgroundTint="@color/colorPrimary" app:srcCompat="@drawable/ic_arrow_upward_24dp" - app:tint="@color/colorWhite" tools:ignore="ContentDescription" /> - + android:layout_centerInParent="true" + android:indeterminate="true"/> - + \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/fragment_alias_picker.xml b/SimpleLogin/app/src/main/res/layout/fragment_alias_picker.xml index 20f096e..d305839 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_alias_picker.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_alias_picker.xml @@ -6,24 +6,34 @@ + android:background="?attr/colorSurface"> + + - @@ -32,14 +42,8 @@ android:id="@+id/tab_layout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/colorItemBackground" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/toolbar" app:tabIndicator="@drawable/tab_indicator" app:tabIndicatorFullWidth="false" - app:tabSelectedTextColor="@color/colorPrimary" - app:tabTextColor="@color/colorControlNormal" app:tabTextAppearance="@style/TabText"> + - + app:layout_constraintTop_toBottomOf="@id/appbar"> diff --git a/SimpleLogin/app/src/main/res/layout/fragment_alias_search.xml b/SimpleLogin/app/src/main/res/layout/fragment_alias_search.xml index 7a42ce5..e02defb 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_alias_search.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_alias_search.xml @@ -7,7 +7,7 @@ + android:background="?attr/colorSurface"> @@ -33,7 +33,7 @@ android:hint="Search alias" android:inputType="textNoSuggestions" android:padding="10dp" - android:textColor="@color/colorText" + android:textColor="?attr/colorOnSurface" tools:ignore="HardcodedText" /> @@ -44,7 +44,7 @@ android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="0dp" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" android:clipToPadding="false" android:paddingBottom="20dp" app:layout_constraintBottom_toBottomOf="parent" @@ -54,33 +54,33 @@ - - + app:layout_constraintTop_toBottomOf="@id/toolbar" + android:indeterminate="true"/> - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_contact_list.xml b/SimpleLogin/app/src/main/res/layout/fragment_contact_list.xml index 3579275..101e2ab 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_contact_list.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_contact_list.xml @@ -6,7 +6,7 @@ + android:background="?attr/colorSurface"> - - - @@ -84,7 +83,7 @@ android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="0dp" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" android:clipToPadding="false" android:paddingBottom="20dp" tools:listitem="@layout/recycler_item_contact"/> @@ -109,14 +108,15 @@ android:layout_centerInParent="true" android:text="Click + button to create a contact" android:textAppearance="?attr/textAppearanceSubtitle2" - android:textColor="@color/colorDarkGray" + android:textColor="?attr/colorOnSurfaceVariant" tools:ignore="HardcodedText" /> - + android:layout_centerInParent="true" + android:indeterminate="true"/> @@ -124,7 +124,7 @@ android:id="@+id/dimView" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/colorDarkGray" + android:background="?attr/colorOnSurfaceVariant" android:visibility="gone" /> + android:background="?attr/colorSurface"> @@ -18,14 +18,14 @@ app:navigationIcon="@drawable/ic_chevron_left_24dp" app:contentInsetStartWithNavigation="0dp"> - @@ -34,7 +34,7 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -98,10 +98,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -136,10 +136,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -174,10 +174,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -212,10 +212,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -250,10 +250,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -288,10 +288,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -326,10 +326,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -364,10 +364,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -402,10 +402,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -440,10 +440,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -478,10 +478,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -516,10 +516,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -554,10 +554,10 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -582,10 +582,9 @@ - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_how_it_works.xml b/SimpleLogin/app/src/main/res/layout/fragment_how_it_works.xml index 86432a4..c058a7d 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_how_it_works.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_how_it_works.xml @@ -6,7 +6,7 @@ + android:background="?attr/colorSurface"> @@ -18,13 +18,13 @@ app:navigationIcon="@drawable/ic_chevron_left_24dp" app:contentInsetStartWithNavigation="0dp"> - @@ -33,7 +33,7 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -90,17 +90,17 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -124,17 +124,17 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -151,10 +151,9 @@ - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_mailbox_list.xml b/SimpleLogin/app/src/main/res/layout/fragment_mailbox_list.xml index 4062907..45afbaf 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_mailbox_list.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_mailbox_list.xml @@ -16,7 +16,7 @@ android:id="@+id/rootConstraintLayout" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/colorItemBackground"> + android:background="?attr/colorSurface"> @@ -29,23 +29,22 @@ app:navigationIcon="@drawable/ic_hamburger" app:contentInsetStartWithNavigation="0dp"> - - @@ -64,7 +63,7 @@ android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="0dp" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" android:clipToPadding="false" android:paddingBottom="20dp" tools:listitem="@layout/recycler_item_mailbox"/> @@ -72,11 +71,12 @@ - + android:layout_centerInParent="true" + android:indeterminate="true"/> diff --git a/SimpleLogin/app/src/main/res/layout/fragment_premium.xml b/SimpleLogin/app/src/main/res/layout/fragment_premium.xml index f9e5809..849f9cc 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_premium.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_premium.xml @@ -16,16 +16,16 @@ app:layout_constraintTop_toTopOf="parent" app:navigationIcon="@drawable/ic_chevron_left_24dp" app:contentInsetStartWithNavigation="0dp" - android:background="@color/colorItemBackground"> + android:background="?attr/colorSurface"> - @@ -46,198 +46,198 @@ android:orientation="vertical" android:padding="20dp"> - - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="wrap_content" + android:layout_marginTop="20dp" /> - - - - @@ -354,18 +351,16 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="10dp" - android:text="CONTACT US" - android:textColor="@color/btn_text_color_state" + android:text="Contact us" tools:ignore="HardcodedText" /> - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_settings.xml b/SimpleLogin/app/src/main/res/layout/fragment_settings.xml index 6387689..0691fa7 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_settings.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_settings.xml @@ -7,7 +7,7 @@ android:id="@+id/rootConstraintLayout" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/colorItemBackground"> + android:background="?attr/colorSurface"> @@ -19,13 +19,13 @@ app:navigationIcon="@drawable/ic_hamburger" app:contentInsetStartWithNavigation="0dp"> - @@ -35,7 +35,7 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_marginTop="2dp" - android:background="@color/colorItemBackground" + android:background="?attr/colorSurface" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -96,22 +96,22 @@ - - + app:layout_constraintTop_toTopOf="parent" + android:indeterminate="true"/> diff --git a/SimpleLogin/app/src/main/res/layout/fragment_webview.xml b/SimpleLogin/app/src/main/res/layout/fragment_webview.xml index 1b01122..d52891d 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_webview.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_webview.xml @@ -15,14 +15,14 @@ app:layout_constraintTop_toTopOf="parent" app:navigationIcon="@drawable/ic_chevron_left_24dp" app:contentInsetStartWithNavigation="0dp" - android:background="@color/colorItemBackground"> + android:background="?attr/colorSurface"> - diff --git a/SimpleLogin/app/src/main/res/layout/fragment_what_you_can_do.xml b/SimpleLogin/app/src/main/res/layout/fragment_what_you_can_do.xml index 560f09b..401a0a3 100755 --- a/SimpleLogin/app/src/main/res/layout/fragment_what_you_can_do.xml +++ b/SimpleLogin/app/src/main/res/layout/fragment_what_you_can_do.xml @@ -6,7 +6,7 @@ + android:background="?attr/colorSurface"> @@ -18,13 +18,13 @@ app:navigationIcon="@drawable/ic_chevron_left_24dp" app:contentInsetStartWithNavigation="0dp"> - @@ -34,7 +34,7 @@ - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -96,7 +96,7 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -135,7 +135,7 @@ android:background="@drawable/card_shape_with_ripple" android:padding="@dimen/margin_4"> - - + android:textColor="?attr/colorOnSurfaceVariant" /> @@ -167,10 +167,9 @@ - diff --git a/SimpleLogin/app/src/main/res/layout/layout_connect_with_proton_view.xml b/SimpleLogin/app/src/main/res/layout/layout_connect_with_proton_view.xml index a10e485..320234b 100644 --- a/SimpleLogin/app/src/main/res/layout/layout_connect_with_proton_view.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_connect_with_proton_view.xml @@ -1,5 +1,6 @@ - + - + android:text="@string/proton_link_account" + android:textColor="@color/protonMain" + style="@style/Widget.Material3.Button.OutlinedButton"/> - + android:text="@string/proton_unlink_account" + android:textColor="@color/protonMain" + style="@style/Widget.Material3.Button.OutlinedButton"/> - - diff --git a/SimpleLogin/app/src/main/res/layout/layout_contacts_access_view.xml b/SimpleLogin/app/src/main/res/layout/layout_contacts_access_view.xml index f35c22d..35213cb 100755 --- a/SimpleLogin/app/src/main/res/layout/layout_contacts_access_view.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_contacts_access_view.xml @@ -1,7 +1,6 @@ + xmlns:android="http://schemas.android.com/apk/res/android"> - - - + android:layout_centerVertical="true"/> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/layout_delete_account.xml b/SimpleLogin/app/src/main/res/layout/layout_delete_account.xml index a6e078a..7d7ad6a 100644 --- a/SimpleLogin/app/src/main/res/layout/layout_delete_account.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_delete_account.xml @@ -19,16 +19,16 @@ android:layout_toStartOf="@id/delete_text_view" android:orientation="vertical"> - - - diff --git a/SimpleLogin/app/src/main/res/layout/layout_force_dark_mode_card_view.xml b/SimpleLogin/app/src/main/res/layout/layout_force_dark_mode_card_view.xml index bcb8dd2..37c91ce 100755 --- a/SimpleLogin/app/src/main/res/layout/layout_force_dark_mode_card_view.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_force_dark_mode_card_view.xml @@ -1,7 +1,6 @@ + xmlns:android="http://schemas.android.com/apk/res/android"> - + android:textColor="?attr/colorOnSurface" + tools:ignore="HardcodedText"/> diff --git a/SimpleLogin/app/src/main/res/layout/layout_local_authentication.xml b/SimpleLogin/app/src/main/res/layout/layout_local_authentication.xml index 361c08f..9f5655e 100755 --- a/SimpleLogin/app/src/main/res/layout/layout_local_authentication.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_local_authentication.xml @@ -1,7 +1,6 @@ + xmlns:android="http://schemas.android.com/apk/res/android"> - - - + android:layout_centerVertical="true"/> diff --git a/SimpleLogin/app/src/main/res/layout/layout_newsletters_card_view.xml b/SimpleLogin/app/src/main/res/layout/layout_newsletters_card_view.xml index dd48dbb..6cf381f 100755 --- a/SimpleLogin/app/src/main/res/layout/layout_newsletters_card_view.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_newsletters_card_view.xml @@ -1,6 +1,5 @@ - + - + android:textColor="?attr/colorOnSurface" /> - - + android:layout_centerVertical="true"/> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/layout_profile_info_card_view.xml b/SimpleLogin/app/src/main/res/layout/layout_profile_info_card_view.xml index 2eb3bdb..93160ab 100755 --- a/SimpleLogin/app/src/main/res/layout/layout_profile_info_card_view.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_profile_info_card_view.xml @@ -33,44 +33,42 @@ android:paddingStart="@dimen/card_view_padding" tools:ignore="RtlSymmetry"> - - - - + android:layout_height="wrap_content" + android:layout_below="@id/root_linear_layout"/> - - - + android:textColor="?attr/colorOnSurface" /> - @@ -35,10 +35,10 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginBottom="18dp" - android:backgroundTint="@color/colorPrimary" + android:backgroundTint="?attr/colorPrimary" android:spinnerMode="dropdown" /> - @@ -49,7 +49,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginBottom="18dp" - android:backgroundTint="@color/colorPrimary" + android:backgroundTint="?attr/colorPrimary" android:spinnerMode="dropdown" /> diff --git a/SimpleLogin/app/src/main/res/layout/layout_sender_address_format_card_view.xml b/SimpleLogin/app/src/main/res/layout/layout_sender_address_format_card_view.xml index bb1ba9b..86d725a 100755 --- a/SimpleLogin/app/src/main/res/layout/layout_sender_address_format_card_view.xml +++ b/SimpleLogin/app/src/main/res/layout/layout_sender_address_format_card_view.xml @@ -13,23 +13,23 @@ - + android:textColor="?attr/colorOnSurface" /> - - @@ -39,7 +39,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:backgroundTint="@color/colorPrimary" + android:backgroundTint="?attr/colorPrimary" android:spinnerMode="dropdown" /> diff --git a/SimpleLogin/app/src/main/res/layout/menu_header.xml b/SimpleLogin/app/src/main/res/layout/menu_header.xml index 0798e49..17d26e3 100755 --- a/SimpleLogin/app/src/main/res/layout/menu_header.xml +++ b/SimpleLogin/app/src/main/res/layout/menu_header.xml @@ -35,24 +35,24 @@ android:paddingStart="10dp" tools:ignore="RtlSymmetry"> - - - @@ -58,7 +57,7 @@ android:layout_toEndOf="@id/aliasPinnedImageView" android:layout_centerVertical="true" android:textAppearance="?attr/textAppearanceSubtitle2" - android:textColor="@color/colorText" + android:textColor="?attr/colorOnSurface" tools:text="yautiden@gmail.com" android:textSize="16sp"/> @@ -73,8 +72,8 @@ android:gravity="center_vertical" android:paddingTop="5dp" android:textAppearance="?attr/textAppearanceCaption" - android:textColor="?attr/colorControlNormal" - app:drawableTint="?attr/colorControlNormal" + android:textColor="?attr/colorOnSurfaceVariant" + app:drawableTint="?attr/colorOnSurfaceVariant" tools:text="Created 3 days ago" android:textSize="14sp"/> @@ -89,8 +88,8 @@ android:maxLines="1" android:paddingTop="5dp" android:textAppearance="?attr/textAppearanceCaption" - android:textColor="?attr/colorControlNormal" - app:drawableTint="?attr/colorControlNormal" + android:textColor="?attr/colorOnSurfaceVariant" + app:drawableTint="?attr/colorOnSurfaceVariant" app:autoSizeMinTextSize="9sp" app:autoSizeStepGranularity="2sp" app:autoSizeTextType="uniform" @@ -107,8 +106,8 @@ android:maxLines="3" android:paddingTop="5dp" android:textAppearance="?attr/textAppearanceCaption" - android:textColor="?attr/colorControlNormal" - app:drawableTint="?attr/colorControlNormal" + android:textColor="?attr/colorOnSurfaceVariant" + app:drawableTint="?attr/colorOnSurfaceVariant" tools:text="email@example.com" android:textSize="14sp"/> @@ -121,8 +120,8 @@ android:gravity="center_vertical" android:paddingTop="5dp" android:textAppearance="?attr/textAppearanceCaption" - android:textColor="?attr/colorControlNormal" - app:drawableTint="?attr/colorControlNormal" + android:textColor="?attr/colorOnSurfaceVariant" + app:drawableTint="?attr/colorOnSurfaceVariant" tools:text="John Doe" android:textSize="14sp"/> @@ -134,7 +133,7 @@ android:maxLines="2" android:paddingTop="5dp" android:textAppearance="?attr/textAppearanceBody2" - android:textColor="@color/colorText" + android:textColor="?attr/colorOnSurface" tools:text="Alias note" android:textSize="15sp"/> @@ -144,15 +143,11 @@ android:layout_height="wrap_content" android:orientation="horizontal"> - + android:checked="true"/> diff --git a/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity.xml b/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity.xml index 5953196..65c8ddd 100755 --- a/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity.xml +++ b/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity.xml @@ -26,25 +26,25 @@ android:layout_weight="1" android:orientation="vertical"> - - diff --git a/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity_header.xml b/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity_header.xml index 6a36b0f..ce80a16 100755 --- a/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity_header.xml +++ b/SimpleLogin/app/src/main/res/layout/recycler_item_alias_activity_header.xml @@ -9,14 +9,14 @@ android:orientation="vertical" android:padding="10dp"> - - - - - - diff --git a/SimpleLogin/app/src/main/res/layout/recycler_item_contact.xml b/SimpleLogin/app/src/main/res/layout/recycler_item_contact.xml index ed41ef2..ae525d1 100755 --- a/SimpleLogin/app/src/main/res/layout/recycler_item_contact.xml +++ b/SimpleLogin/app/src/main/res/layout/recycler_item_contact.xml @@ -27,17 +27,17 @@ android:layout_weight="1" android:orientation="vertical"> - - - - - + android:indeterminate="true"/> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/layout/recycler_item_mailbox.xml b/SimpleLogin/app/src/main/res/layout/recycler_item_mailbox.xml index 1a3d9fc..f935fb6 100755 --- a/SimpleLogin/app/src/main/res/layout/recycler_item_mailbox.xml +++ b/SimpleLogin/app/src/main/res/layout/recycler_item_mailbox.xml @@ -23,13 +23,13 @@ android:orientation="vertical" android:padding="10dp"> - @@ -41,7 +41,7 @@ android:paddingTop="5dp" android:paddingEnd="5dp"> - - - - diff --git a/SimpleLogin/app/src/main/res/layout/spinner_row_domain_lite.xml b/SimpleLogin/app/src/main/res/layout/spinner_row_domain_lite.xml index 0be13f7..348f4f7 100755 --- a/SimpleLogin/app/src/main/res/layout/spinner_row_domain_lite.xml +++ b/SimpleLogin/app/src/main/res/layout/spinner_row_domain_lite.xml @@ -6,21 +6,21 @@ android:orientation="vertical" android:padding="10dp"> - - diff --git a/SimpleLogin/app/src/main/res/layout/spinner_row_text_only.xml b/SimpleLogin/app/src/main/res/layout/spinner_row_text_only.xml index d953323..4100420 100755 --- a/SimpleLogin/app/src/main/res/layout/spinner_row_text_only.xml +++ b/SimpleLogin/app/src/main/res/layout/spinner_row_text_only.xml @@ -1,10 +1,10 @@ - \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/menu/alias_picker_menu.xml b/SimpleLogin/app/src/main/res/menu/alias_picker_menu.xml index 978b4a3..0ac245d 100755 --- a/SimpleLogin/app/src/main/res/menu/alias_picker_menu.xml +++ b/SimpleLogin/app/src/main/res/menu/alias_picker_menu.xml @@ -6,7 +6,7 @@ android:id="@+id/searchMenuItem" android:icon="@drawable/ic_search_24dp" android:title="Search" - app:iconTint="@color/colorPrimary" + app:iconTint="?attr/colorPrimary" app:showAsAction="ifRoom" tools:ignore="HardcodedText" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/menu/menu_alias_activity.xml b/SimpleLogin/app/src/main/res/menu/menu_alias_activity.xml index a4aa3c4..69258a1 100644 --- a/SimpleLogin/app/src/main/res/menu/menu_alias_activity.xml +++ b/SimpleLogin/app/src/main/res/menu/menu_alias_activity.xml @@ -6,7 +6,7 @@ android:id="@+id/pinAliasMenuItem" android:icon="@drawable/ic_pinned_24dp" android:title="Pin alias" - app:iconTint="@color/colorPrimary" + app:iconTint="?attr/colorPrimary" app:showAsAction="always" tools:ignore="HardcodedText" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/menu/menu_alias_list.xml b/SimpleLogin/app/src/main/res/menu/menu_alias_list.xml index e3331b7..afc0aa0 100755 --- a/SimpleLogin/app/src/main/res/menu/menu_alias_list.xml +++ b/SimpleLogin/app/src/main/res/menu/menu_alias_list.xml @@ -6,7 +6,7 @@ android:id="@+id/searchMenuItem" android:icon="@drawable/ic_search_24dp" android:title="Search" - app:iconTint="@color/colorPrimary" + app:iconTint="?attr/colorPrimary" app:showAsAction="ifRoom" tools:ignore="HardcodedText" /> @@ -14,7 +14,7 @@ android:id="@+id/randomMenuItem" android:icon="@drawable/ic_shuffle_24dp" android:title="Random" - app:iconTint="@color/colorPrimary" + app:iconTint="?attr/colorPrimary" app:showAsAction="ifRoom" tools:ignore="HardcodedText" /> @@ -22,7 +22,7 @@ android:id="@+id/addMenuItem" android:icon="@drawable/ic_plus_28dp" android:title="Add" - app:iconTint="@color/colorPrimary" + app:iconTint="?attr/colorPrimary" app:showAsAction="ifRoom" tools:ignore="HardcodedText" /> \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/menu/menu_contact_mailbox_list.xml b/SimpleLogin/app/src/main/res/menu/menu_contact_mailbox_list.xml index 6ad4c33..5a011f3 100755 --- a/SimpleLogin/app/src/main/res/menu/menu_contact_mailbox_list.xml +++ b/SimpleLogin/app/src/main/res/menu/menu_contact_mailbox_list.xml @@ -7,7 +7,7 @@ android:id="@+id/addMenuItem" android:icon="@drawable/ic_plus_28dp" android:title="Add" - app:iconTint="@color/colorPrimary" + app:iconTint="?attr/colorPrimary" app:showAsAction="ifRoom" tools:ignore="HardcodedText" /> diff --git a/SimpleLogin/app/src/main/res/values-night/colors.xml b/SimpleLogin/app/src/main/res/values-night/colors.xml index 0e1e78c..be31697 100755 --- a/SimpleLogin/app/src/main/res/values-night/colors.xml +++ b/SimpleLogin/app/src/main/res/values-night/colors.xml @@ -1,12 +1,146 @@ + #FFB1C4 + #551D2F + #703345 + #FFD9E0 + #E3BDC5 + #422930 + #5B3F46 + #FFD9E0 + #EDBD92 + #472A0A + #61401E + #FFDCBF + #FFB4AB + #690005 + #93000A + #FFDAD6 + #191113 + #EFDFE1 + #191113 + #EFDFE1 + #514346 + #D6C2C5 + #9E8C8F + #514346 + #000000 + #EFDFE1 + #382E30 + #8D4A5D + #FFD9E0 + #3A071A + #FFB1C4 + #703345 + #FFD9E0 + #2B151B + #E3BDC5 + #5B3F46 + #FFDCBF + #2D1600 + #EDBD92 + #61401E + #191113 + #413739 + #140C0E + #22191B + #261D1F + #312829 + #3C3234 + #FFB7C8 + #330315 + #C77A8F + #000000 + #E8C1C9 + #251016 + #AA888F + #000000 + #F2C296 + #251100 + #B38861 + #000000 + #FFBAB1 + #370001 + #FF5449 + #000000 + #191113 + #EFDFE1 + #191113 + #FFF9F9 + #514346 + #DAC6C9 + #B19EA1 + #907F82 + #000000 + #EFDFE1 + #312829 + #723446 + #FFD9E0 + #2C0010 + #FFB1C4 + #5C2235 + #FFD9E0 + #1F0B11 + #E3BDC5 + #492F35 + #FFDCBF + #1E0D00 + #EDBD92 + #4D2F0F + #191113 + #413739 + #140C0E + #22191B + #261D1F + #312829 + #3C3234 + #FFF9F9 + #000000 + #FFB7C8 + #000000 + #FFF9F9 + #000000 + #E8C1C9 + #000000 + #FFFAF8 + #000000 + #F2C296 + #000000 + #FFF9F9 + #000000 + #FFBAB1 + #000000 + #191113 + #EFDFE1 + #191113 + #FFFFFF + #514346 + #FFF9F9 + #DAC6C9 + #DAC6C9 + #000000 + #EFDFE1 + #000000 + #4D1629 + #FFDFE5 + #000000 + #FFB7C8 + #330315 + #FFDFE5 + #000000 + #E8C1C9 + #251016 + #FFE2C9 + #000000 + #F2C296 + #251100 + #191113 + #413739 + #140C0E + #22191B + #261D1F + #312829 + #3C3234 + #222831 - #FAFAFA - #212121 - #000000 - #5F6267 - #BCBCBC - #4D4D4D - #5F6267 - #606165 \ No newline at end of file diff --git a/SimpleLogin/app/src/main/res/values/colors.xml b/SimpleLogin/app/src/main/res/values/colors.xml index 69a3296..9aa1cc7 100755 --- a/SimpleLogin/app/src/main/res/values/colors.xml +++ b/SimpleLogin/app/src/main/res/values/colors.xml @@ -1,9 +1,148 @@ - #EE307C - @color/colorLightGray - #BE1E2D - #FF3B30 + #EE307C + #8D4A5D + #FFFFFF + #FFD9E0 + #3A071A + #75565D + #FFFFFF + #FFD9E0 + #2B151B + #7B5733 + #FFFFFF + #FFDCBF + #2D1600 + #BA1A1A + #FFFFFF + #FFDAD6 + #410002 + #FFF8F8 + #22191B + #FFF8F8 + #22191B + #F3DDE1 + #514346 + #847376 + #D6C2C5 + #000000 + #382E30 + #FEEDEF + #FFB1C4 + #FFD9E0 + #3A071A + #FFB1C4 + #703345 + #FFD9E0 + #2B151B + #E3BDC5 + #5B3F46 + #FFDCBF + #2D1600 + #EDBD92 + #61401E + #E6D6D8 + #FFF8F8 + #FFFFFF + #FFF0F2 + #FBEAEC + #F5E4E6 + #EFDFE1 + #6C2F41 + #FFFFFF + #A75F73 + #FFFFFF + #573B42 + #FFFFFF + #8C6C73 + #FFFFFF + #5C3C1B + #FFFFFF + #946D47 + #FFFFFF + #8C0009 + #FFFFFF + #DA342E + #FFFFFF + #FFF8F8 + #22191B + #FFF8F8 + #22191B + #F3DDE1 + #4D3F42 + #6B5B5E + #87767A + #000000 + #382E30 + #FEEDEF + #FFB1C4 + #A75F73 + #FFFFFF + #8A475A + #FFFFFF + #8C6C73 + #FFFFFF + #72545B + #FFFFFF + #946D47 + #FFFFFF + #785431 + #FFFFFF + #E6D6D8 + #FFF8F8 + #FFFFFF + #FFF0F2 + #FBEAEC + #F5E4E6 + #EFDFE1 + #430E21 + #FFFFFF + #6C2F41 + #FFFFFF + #331B22 + #FFFFFF + #573B42 + #FFFFFF + #361C01 + #FFFFFF + #5C3C1B + #FFFFFF + #4E0002 + #FFFFFF + #8C0009 + #FFFFFF + #FFF8F8 + #22191B + #FFF8F8 + #000000 + #F3DDE1 + #2D2123 + #4D3F42 + #4D3F42 + #000000 + #382E30 + #FFFFFF + #FFE6EA + #6C2F41 + #FFFFFF + #50192B + #FFFFFF + #573B42 + #FFFFFF + #3E262C + #FFFFFF + #5C3C1B + #FFFFFF + #422607 + #FFFFFF + #E6D6D8 + #FFF8F8 + #FFFFFF + #FFF0F2 + #FBEAEC + #F5E4E6 + #EFDFE1 + #C13424 #2D4374 #F7F7F7 @@ -11,13 +150,6 @@ #747474 #FFFFFF #8DB600 - #424242 - #FFFFFF - #F3F2F8 - #E0E0E0 - #747474 #EBEBEB - #DBDCE0 - #C0C1C3 #6D4AFF diff --git a/SimpleLogin/app/src/main/res/values/styles.xml b/SimpleLogin/app/src/main/res/values/styles.xml index a81cbc3..f94c4e4 100755 --- a/SimpleLogin/app/src/main/res/values/styles.xml +++ b/SimpleLogin/app/src/main/res/values/styles.xml @@ -3,15 +3,57 @@ - diff --git a/SimpleLogin/app/src/main/res/values/theme_overlays.xml b/SimpleLogin/app/src/main/res/values/theme_overlays.xml new file mode 100644 index 0000000..c5c15f7 --- /dev/null +++ b/SimpleLogin/app/src/main/res/values/theme_overlays.xml @@ -0,0 +1,101 @@ + + + + + + + diff --git a/SimpleLogin/build.gradle b/SimpleLogin/build.gradle index ac2e331..abe1613 100755 --- a/SimpleLogin/build.gradle +++ b/SimpleLogin/build.gradle @@ -2,7 +2,7 @@ buildscript { ext{ - kotlin_version = '1.9.22' + kotlin_version = '2.0.21' nav_version = '2.5.0' } repositories { @@ -11,7 +11,7 @@ buildscript { maven { url "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven" } } dependencies { - classpath 'com.android.tools.build:gradle:8.1.4' + classpath 'com.android.tools.build:gradle:8.7.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version" } diff --git a/SimpleLogin/gradle/wrapper/gradle-wrapper.jar b/SimpleLogin/gradle/wrapper/gradle-wrapper.jar index f6b961f..a4b76b9 100644 Binary files a/SimpleLogin/gradle/wrapper/gradle-wrapper.jar and b/SimpleLogin/gradle/wrapper/gradle-wrapper.jar differ diff --git a/SimpleLogin/gradle/wrapper/gradle-wrapper.properties b/SimpleLogin/gradle/wrapper/gradle-wrapper.properties index 4b502c9..fb602ee 100755 --- a/SimpleLogin/gradle/wrapper/gradle-wrapper.properties +++ b/SimpleLogin/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,8 @@ -#Thu Oct 22 19:10:03 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip diff --git a/SimpleLogin/gradlew b/SimpleLogin/gradlew index cccdd3d..f5feea6 100755 --- a/SimpleLogin/gradlew +++ b/SimpleLogin/gradlew @@ -1,78 +1,130 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,92 +133,120 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" fi +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + exec "$JAVACMD" "$@" diff --git a/SimpleLogin/gradlew.bat b/SimpleLogin/gradlew.bat index e95643d..9b42019 100755 --- a/SimpleLogin/gradlew.bat +++ b/SimpleLogin/gradlew.bat @@ -1,4 +1,22 @@ -@if "%DEBUG%" == "" @echo off +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -9,25 +27,29 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -35,48 +57,36 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal