This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-15
Channels
- # alda (4)
- # beginners (9)
- # boot (2)
- # cider (56)
- # cljsrn (6)
- # clojure (29)
- # clojure-belgium (2)
- # clojure-gamedev (1)
- # clojure-russia (19)
- # clojure-uk (3)
- # clojurescript (7)
- # core-async (2)
- # datomic (16)
- # hoplon (96)
- # lein-figwheel (4)
- # om (2)
- # om-next (3)
- # other-languages (6)
- # planck (11)
- # reagent (9)
- # rethinkdb (1)
- # ring-swagger (1)
- # spacemacs (1)
I'm trying to start my first project and when I run run-android
it's complaining about not being able to find a bunch of appcompat-*
packages. Am I missing some sdk version or package?
I'm using re-natal and I'm trying to display a ListView
. I can't seem to figure out how to put my data in a ListView.DataSource
. Can someone point me to an example?
@dotboris: I have some old snippet here:
(ns future-app.ios.components.movies-list
(:require-macros [natal-shell.components :as ui]
[natal-shell.data-source :as ds])
(:require [om.next :as om :refer-macros [defui]]
[print.foo :as pf :include-macros true]))
(set! js/window.React (js/require "react-native"))
(def styles
{:container {:flex 1,
:flexDirection "row",
:justifyContent "center",
:alignItems "center",
:backgroundColor "#F5FCFF"},
:rightContainer {:flex 1},
:title {:fontSize 20, :marginBottom 8, :textAlign "center"},
:year {:textAlign "center"},
:thumbnail {:width 53, :height 81},
:listView {:paddingTop 20, :backgroundColor "#F5FCFF"}})
(defn movie [movie]
(let [{:keys [container rightContainer title year thumbnail]} styles]
(ui/view
{:style container}
(ui/image {:source {:uri (get-in movie [:posters :thumbnail])}
:style thumbnail})
(ui/view {:style rightContainer}
(ui/text {:style title} (:title movie))
(ui/text {:style year} (:year movie))))))
(def list-view-ds (ds/data-source
{:rowHasChanged #(not= %1 %2)}))
(defui MovieList
static om/IQuery
(query [this]
'[:movies/list])
Object
(render [this]
(let [{:keys [movies]} (om/props this)]
(ui/list-view {:dataSource (ds/clone-with-rows list-view-ds movies)
:renderRow #(movie (js->clj % :keywordize-keys true))
:style (:listView styles)}))))
(def movie-list (om/factory MovieList))