Class: Android::View::View
Instance Method Summary collapse
- #append(view_or_class, style = nil, opts = {}, dummy = nil) ⇒ Object
- #append!(view_or_class, style = nil, opts = {}) ⇒ Object
-
#cleanup ⇒ Object
end.
- #color(*params) ⇒ Object
-
#find(*working_selectors) ⇒ Object
end.
- #font ⇒ Object
- #image ⇒ Object
- #inspect ⇒ Object
- #on_load ⇒ Object
- #on_styled ⇒ Object
- #resource_entry_name ⇒ Object
- #rmq(*working_selectors) ⇒ Object
- #rmq_appended ⇒ Object
-
#rmq_build ⇒ Object
Override this to build your view and view’s subviews.
- #rmq_created ⇒ Object
- #rmq_data ⇒ Object
- #rmq_style_applied ⇒ Object
- #subviews ⇒ Object
- #superview ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#append(view_or_class, style = nil, opts = {}, dummy = nil) ⇒ Object
81 82 83 |
# File 'lib/project/ext/view.rb', line 81 def append(view_or_class, style=nil, opts={}, dummy=nil) self.rmq.append(view_or_class, style, opts) end |
#append!(view_or_class, style = nil, opts = {}) ⇒ Object
85 86 87 |
# File 'lib/project/ext/view.rb', line 85 def append!(view_or_class, style=nil, opts={}) self.rmq.append(view_or_class, style, opts).get end |
#cleanup ⇒ Object
end
11 12 13 14 15 16 |
# File 'lib/project/ext/view.rb', line 11 def cleanup if @_rmq_data @_rmq_data.cleanup @_rmq_data = nil end end |
#color(*params) ⇒ Object
69 70 71 |
# File 'lib/project/ext/view.rb', line 69 def color(*params) RMQ.color(*params) end |
#find(*working_selectors) ⇒ Object
end
62 63 64 |
# File 'lib/project/ext/view.rb', line 62 def find(*working_selectors) # Not calling rmq below for performance reasons (one less method invocation) RMQ.create_with_selectors(working_selectors, self) end |
#font ⇒ Object
73 74 75 |
# File 'lib/project/ext/view.rb', line 73 def font rmq.font end |
#image ⇒ Object
77 78 79 |
# File 'lib/project/ext/view.rb', line 77 def image rmq.image end |
#inspect ⇒ Object
2 3 4 |
# File 'lib/project/ext/view.rb', line 2 def inspect "<#{id} #{short_class_name}>" end |
#on_load ⇒ Object
39 40 |
# File 'lib/project/ext/view.rb', line 39 def on_load end |
#on_styled ⇒ Object
49 50 |
# File 'lib/project/ext/view.rb', line 49 def on_styled end |
#resource_entry_name ⇒ Object
22 23 24 25 26 |
# File 'lib/project/ext/view.rb', line 22 def resource_entry_name if self.id > 0 resources.getResourceEntryName(self.id) end end |
#rmq(*working_selectors) ⇒ Object
65 66 67 |
# File 'lib/project/ext/view.rb', line 65 def rmq(*working_selectors) RMQ.create_with_selectors(working_selectors, self) end |
#rmq_appended ⇒ Object
42 43 |
# File 'lib/project/ext/view.rb', line 42 def rmq_appended end |
#rmq_build ⇒ Object
Override this to build your view and view’s subviews
36 37 38 |
# File 'lib/project/ext/view.rb', line 36 def rmq_build on_load end |
#rmq_created ⇒ Object
32 33 |
# File 'lib/project/ext/view.rb', line 32 def rmq_created end |
#rmq_data ⇒ Object
28 29 30 |
# File 'lib/project/ext/view.rb', line 28 def rmq_data @_rmq_data ||= RMQViewData.new end |
#rmq_style_applied ⇒ Object
45 46 47 |
# File 'lib/project/ext/view.rb', line 45 def rmq_style_applied on_styled end |
#subviews ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/project/ext/view.rb', line 89 def subviews # TODO, see if anyone uses this, and remove out = [] if self.is_a?(Potion::ViewGroup) (0...self.getChildCount).each_with_index do |i| sbv = self.getChildAt(i) out << sbv unless self == sbv end end out end |
#superview ⇒ Object
103 104 105 106 107 |
# File 'lib/project/ext/view.rb', line 103 def superview sv = self.getParent() sv = nil unless sv.is_a?(Potion::ViewGroup) sv end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/project/ext/view.rb', line 18 def to_s self.inspect end |