Skip to content

Instantly share code, notes, and snippets.

@rscottm
Created June 15, 2014 04:09
Show Gist options
  • Select an option

  • Save rscottm/d4589ef9eb97ab7d69a2 to your computer and use it in GitHub Desktop.

Select an option

Save rscottm/d4589ef9eb97ab7d69a2 to your computer and use it in GitHub Desktop.
require 'ruboto/widget'
ruboto_import_widgets :LinearLayout
class ActionBarActivity
def onCreate(bundle)
super
self.content_view =
linear_layout orientation: :vertical do
end
end
def on_create_options_menu(m)
super
mi = m.add("Search")
mi.set_icon R::drawable::ic_menu_search
mi.show_as_action = android.view.MenuItem::SHOW_AS_ACTION_IF_ROOM
true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment