Module: PMScreenModule::ClassMethods

Defined in:
lib/project/pro_motion/fragments/pm_screen_module.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bars_titleObject (readonly)

Returns the value of attribute bars_title.



9
10
11
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 9

def bars_title
  @bars_title
end

#xml_resourceObject (readonly)

Returns the value of attribute xml_resource.



9
10
11
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 9

def xml_resource
  @xml_resource
end

Instance Method Details

#action_bar(show_action_bar, opts = {}) ⇒ Object Also known as: nav_bar, uses_action_bar

Sets up the action bar for this screen.

Example:

action_bar true, back: true, icon: true,
  custom_icon: "resourcename", custom_back: "custombackicon"


30
31
32
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 30

def action_bar(show_action_bar, opts={})
  @action_bar_options = ({show:true, back: true, icon: false}).merge(opts).merge({show: show_action_bar})
end

#action_bar_optionsObject



36
37
38
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 36

def action_bar_options
  @action_bar_options ||= action_bar(true, {})
end

#rmq_style_sheet_classObject



15
16
17
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 15

def rmq_style_sheet_class
  @rmq_style_sheet_class
end

#stylesheet(style_sheet_class) ⇒ Object



11
12
13
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 11

def stylesheet(style_sheet_class)
  @rmq_style_sheet_class = style_sheet_class
end

#title(new_title) ⇒ Object



40
41
42
43
44
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 40

def title(new_title)
  @bars_title = new_title
  #self.activity.title = new_title
  #getActivity().getActionBar().setTitle("abc")
end

#xml_layout(xml_resource = nil) ⇒ Object Also known as: uses_xml



19
20
21
# File 'lib/project/pro_motion/fragments/pm_screen_module.rb', line 19

def xml_layout(xml_resource=nil)
  @xml_resource = xml_resource ||= deduce_resource_id
end