module PMScreenModule::ClassMethods

Attributes

bars_title[R]
xml_resource[R]

Public Instance Methods

action_bar(show_action_bar, opts={}) click to toggle source

Sets up the action bar for this screen.

Example:

action_bar true, back: true, icon: true,
  custom_icon: "resourcename", custom_back: "custombackicon"
# 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
Also aliased as: nav_bar, uses_action_bar
action_bar_options() click to toggle source
# File lib/project/pro_motion/fragments/pm_screen_module.rb, line 36
def action_bar_options
  @action_bar_options ||= action_bar(true, {})
end
nav_bar(show_action_bar, opts={})
Alias for: action_bar
rmq_style_sheet_class() click to toggle source
# 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) click to toggle source
# 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) click to toggle source
# 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
uses_action_bar(show_action_bar, opts={})
Alias for: action_bar
uses_xml(xml_resource=nil)
Alias for: xml_layout
xml_layout(xml_resource=nil) click to toggle source
# 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
Also aliased as: uses_xml

Private Instance Methods

deduce_resource_id() click to toggle source
# File lib/project/pro_motion/fragments/pm_screen_module.rb, line 48
def deduce_resource_id
  resource = self.name.split(".").last
  resource.underscore.to_sym
end