fix: bg color dialogs
This commit is contained in:
parent
bb5523d4e8
commit
1ce8e298dc
5 changed files with 5 additions and 6 deletions
|
@ -10,7 +10,7 @@
|
|||
android:scaleX="0.8"
|
||||
android:scaleY="0.8">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:fillColor="?attr/colorControlNormal"
|
||||
android:pathData="M15,20A1,1 0 0,0 16,19V4H8A1,1 0 0,0 7,5V16H5V5A3,3 0 0,1 8,2H19A3,3 0 0,1 22,5V6H20V5A1,1 0 0,0 19,4A1,1 0 0,0 18,5V9L18,19A3,3 0 0,1 15,22H5A3,3 0 0,1 2,19V18H13A2,2 0 0,0 15,20M9,6H14V8H9V6M9,10H14V12H9V10M9,14H14V16H9V14Z" />
|
||||
</group>
|
||||
</vector>
|
|
@ -8,7 +8,6 @@ import android.widget.TextView
|
|||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.annotation.StyleRes
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import info.nightscout.androidaps.core.R
|
||||
|
@ -22,7 +21,7 @@ object AlertDialogHelper {
|
|||
fun buildCustomTitle(context: Context, title: String,
|
||||
@DrawableRes iconResource: Int = R.drawable.ic_check_while_48dp,
|
||||
@StyleRes themeResId: Int = R.style.AppTheme,
|
||||
@LayoutRes layoutResource: Int = R.layout.dialog_alert_custom): View? {
|
||||
@LayoutRes layoutResource: Int = R.layout.dialog_alert_custom_title): View? {
|
||||
val titleLayout = LayoutInflater.from(ContextThemeWrapper(context, themeResId)).inflate(layoutResource, null)
|
||||
(titleLayout.findViewById<View>(R.id.alertdialog_title) as TextView).text = title
|
||||
(titleLayout.findViewById<View>(R.id.alertdialog_icon) as ImageView).setImageResource(iconResource)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<vector android:height="48dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||
<path android:fillColor="?attr/colorControlNormal"
|
||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||
</vector>
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
|
||||
<!-- Alert Dialogs -->
|
||||
<style name="DialogTheme" parent="ThemeOverlay.MaterialComponents.Dialog.Alert">
|
||||
<item name="backgroundColor">@color/background_dark</item>
|
||||
<item name="colorSurface">#212121</item> <!-- workaround; color compensated elevation -->
|
||||
<item name="buttonBarNegativeButtonStyle">@style/DialogOkCancelButtonStyle</item>
|
||||
<item name="buttonBarPositiveButtonStyle">@style/DialogOkCancelButtonStyle</item>
|
||||
<item name="buttonBarNeutralButtonStyle">@style/DialogOkCancelButtonStyle</item>
|
||||
|
|
|
@ -212,7 +212,6 @@
|
|||
|
||||
<!-- Alert Dialogs -->
|
||||
<style name="DialogTheme" parent="ThemeOverlay.MaterialComponents.Dialog.Alert">
|
||||
<item name="backgroundColor">@color/dialog_title_background</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/DialogOkCancelButtonStyle</item>
|
||||
<item name="buttonBarPositiveButtonStyle">@style/DialogOkCancelButtonStyle</item>
|
||||
<item name="dialogTitleBackground">@color/dialog_title_background</item>
|
||||
|
|
Loading…
Reference in a new issue