[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[jx8-android] 020 - Accessing inner classes

"Accessing resources by type"
| classes |
classes := #(
	style string mipmap menu
	layout integer id drawable
	dimen color bool attr anim
	styleable
	) collect: [:selector| R perform: selector ].
classes do: [:each| self print: each javaClass simpleName ,$= ,each propertyNames ].


"Accessing resource IDs"
| cls |
cls := R layout.
(cls propertyNames collect: [:each|
	self print: each ,$= ,(cls @ each)
]) printString


"Accessing well known app resource IDs"
self print: 'R.layout.activity_main=' ,(R layout @ #activity_main).
self print: 'R.drawable.ic_drawer='   ,(R drawable @ #ic_drawer).

self print: 'R.id.drawer_layout='  ,(R id @ #drawer_layout).
self print: 'R.id.menu_seccion_1=' ,(R id @ #menu_seccion_1).