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

@ -82,7 +82,8 @@
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
</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="android:colorBackground">@color/color_primary_dark_dark</item>
</style>

@ -130,7 +130,8 @@
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
</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>
</style>
@ -156,7 +157,6 @@
</style>
<style name="TuskyButton.TextButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:color">@color/tusky_blue</item>
<item name="android:letterSpacing">0</item>
</style>

Loading…
Cancel
Save