test/activity/option_menu_activity.rb in ruboto-0.12.0.rc.0 vs test/activity/option_menu_activity.rb in ruboto-0.12.0
- old
+ new
@@ -8,19 +8,19 @@
super
set_title File.basename(__FILE__).chomp('_activity.rb').split('_').map { |s| "#{s[0..0].upcase}#{s[1..-1]}" }.join(' ')
self.content_view =
linear_layout :orientation => LinearLayout::VERTICAL do
- @text_view = text_view :text => 'What hath Matz wrought?', :id => 42, :text_size => 48.0,
- :width => :fill_parent, :gravity => android.view.Gravity::CENTER
+ text_view :text => 'What hath Matz wrought?', :id => 42, :text_size => 48.0,
+ :width => :fill_parent, :gravity => android.view.Gravity::CENTER
end
end
def onCreateOptionsMenu(menu)
mi = menu.add('Test')
mi.setIcon($package.R::drawable::get_ruboto_core)
mi.set_on_menu_item_click_listener do |menu_item|
- @text_view.text = 'What hath Matz wrought!'
+ findViewById(42).text = 'What hath Matz wrought!'
toast 'Flipped a bit via butterfly'
end
true
end
end