Class: PMScreen

Inherits:
Android::App::Fragment
  • Object
show all
Includes:
PMScreenModule
Defined in:
lib/project/pro_motion/fragments/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

Instance Method Summary collapse

Methods included from PMScreenModule

#action_bar, #add_action_bar_button, #append, #append!, #build, #build!, #build_and_tag_xml_views, #cleanup, #close, #color, #create, #create!, #dummy_workaround_for_kind_of, #find, #font, #hide_keyboard, #image, included, #log_tree, #menu, #on_options_item_selected, #on_return, #open, #open_modal, #r, #rmq, #rmq_data, #root_view, #set_title, #set_up_action_bar, #show_keyboard, #show_toast, #soft_input_mode, #start_activity, #stylesheet, #stylesheet=, #title, #title=

Instance Attribute Details

#viewObject

Returns the value of attribute view.



7
8
9
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 7

def view
  @view
end

Instance Method Details

#load_viewObject



41
42
43
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 41

def load_view
  Potion::FrameLayout.new(self.activity)
end

#on_activity_createdObject



66
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 66

def on_activity_created; end

#on_attach(activity) ⇒ Object



14
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 14

def on_attach(activity); end

#on_create(bundle) ⇒ Object



17
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 17

def on_create(bundle); end

#on_create_menu(menu) ⇒ Object



75
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 75

def on_create_menu(menu); end

#on_create_view(inflater, parent, saved_instance_state) ⇒ Object



39
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 39

def on_create_view(inflater, parent, saved_instance_state); end

#on_destroyObject



87
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 87

def on_destroy; end

#on_destroy_viewObject



84
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 84

def on_destroy_view; end

#on_detachObject



94
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 94

def on_detach; end

#on_loadObject



65
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 65

def on_load; end

#on_pauseObject



78
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 78

def on_pause; end

#on_resumeObject



73
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 73

def on_resume; end

#on_startObject Also known as: on_appear



69
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 69

def on_start; end

#on_stopObject



81
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 81

def on_stop; end

#onActivityCreated(saved_instance_state) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 45

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

  build_and_tag_xml_views

  set_title
  on_load
  on_activity_created
end

#onAttach(activity) ⇒ Object



9
10
11
12
13
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 9

def onAttach(activity)
  super
  activity.on_fragment_attached(self) if activity.respond_to?(:on_fragment_attached)
  on_attach(activity)
end

#onCreate(bundle) ⇒ Object



16
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 16

def onCreate(bundle); super; on_create(bundle); end

#onCreateView(inflater, parent, saved_instance_state) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 19

def onCreateView(inflater, parent, saved_instance_state)
  mp "PMScreen onCreateView #{self.class}" if RMQ.debugging?
  super

  self.cleanup

  if @xml_resource = self.class.xml_resource
    @view = inflater.inflate(r(:layout, @xml_resource), parent, false)
  else
    v = load_view
    @view ||= v
    @view.setId Potion::ViewIdGenerator.generate
  end

  set_up_action_bar(self.class.action_bar_options)

  on_create_view(inflater, parent, saved_instance_state)

  @view
end

#onDestroyObject



86
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 86

def onDestroy; super; on_destroy; end

#onDestroyViewObject



83
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 83

def onDestroyView; super; on_destroy_view; end

#onDetachObject



89
90
91
92
93
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 89

def onDetach
  super
  on_detach
  self.activity.on_fragment_detached(self) if self.activity.respond_to?(:on_fragment_detached)
end

#onPauseObject



77
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 77

def onPause; super; on_pause; end

#onResumeObject



72
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 72

def onResume; super; on_resume; end

#onStartObject



68
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 68

def onStart; super; on_start; end

#onStopObject



80
# File 'lib/project/pro_motion/fragments/pm_screen.rb', line 80

def onStop; super; on_stop; end