Class: PMScreen
- Includes:
- PMScreenModule
- Defined in:
- lib/project/pro_motion/pm_screen.rb
Overview
hipbyte.myjetbrains.com/youtrack/issue/RM-773 - can’t put this in a module yet :( module ProMotion
Instance Attribute Summary collapse
-
#view ⇒ Object
Returns the value of attribute view.
Instance Method Summary collapse
- #load_view ⇒ Object
- #onActivityCreated(saved_instance_state) ⇒ Object
- #onCreateView(inflater, parent, saved_instance_state) ⇒ Object
Methods included from PMScreenModule
#action_bar, #activity, #append_view, #append_view!, #color, #font, #hide_keyboard, #image, included, #on_load, #open, #r, #rmq, #rmq_data, #root_view, #show_toast, #soft_input_mode, #start_activity, #stylesheet, #stylesheet=
Instance Attribute Details
#view ⇒ Object
Returns the value of attribute view.
7 8 9 |
# File 'lib/project/pro_motion/pm_screen.rb', line 7 def view @view end |
Instance Method Details
#load_view ⇒ Object
26 27 28 |
# File 'lib/project/pro_motion/pm_screen.rb', line 26 def load_view Potion::FrameLayout.new(self.activity) end |
#onActivityCreated(saved_instance_state) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/project/pro_motion/pm_screen.rb', line 30 def onActivityCreated(saved_instance_state) mp "PMScreen onActivityCreated" if RMQ.debugging? super @view.rmq_data.is_screen_root_view = true self.rmq.build(@view) if self.class.rmq_style_sheet_class self.rmq.stylesheet = self.class.rmq_style_sheet_class @view.rmq.apply_style(:root_view) #if @view.rmq.stylesheet.respond_to?(:root_view) end self..title = self.class. self.activity.title = self.class. on_load end |
#onCreateView(inflater, parent, saved_instance_state) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/project/pro_motion/pm_screen.rb', line 9 def onCreateView(inflater, parent, saved_instance_state) super if self.class.xml_resource @view = inflater.inflate(r(:layout, self.class.xml_resource), parent, false) else @view = load_view @view.setId Potion::ViewIdGenerator.generate end .hide if # TODO: how will we pass this back if we don't use XML? @view end |