improve dialog styling

This commit is contained in:
Conny Duck 2018-12-17 20:47:42 +01:00
parent b92d66a5e9
commit 554099f79d
3 changed files with 6 additions and 6 deletions

View File

@ -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()) {

View File

@ -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>

View File

@ -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>