Shadows for android 5.0+

This commit is contained in:
virvar 2016-02-23 23:27:34 +03:00
parent 103d83edd9
commit 19206d0ddd
6 changed files with 38 additions and 21 deletions

1
.gitignore vendored
View File

@ -42,6 +42,7 @@ target/
# Figwheel # Figwheel
# #
figwheel_server.log figwheel_server.log
.nrepl-port
# Mercurial # Mercurial
.hg/ .hg/

View File

@ -1 +0,0 @@
41863

BIN
images/no-photo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
images/online.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -14,7 +14,8 @@
(def app-registry (.-AppRegistry js/React)) (def app-registry (.-AppRegistry js/React))
(def logo-icon (js/require "./images/logo.png")) (def logo-icon (js/require "./images/logo.png"))
(def user-no-photo (js/require "./images/user.png")) (def user-no-photo (js/require "./images/no-photo.png"))
(def online-icon (js/require "./images/online.png"))
(def seen-icon (js/require "./images/seen.png")) (def seen-icon (js/require "./images/seen.png"))
(def delivered-icon (js/require "./images/delivered.png")) (def delivered-icon (js/require "./images/delivered.png"))
@ -37,32 +38,48 @@
:height 75 :height 75
:transform [{:translateX 0} :transform [{:translateX 0}
{:translateY 0}]}} {:translateY 0}]}}
(view {} (view {:width 54
(image {:source (if (< 0 (count photo)) :height 54}
{:uri photo} ;;; photo
user-no-photo) (view {:width 54
:style {:borderWidth 2 :height 54
:borderColor "#FFFFFF" :borderRadius 50
;; :borderStyle "solid" :backgroundColor "#FFFFFF"
:borderRadius 50 :elevation 6}
:width 54 (image {:source (if (< 0 (count photo))
:height 54}}) {:uri photo}
user-no-photo)
:style {:borderWidth 2
:borderColor "#FFFFFF"
:borderRadius 50
:width 54
:height 54
:position "absolute"
;; :top 2
;; :right 2
}}))
;;; online
(when online (when online
(view {:style {:width 12 (view {:position "absolute"
:height 12 :top 41
:top 40 :left 36
:left 40 :width 12
:backgroundColor "#6BC6C8" :height 12
:borderRadius 50 :borderRadius 50
:position "absolute" :backgroundColor "#FFFFFF"
}}))) :elevation 6}
(image {:source online-icon
:style {:width 12
:height 12}}))))
;;; name
(view {:style {:flexDirection "column" (view {:style {:flexDirection "column"
:marginLeft 20 :marginLeft 7
:marginRight 10 :marginRight 10
:flex 1 :flex 1
:position "relative"}} :position "relative"}}
(text {:style {:fontSize 15}} name) (text {:style {:fontSize 15}} name)
(text {:style {:color "#AAB2B2" (text {:style {:color "#AAB2B2"
;; TODO not available for android
:fontFamily "Avenir-Roman" :fontFamily "Avenir-Roman"
:fontSize 14 :fontSize 14
:marginTop 2 :marginTop 2