mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-26 09:47:43 +00:00
Make dialogs look better
This commit is contained in:
parent
ed5641df03
commit
1dc7f7e9c0
@ -12,6 +12,7 @@ import network.loki.messenger.R
|
|||||||
import org.thoughtcrime.securesms.ApplicationContext
|
import org.thoughtcrime.securesms.ApplicationContext
|
||||||
import org.thoughtcrime.securesms.loki.protocol.MultiDeviceProtocol
|
import org.thoughtcrime.securesms.loki.protocol.MultiDeviceProtocol
|
||||||
import org.session.libsession.utilities.KeyPairUtilities
|
import org.session.libsession.utilities.KeyPairUtilities
|
||||||
|
import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities
|
||||||
|
|
||||||
class ClearAllDataDialog : DialogFragment() {
|
class ClearAllDataDialog : DialogFragment() {
|
||||||
|
|
||||||
@ -23,6 +24,8 @@ class ClearAllDataDialog : DialogFragment() {
|
|||||||
builder.setView(contentView)
|
builder.setView(contentView)
|
||||||
val result = builder.create()
|
val result = builder.create()
|
||||||
result.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
result.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||||
|
val isLightMode = UiModeUtilities.isDayUiMode(requireContext())
|
||||||
|
result.window?.setDimAmount(if (isLightMode) 0.1f else 0.75f)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ import org.session.libsession.utilities.IdentityKeyUtil
|
|||||||
import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities
|
import org.thoughtcrime.securesms.loki.utilities.MnemonicUtilities
|
||||||
import org.session.libsignal.crypto.MnemonicCodec
|
import org.session.libsignal.crypto.MnemonicCodec
|
||||||
import org.session.libsignal.utilities.hexEncodedPrivateKey
|
import org.session.libsignal.utilities.hexEncodedPrivateKey
|
||||||
|
import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities
|
||||||
|
|
||||||
class SeedDialog : DialogFragment() {
|
class SeedDialog : DialogFragment() {
|
||||||
|
|
||||||
@ -40,6 +41,8 @@ class SeedDialog : DialogFragment() {
|
|||||||
builder.setView(contentView)
|
builder.setView(contentView)
|
||||||
val result = builder.create()
|
val result = builder.create()
|
||||||
result.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
result.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||||
|
val isLightMode = UiModeUtilities.isDayUiMode(requireContext())
|
||||||
|
result.window?.setDimAmount(if (isLightMode) 0.1f else 0.75f)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,5 +7,4 @@
|
|||||||
|
|
||||||
<corners android:radius="@dimen/dialog_corner_radius" />
|
<corners android:radius="@dimen/dialog_corner_radius" />
|
||||||
|
|
||||||
<!-- <stroke android:width="@dimen/border_thickness" android:color="@color/dialog_border" />-->
|
|
||||||
</shape>
|
</shape>
|
@ -2,6 +2,5 @@
|
|||||||
<inset
|
<inset
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:drawable="@drawable/default_dialog_background"
|
android:drawable="@drawable/default_dialog_background"
|
||||||
android:insetRight="@dimen/medium_spacing"
|
android:inset="@dimen/medium_spacing">
|
||||||
android:insetLeft="@dimen/medium_spacing">
|
|
||||||
</inset>
|
</inset>
|
@ -6,10 +6,8 @@
|
|||||||
android:background="@drawable/default_dialog_background_inset"
|
android:background="@drawable/default_dialog_background_inset"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="32dp"
|
android:elevation="4dp"
|
||||||
android:paddingTop="@dimen/medium_spacing"
|
android:padding="32dp">
|
||||||
android:paddingRight="32dp"
|
|
||||||
android:paddingBottom="@dimen/medium_spacing">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -6,10 +6,7 @@
|
|||||||
android:background="@drawable/default_dialog_background_inset"
|
android:background="@drawable/default_dialog_background_inset"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="32dp"
|
android:padding="32dp">
|
||||||
android:paddingTop="@dimen/medium_spacing"
|
|
||||||
android:paddingRight="32dp"
|
|
||||||
android:paddingBottom="@dimen/medium_spacing">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -280,4 +280,9 @@
|
|||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Session.Dialog" parent="@android:style/Theme.Dialog">
|
||||||
|
<item name="android:windowBackground">#120000FF</item>
|
||||||
|
<item name="android:windowIsFloating">false</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user