(when-pressed LEFT (do-something)
RIGHT (do-something-different)
SPACE ( ... )
...)
expands to:
user=> (pprint(macroexpand-1'(when-pressed LEFT (do-something))))(clojure.core/when
(.isKeyPressed Gdx/input (. com.badlogic.gdx.Input$Keys LEFT))(do-something))
nil
or
user=> (pprint(macroexpand-1'(when-pressed LEFT (do-something)
RIGHT (do-something-else))))(do(when-pressed LEFT (do-something))(when-pressed RIGHT (do-something-else)))
nil
Struggling with ListViews and SimpleAdapters on Android, I came up with the following simple example of a ListView
with two columns: an image and some text.
In res/layout, create a xml list_item.xml for the listview items: