improve dialog styling

main
Conny Duck 6 years ago
parent 0d8dc6ef19
commit da23ac08bf
  1. 5
      app/src/main/java/com/keylesspalace/tusky/LoginActivity.kt
  2. 3
      app/src/main/res/values-night/styles.xml
  3. 4
      app/src/main/res/values/styles.xml

@ -15,7 +15,6 @@
package com.keylesspalace.tusky package com.keylesspalace.tusky
import android.app.AlertDialog
import android.content.ActivityNotFoundException import android.content.ActivityNotFoundException
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
@ -29,6 +28,7 @@ import android.view.MenuItem
import android.view.View import android.view.View
import android.widget.EditText import android.widget.EditText
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import com.keylesspalace.tusky.di.Injectable import com.keylesspalace.tusky.di.Injectable
import com.keylesspalace.tusky.entity.AccessToken import com.keylesspalace.tusky.entity.AccessToken
import com.keylesspalace.tusky.entity.AppCredentials import com.keylesspalace.tusky.entity.AppCredentials
@ -42,7 +42,6 @@ import retrofit2.Callback
import retrofit2.Response import retrofit2.Response
import javax.inject.Inject import javax.inject.Inject
class LoginActivity : BaseActivity(), Injectable { class LoginActivity : BaseActivity(), Injectable {
@Inject @Inject
@ -82,7 +81,7 @@ class LoginActivity : BaseActivity(), Injectable {
.setPositiveButton(R.string.action_close, null) .setPositiveButton(R.string.action_close, null)
.show() .show()
val textView = dialog.findViewById<TextView>(android.R.id.message) val textView = dialog.findViewById<TextView>(android.R.id.message)
textView.movementMethod = LinkMovementMethod.getInstance() textView?.movementMethod = LinkMovementMethod.getInstance()
} }
if (isAdditionalLogin()) { if (isAdditionalLogin()) {

@ -82,7 +82,8 @@
<item name="android:background">?attr/selectableItemBackgroundBorderless</item> <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
</style> </style>
<style name="TuskyDialog.Dark" parent="@style/ThemeOverlay.MaterialComponents.Dialog"> <style name="TuskyDialog.Dark" parent="@style/ThemeOverlay.MaterialComponents.Dialog.Alert">
<item name="android:letterSpacing">0</item>
<item name="dialogCornerRadius">8dp</item> <item name="dialogCornerRadius">8dp</item>
<item name="android:colorBackground">@color/color_primary_dark_dark</item> <item name="android:colorBackground">@color/color_primary_dark_dark</item>
</style> </style>

@ -130,7 +130,8 @@
<item name="android:background">?attr/selectableItemBackgroundBorderless</item> <item name="android:background">?attr/selectableItemBackgroundBorderless</item>
</style> </style>
<style name="TuskyDialog.Light" parent="@style/ThemeOverlay.MaterialComponents.Dialog"> <style name="TuskyDialog.Light" parent="@style/ThemeOverlay.MaterialComponents.Dialog.Alert">
<item name="android:letterSpacing">0</item>
<item name="dialogCornerRadius">8dp</item> <item name="dialogCornerRadius">8dp</item>
</style> </style>
@ -156,7 +157,6 @@
</style> </style>
<style name="TuskyButton.TextButton" parent="Widget.MaterialComponents.Button.TextButton"> <style name="TuskyButton.TextButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:color">@color/tusky_blue</item>
<item name="android:letterSpacing">0</item> <item name="android:letterSpacing">0</item>
</style> </style>

Loading…
Cancel
Save