Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit e556a75

Browse files
authored
Make config handle proxies of android.* classses
1 parent df40df5 commit e556a75

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/clojure/neko/ui.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
(:require [neko.ui.mapping :as kw]
44
[neko.ui.traits :refer [apply-trait]]
55
[neko.-utils :refer [keyword->setter reflect-setter
6-
reflect-constructor]])
6+
reflect-constructor
7+
closest-android-ancestor]])
78
(:import android.content.res.Configuration
89
neko.App))
910

@@ -95,7 +96,8 @@
9596
"Takes a widget and key-value pairs of attributes, and applies these
9697
attributes to the widget."
9798
[widget & {:as attributes}]
98-
(apply-attributes (kw/keyword-by-classname (type widget))
99+
(apply-attributes (kw/keyword-by-classname (closest-android-ancestor
100+
(class widget)))
99101
widget attributes {}))
100102

101103
;; ## Compatibility with Android XML UI facilities.

0 commit comments

Comments
 (0)