Sha256: f9018d40e6f11a07f457d6b465d0a63760de7cc4c87c4709aa943bf4a10722d7
Contents?: true
Size: 903 Bytes
Versions: 6
Compression:
Stored size: 903 Bytes
Contents
require 'ruboto/activity' require 'ruboto/widget' require 'ruboto/util/toast' ruboto_import_widgets :Button, :ImageButton, :LinearLayout, :TextView $activity.start_ruboto_activity do setTitle File.basename(__FILE__).chomp('_activity.rb').split('_').map { |s| "#{s[0..0].upcase}#{s[1..-1]}" }.join(' ') def on_create(bundle) self.content_view = linear_layout :orientation => LinearLayout::VERTICAL do @text_view = text_view :text => 'What hath Matz wrought?', :id => 42 button :text => 'Button', :width => :wrap_content, :id => 44, :on_click_listener => proc { @text_view.text = 'Button pressed' } image_button :image_resource => $package.R::drawable::get_ruboto_core, :width => :wrap_content, :id => 43, :on_click_listener => proc { @text_view.text = 'Image button pressed' } end end end
Version data entries
6 entries across 6 versions & 1 rubygems