Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Churikova Tetiana 2020-03-24 16:39:52 +01:00 committed by Andrey Shovkoplyas
parent a447bed4ac
commit 68f0a02cbc
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
16 changed files with 56 additions and 63 deletions

View File

@ -108,6 +108,17 @@ public class MainActivity extends ReactFragmentActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
case Configuration.UI_MODE_NIGHT_YES:
setTheme(R.style.DarkTheme);
break;
case Configuration.UI_MODE_NIGHT_NO:
setTheme(R.style.LightTheme);
break;
default:
setTheme(R.style.LightTheme);
}
// Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(MainActivity.this);

View File

@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background">
android:background="?attr/backgroundColor">
<ImageView
android:layout_width="wrap_content"

View File

@ -1,6 +0,0 @@
<resources>
<color name="primary">#4360df</color>
<color name="primary_dark">#FFFFFF</color>
<color name="accent">#5c6bc0</color>
<color name="background">#FFFFFF</color>
</resources>

View File

@ -1,14 +1,15 @@
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="colorControlNormal">@color/primary</item>
<item name="colorControlActivated">@color/primary</item>
<item name="android:windowBackground">@color/background</item>
<item name="android:textColor">#000000</item>
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="colorPrimaryDark">?attr/backgroundColor</item>
<item name="android:windowBackground">?attr/backgroundColor</item>
<item name="android:forceDarkAllowed">true</item>
</style>
<style name="LightTheme" parent="AppTheme">
<item name="backgroundColor">#ffffff</item>
</style>
<style name="DarkTheme" parent="AppTheme">
<item name="backgroundColor">#000000</item>
</style>
</resources>

View File

@ -54,7 +54,7 @@
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
_blankView = [[UIView alloc]initWithFrame:self.window.frame];
_blankView.backgroundColor = [UIColor whiteColor];
_blankView.backgroundColor = [UIColor systemBackgroundColor];
_blankView.alpha = 0;
UIViewController *rootViewController = [UIViewController new];

View File

@ -90,7 +90,7 @@
"rgba(0, 0, 0, 0.75)"
"rgba(0, 9, 26, 0.12)")
:elevation 8
:background-color :white
:background-color colors/white
:position :absolute
:left 0
:right 0

View File

@ -1,6 +1,5 @@
(ns status-im.ui.components.text-input.styles
(:require [status-im.ui.components.colors :as colors]
[status-im.utils.platform :as p]
[status-im.utils.styles :as styles]))
(defn label [editable label-style]
@ -30,6 +29,8 @@
:container-style {:shadow-offset {:width 0 :height 1}
:shadow-radius 6
:shadow-opacity 1
:shadow-color colors/gray
:shadow-color (if (colors/dark?)
"rgba(0, 0, 0, 0.75)"
"rgba(0, 34, 51)")
:elevation 2}
:font-size 12})

View File

@ -1,10 +1,5 @@
(ns status-im.ui.screens.currency-settings.styles
(:require [status-im.ui.components.colors :as colors]
[status-im.utils.styles :as styles]))
(def wrapper
{:flex 1
:background-color colors/white})
(:require [status-im.utils.styles :as styles]))
(styles/def currency-item
{:flex-direction :row

View File

@ -32,7 +32,7 @@
(reset! search-active? false))}
[react/view {:flex 1}
[topbar/topbar {:title :t/main-currency}]
[react/view styles/wrapper
[react/view {:flex 1}
[search-input/search-input
{:search-active? search-active?
:search-filter search-filter

View File

@ -51,12 +51,7 @@
(defn footer [syncing]
[react/touchable-highlight {:on-press (when-not @syncing
synchronize-installations!)
:style {:height 52
:elevation 8
:shadow-radius 4
:shadow-offset {:width 0 :height -5}
:shadow-opacity 0.3
:shadow-color "rgba(0, 9, 26, 0.12)"}}
:style {:height 52}}
[react/view
{:style styles/footer-content}
[react/text

View File

@ -1,7 +1,7 @@
(ns status-im.ui.screens.progress.styles
(:require [status-im.ui.components.colors :as colors]))
(def container
(defn container []
{:flex 1
:align-items :center
:justify-content :center

View File

@ -6,5 +6,5 @@
;; a simple view with animated progress indicator in its center
(defview progress [_]
[react/keyboard-avoiding-view {:style styles/container}
[react/keyboard-avoiding-view {:style (styles/container)}
[components/activity-indicator {:animating true}]])

View File

@ -1,6 +1,4 @@
(ns status-im.ui.screens.wallet.collectibles.styles
(:require [status-im.ui.components.colors :as colors]
[status-im.ui.components.styles :as styles]))
(ns status-im.ui.screens.wallet.collectibles.styles)
(def default-collectible
{:padding-left 10
@ -27,8 +25,3 @@
(def details-image
{:flex 1
:margin 10})
(def container
(merge
styles/flex
{:background-color colors/white}))

View File

@ -17,7 +17,6 @@
(defview collectibles-list []
(letsubs [{:keys [name symbol]} [:get-screen-params]
collectibles [:screen-collectibles]]
[react/view styles/container
[react/view {:style component.styles/flex}
[topbar/topbar {:title name}]
(cond
@ -31,5 +30,5 @@
:else
;; Should never happen. Less confusing to debug new NFT support.
[react/view {:style styles/loading-indicator}
[react/text (i18n/label :t/error)]])]]))
[react/text (i18n/label :t/error)]])]))

View File

@ -93,9 +93,9 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
profile_view.sync_settings_button.click()
profile_view.element_by_text('Mobile data').click()
if profile_view.use_mobile_data.attribute_value("checked"):
if profile_view.use_mobile_data.text != 'OFF':
self.errors.append("Mobile data is enabled by default")
if not profile_view.ask_me_when_on_mobile_network.attribute_value("checked"):
if profile_view.ask_me_when_on_mobile_network.text != "ON":
self.errors.append("'Ask me when on mobile network' is not enabled by default")
sign_in_view.just_fyi("Disable 'ask me when on mobile network' and check that it is not shown")

View File

@ -462,7 +462,11 @@ class ContinueButton(BaseButton):
class SyncSettingsButton(BaseButton):
def __init__(self, driver):
super(SyncSettingsButton, self).__init__(driver)
self.locator = self.Locator.xpath_selector('//*[@content-desc="sync-settings-button"]')
self.locator = self.Locator.accessibility_id('sync-settings-button')
def click(self):
self.scroll_to_element().click()
self.driver.info('Tap on %s' % self.name)
class GoToPairingSettingsButton(BaseButton):
@ -528,13 +532,13 @@ class UseMobileDataToggle(BaseButton):
def __init__(self, driver):
super(UseMobileDataToggle, self).__init__(driver)
self.locator = self.Locator.xpath_selector(
"//*[@text='Use mobile data']/../*[name()='android.widget.Switch']")
"//*[@text='Use mobile data']/following-sibling::android.widget.Switch[1]")
class AskMeWhenOnMobileNetworkToggle(BaseButton):
def __init__(self, driver):
super(AskMeWhenOnMobileNetworkToggle, self).__init__(driver)
self.locator = self.Locator.xpath_selector(
"//*[@text='Ask me when on mobile network']/../*[name()='android.widget.Switch']")
"//*[@text='Ask me when on mobile network']/following-sibling::android.widget.Switch[1]")
class ENSUsernameInChatSettings(BaseElement):
def __init__(self, driver):