Sha256: 927a5cc023283ceb6c33fbaf6c833396eaa664f2dee0eb6e57ea9b29e7f9b014
Contents?: true
Size: 1006 Bytes
Versions: 15
Compression:
Stored size: 1006 Bytes
Contents
require 'ruboto/widget' ruboto_import_widgets :LinearLayout, :TextView class DialogFragmentActivity def onCreate(bundle) super set_title 'Dialog Fragment Test' self.content_view = linear_layout :orientation => :vertical, :gravity => :center do text_view :id => 42, :text => title, :text_size => 48.0, :gravity => :center end ft = getFragmentManager.beginTransaction ft.addToBackStack(nil) ExampleDialogFragment.new.show(ft, 'example_dialog') end end class ExampleDialogFragment < android.app.DialogFragment def onCreate(bundle) super @some_var = 'Ruboto does fragments!' end def onCreateView(inflater, container, bundle) dialog.title = @some_var linear_layout :orientation => :vertical do linear_layout :gravity => :center, :layout => {:width => :fill_parent} do text_view :text => @some_var, :id => 43, :text_size => 40.0, :gravity => :center end end end end
Version data entries
15 entries across 15 versions & 1 rubygems