Fix #23 Grey area between staging and text input

This commit is contained in:
virvar 2016-04-25 13:21:46 +03:00
parent 55396a20c4
commit 6c40a2dac4
3 changed files with 10 additions and 8 deletions

View File

@ -7,6 +7,7 @@
text text
text-input text-input
touchable-highlight]] touchable-highlight]]
[syng-im.components.styles :refer [color-white]]
[syng-im.components.chat.plain-message-input :refer [plain-message-input-view]] [syng-im.components.chat.plain-message-input :refer [plain-message-input-view]]
[syng-im.components.chat.input.simple-command :refer [simple-command-input-view]] [syng-im.components.chat.input.simple-command :refer [simple-command-input-view]]
[syng-im.components.chat.input.phone :refer [phone-input-view]] [syng-im.components.chat.input.phone :refer [phone-input-view]]
@ -23,7 +24,7 @@
[simple-command-staged-view stage-command]) [simple-command-staged-view stage-command])
(defn staged-commands-view [staged-commands] (defn staged-commands-view [staged-commands]
[view {:style {:marginBottom 12}} [view {}
(for [command staged-commands] (for [command staged-commands]
^{:key command} [staged-command-view command])]) ^{:key command} [staged-command-view command])])
@ -45,7 +46,8 @@
(fn [] (fn []
(let [command @command-atom (let [command @command-atom
staged-commands @staged-commands-atom] staged-commands @staged-commands-atom]
[view [view {:style {:backgroundColor color-white
:elevation 4}}
(when (and staged-commands (< 0 (count staged-commands))) (when (and staged-commands (< 0 (count staged-commands)))
[staged-commands-view staged-commands]) [staged-commands-view staged-commands])
(if command (if command

View File

@ -39,8 +39,7 @@
[suggestions-view] [suggestions-view]
[view {:style {:flexDirection "row" [view {:style {:flexDirection "row"
:height 56 :height 56
:backgroundColor color-white :backgroundColor color-white}}
:elevation 4}}
[image {:source res/icon-list [image {:source res/icon-list
:style {:marginTop 22 :style {:marginTop 22
:marginRight 6 :marginRight 6

View File

@ -10,7 +10,8 @@
touchable-highlight touchable-highlight
list-view list-view
list-item]] list-item]]
[syng-im.components.styles :refer [font]] [syng-im.components.styles :refer [font
color-white]]
[syng-im.utils.listview :refer [to-datasource]] [syng-im.utils.listview :refer [to-datasource]]
[syng-im.utils.utils :refer [log toast http-post]] [syng-im.utils.utils :refer [log toast http-post]]
[syng-im.utils.logging :as log])) [syng-im.utils.logging :as log]))
@ -25,7 +26,7 @@
:marginVertical 1 :marginVertical 1
:marginHorizontal 0 :marginHorizontal 0
:height 40 :height 40
:backgroundColor "white"}} :backgroundColor color-white}}
[view {:style {:flexDirection "column" [view {:style {:flexDirection "column"
:position "absolute" :position "absolute"
:top 10 :top 10
@ -36,7 +37,7 @@
:marginHorizontal 10 :marginHorizontal 10
:fontSize 14 :fontSize 14
:fontFamily font :fontFamily font
:color "white"}} :color color-white}}
(:text suggestion)]] (:text suggestion)]]
[text {:style {:flex 1 [text {:style {:flex 1
:position "absolute" :position "absolute"
@ -60,7 +61,7 @@
:marginVertical 1 :marginVertical 1
:marginHorizontal 0 :marginHorizontal 0
:height (min 105 (* 42 (count suggestions))) :height (min 105 (* 42 (count suggestions)))
:backgroundColor "#eef2f5" :backgroundColor color-white
:borderRadius 5}} :borderRadius 5}}
[list-view {:dataSource (to-datasource suggestions) [list-view {:dataSource (to-datasource suggestions)
:renderRow render-row :renderRow render-row