Sha256: 73742ab18fd4235210eb4ee6d863502ee5fd5244923dc299bed76526c57c6fa6
Contents?: true
Size: 930 Bytes
Versions: 3
Compression:
Stored size: 930 Bytes
Contents
require 'ruboto/util/stack' require 'json' require 'ruboto/widget' ruboto_import_widgets :LinearLayout, :TextView class JsonActivity def onCreate(bundle) 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, :gravity => android.view.Gravity::CENTER do text_view :id => 42, :text => with_large_stack { JSON.load('["foo"]')[0] }, :text_size => 48.0, :gravity => android.view.Gravity::CENTER text_view :id => 43, :text => with_large_stack { JSON.dump(['foo']) }, :text_size => 48.0, :gravity => android.view.Gravity::CENTER text_view :id => 44, :text => with_large_stack { 'foo'.to_json }, :text_size => 48.0, :gravity => android.view.Gravity::CENTER end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruboto-0.11.0 | test/activity/json_activity.rb |
ruboto-0.11.0.rc.1 | test/activity/json_activity.rb |
ruboto-0.11.0.rc.0 | test/activity/json_activity.rb |