AlertDialogs -> core
This commit is contained in:
parent
2fb0198418
commit
ab9da6e2b6
25 changed files with 184 additions and 162 deletions
|
@ -39,17 +39,9 @@
|
|||
<color name="tempTargetConfirmation">#77dd77</color>
|
||||
|
||||
|
||||
<color name="colorPrimary">#212121</color>
|
||||
<color name="colorPrimaryDark">#000000</color>
|
||||
<color name="colorAccent">#40bbaa</color>
|
||||
<color name="mdtp_accent_color">#40bbaa</color>
|
||||
<color name="colorInitializingBorder">#00695c</color>
|
||||
|
||||
<color name="dialog_title_background">#303030</color>
|
||||
<color name="activity_title_background">#121212</color>
|
||||
<color name="dialog_title_color">#FFFFFF</color>
|
||||
<color name="dialog_title_icon_tint">#FFFFFF</color>
|
||||
|
||||
<color name="cardColorBackground">#121212</color>
|
||||
<color name="cardObjectiveText">#779ECB</color>
|
||||
|
||||
|
@ -91,12 +83,6 @@
|
|||
|
||||
<color name="splashBackground">#2E2E2E</color>
|
||||
|
||||
<color name="warningAlertBackground">#FFFB8C00</color>
|
||||
<color name="warningAlertHeaderText">#FF000000</color>
|
||||
|
||||
<color name="errorAlertBackground">#FFFF5555</color>
|
||||
<color name="errorAlertHeaderText">#FF000000</color>
|
||||
|
||||
<color name="toastBorder">#666666</color>
|
||||
<color name="toastBase">#ffffff</color>
|
||||
<color name="toastOk">#77dd77</color>
|
||||
|
|
|
@ -250,7 +250,6 @@
|
|||
<string name="openapsma_maxbasal_summary">This value is called max basal in OpenAPS context</string>
|
||||
<string name="openapsma_maxiob_title">Maximum basal IOB OpenAPS can deliver [U]</string>
|
||||
<string name="openapsma_maxiob_summary">This value is called Max IOB in OpenAPS context\nThis is maximal insulin in [U] APS can deliver at once.</string>
|
||||
<string name="dismiss">DISMISS</string>
|
||||
<string name="language" translatable="false">Language</string>
|
||||
|
||||
<string name="password_preferences_encrypt_prompt">You will be asked for master password, which will be used to encrypt exported preferences.</string>
|
||||
|
@ -1761,7 +1760,6 @@
|
|||
<string name="timeformat24h">24h</string>
|
||||
<string name="automation_event">Automation event</string>
|
||||
<string name="alreadyset">Already set</string>
|
||||
<string name="message">Message</string>
|
||||
<string name="clearqueueconfirm">Clear queue? All data in queue will be lost!</string>
|
||||
<string name="key_xdripstatus_detailediob" translatable="false">xdripstatus_detailediob</string>
|
||||
<string name="key_xdripstatus_showbgi" translatable="false">xdripstatus_showbgi</string>
|
||||
|
|
|
@ -70,31 +70,7 @@
|
|||
<item name="android:textColor">#ff0000</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeWarningDialog" parent="AppTheme">
|
||||
<item name="alertDialogTheme">@style/AppThemeWarningDialogTheme</item>
|
||||
<item name="dialogTitleBackground">@color/warningAlertBackground</item>
|
||||
<item name="dialogTitleColor">@color/warningAlertHeaderText</item>
|
||||
<item name="dialogTitleIconTint">@color/warningAlertHeaderText</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeWarningDialogTheme" parent="Theme.AppCompat.Dialog.MinWidth">
|
||||
<item name="android:windowBackground">@drawable/alert_border_warning</item>
|
||||
<item name="colorAccent">@color/warningAlertBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeErrorDialog" parent="AppTheme">
|
||||
<item name="alertDialogTheme">@style/AppThemeErrorDialogTheme</item>
|
||||
<item name="dialogTitleBackground">@color/errorAlertBackground</item>
|
||||
<item name="dialogTitleColor">@color/errorAlertHeaderText</item>
|
||||
<item name="dialogTitleIconTint">@color/errorAlertHeaderText</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeErrorDialogTheme" parent="Theme.AppCompat.Dialog.MinWidth">
|
||||
<item name="android:windowBackground">@drawable/alert_border_error</item>
|
||||
<item name="colorAccent">@color/errorAlertBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="WizardPagePodContent">
|
||||
<style name="WizardPagePodContent">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginBottom">8dp</item>
|
||||
|
|
|
@ -14,7 +14,7 @@ import android.widget.Toast;
|
|||
import androidx.annotation.DrawableRes;
|
||||
import androidx.appcompat.view.ContextThemeWrapper;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.core.R;
|
||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
|
@ -10,7 +10,7 @@ import androidx.annotation.LayoutRes
|
|||
import androidx.annotation.StyleRes
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.core.R
|
||||
|
||||
object AlertDialogHelper {
|
||||
|
|
@ -6,7 +6,7 @@ import android.content.Context
|
|||
import android.content.DialogInterface
|
||||
import android.os.SystemClock
|
||||
import android.text.Spanned
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.core.R
|
||||
import info.nightscout.androidaps.utils.extensions.runOnUiThread
|
||||
|
||||
object OKDialog {
|
|
@ -5,7 +5,7 @@ import android.content.Context
|
|||
import android.content.DialogInterface
|
||||
import android.os.SystemClock
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.core.R
|
||||
import info.nightscout.androidaps.utils.extensions.runOnUiThread
|
||||
|
||||
// if you need error dialog - duplicate to ErrorDialog and make it and use: AppThemeErrorDialog & R.drawable.ic_header_error instead
|
18
core/src/main/res/values/colors.xml
Normal file
18
core/src/main/res/values/colors.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#212121</color>
|
||||
<color name="colorPrimaryDark">#000000</color>
|
||||
<color name="colorAccent">#40bbaa</color>
|
||||
|
||||
<color name="dialog_title_background">#303030</color>
|
||||
<color name="activity_title_background">#121212</color>
|
||||
<color name="dialog_title_color">#FFFFFF</color>
|
||||
<color name="dialog_title_icon_tint">#FFFFFF</color>
|
||||
|
||||
<color name="warningAlertBackground">#FFFB8C00</color>
|
||||
<color name="warningAlertHeaderText">#FF000000</color>
|
||||
|
||||
<color name="errorAlertBackground">#FFFF5555</color>
|
||||
<color name="errorAlertHeaderText">#FF000000</color>
|
||||
|
||||
</resources>
|
|
@ -1,4 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="key_enable_fabric" translatable="false">enable_fabric</string>
|
||||
<string name="confirmation">Confirmation</string>
|
||||
<string name="message">Message</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="dismiss">DISMISS</string>
|
||||
|
||||
</resources>
|
38
core/src/main/res/values/styles.xml
Normal file
38
core/src/main/res/values/styles.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AppTheme" parent="Theme.AppCompat">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="dialogTitleBackground">@color/dialog_title_background</item>
|
||||
<item name="dialogTitleColor">@color/dialog_title_color</item>
|
||||
<item name="dialogTitleIconTint">@color/dialog_title_icon_tint</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeWarningDialog" parent="AppTheme">
|
||||
<item name="alertDialogTheme">@style/AppThemeWarningDialogTheme</item>
|
||||
<item name="dialogTitleBackground">@color/warningAlertBackground</item>
|
||||
<item name="dialogTitleColor">@color/warningAlertHeaderText</item>
|
||||
<item name="dialogTitleIconTint">@color/warningAlertHeaderText</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeWarningDialogTheme" parent="Theme.AppCompat.Dialog.MinWidth">
|
||||
<item name="android:windowBackground">@drawable/alert_border_warning</item>
|
||||
<item name="colorAccent">@color/warningAlertBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeErrorDialog" parent="AppTheme">
|
||||
<item name="alertDialogTheme">@style/AppThemeErrorDialogTheme</item>
|
||||
<item name="dialogTitleBackground">@color/errorAlertBackground</item>
|
||||
<item name="dialogTitleColor">@color/errorAlertHeaderText</item>
|
||||
<item name="dialogTitleIconTint">@color/errorAlertHeaderText</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeErrorDialogTheme" parent="Theme.AppCompat.Dialog.MinWidth">
|
||||
<item name="android:windowBackground">@drawable/alert_border_error</item>
|
||||
<item name="colorAccent">@color/errorAlertBackground</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
Loading…
Reference in a new issue