Class: CompoundButtonWrapper
Instance Method Summary
collapse
Methods inherited from ViewWrapper
#animate, #background=, #background_color=, #blink, #builder, #click, #data, #enabled=, #enabled?, #find, #gone=, #gone?, #height=, #hidden?, #hide!, #initialize, #invalidate, #native, #p_tree, #parent, #show!, #tag, #to_front!, #to_native, #visible=, #visible?, #width=
included
included
Constructor Details
This class inherits a constructor from ViewWrapper
Instance Method Details
#checked=(value) ⇒ Object
18
19
20
|
# File 'lib/droiuby/wrappers/compound_button_wrapper.rb', line 18
def checked=(value)
self.native.setChecked(value)
end
|
#checked? ⇒ Boolean
14
15
16
|
# File 'lib/droiuby/wrappers/compound_button_wrapper.rb', line 14
def checked?
self.native.isChecked
end
|
#on(event, &block) ⇒ Object
4
5
6
7
8
9
10
11
12
|
# File 'lib/droiuby/wrappers/compound_button_wrapper.rb', line 4
def on(event,&block)
listener_ref = event.to_s.camelize
case event.to_sym
when :checked_change
self.native.send(:"setOn#{listener_ref}Listener",_listener("On#{listener_ref}Listener", 'android.widget.CompoundButton', &block))
else
super(event, &block)
end
end
|