Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/bin
/gen
15 changes: 0 additions & 15 deletions bin/AndroidManifest.xml

This file was deleted.

2 changes: 0 additions & 2 deletions bin/AndroidManifest.xml.d

This file was deleted.

Binary file removed bin/Multiact-debug-unaligned.apk
Binary file not shown.
21 changes: 0 additions & 21 deletions bin/Multiact-debug-unaligned.apk.d

This file was deleted.

Binary file removed bin/Multiact-debug.apk
Binary file not shown.
Binary file removed bin/Multiact.ap_
Binary file not shown.
14 changes: 0 additions & 14 deletions bin/Multiact.ap_.d

This file was deleted.

10 changes: 0 additions & 10 deletions bin/build.prop

This file was deleted.

Binary file removed bin/classes.dex
Binary file not shown.
25 changes: 0 additions & 25 deletions bin/classes.dex.d

This file was deleted.

Binary file removed bin/classes/org/ruboto/EntryPointActivity$1.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/EntryPointActivity$2$1.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/EntryPointActivity$2$2.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/EntryPointActivity$2.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/EntryPointActivity$3.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/EntryPointActivity.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/JRubyAdapter.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/Log.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/RubotoActivity.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/RubotoBroadcastReceiver.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/RubotoDialog.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/RubotoService.class
Binary file not shown.
Binary file removed bin/classes/org/ruboto/Script.class
Binary file not shown.
Binary file removed bin/classes/org/rubototest/multiact/BuildConfig.class
Binary file not shown.
Binary file not shown.
Binary file removed bin/classes/org/rubototest/multiact/R$attr.class
Binary file not shown.
Binary file removed bin/classes/org/rubototest/multiact/R$drawable.class
Binary file not shown.
Binary file removed bin/classes/org/rubototest/multiact/R$id.class
Binary file not shown.
Binary file removed bin/classes/org/rubototest/multiact/R$layout.class
Binary file not shown.
Binary file removed bin/classes/org/rubototest/multiact/R$string.class
Binary file not shown.
Binary file removed bin/classes/org/rubototest/multiact/R.class
Binary file not shown.
3 changes: 0 additions & 3 deletions bin/jarlist.cache

This file was deleted.

15 changes: 0 additions & 15 deletions bin/proguard.txt

This file was deleted.

Binary file removed bin/res/drawable-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/res/drawable-ldpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/res/drawable-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/res/drawable-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed bin/res/drawable/get_ruboto_core.png
Binary file not shown.
9 changes: 0 additions & 9 deletions gen/R.java.d

This file was deleted.

6 changes: 0 additions & 6 deletions gen/org/rubototest/multiact/BuildConfig.java

This file was deleted.

27 changes: 0 additions & 27 deletions gen/org/rubototest/multiact/R.java

This file was deleted.

Binary file removed libs/jruby-core-1.7.0.preview2.dev.jar
Binary file not shown.
Binary file modified libs/jruby-core-1.7.0.preview2.jar
Binary file not shown.
Binary file removed libs/jruby-stdlib-1.7.0.preview2.dev.jar
Binary file not shown.
Binary file modified libs/jruby-stdlib-1.7.0.preview2.jar
Binary file not shown.
34 changes: 14 additions & 20 deletions src/multiact_activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,23 @@

# http://xkcd.com/378/

class RubotoActivity
def self.main(context)
context.start_ruboto_activity("$activity_main") do
def on_create(bundle)
setTitle "main activity"
setContentView(
linear_layout(:orientation => :vertical) do
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42, :width => :fill_parent,
class MultiactActivity
def on_create(bundle)
setTitle "main activity"
setContentView(
linear_layout(:orientation => :vertical) do
@text_view = text_view :text => 'What hath Matz wrought?', :id => 42, :width => :fill_parent,
:gravity => android.view.Gravity::CENTER, :text_size => 48.0
button :text => "Next activity", :id => 43, :width => :fill_parent, :on_click_listener => @on_click_next
end
)
end
@on_click_next = proc do |button|
RubotoActivity.next(self)
end
end
button :text => "Next activity", :id => 43, :width => :fill_parent, :on_click_listener => proc { next_activity ; nil }
end
)
end

def self.next(context)
context.start_ruboto_activity("$activity_next") do
private

def next_activity
puts 'Start next activity'
start_ruboto_activity("$activity_next") do
def on_create(bundle)
setContentView(
linear_layout(:orientation => :vertical) do
Expand All @@ -38,5 +34,3 @@ def on_create(bundle)
end
end
end

RubotoActivity.main $activity
4 changes: 2 additions & 2 deletions src/org/ruboto/JRubyAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ private static void handleInitException(Exception e) {

// FIXME(uwe): Remove when we stop supporting JRuby < 1.7.0
@Deprecated public static boolean isJRubyPreOneSeven() {
return ((String)get("JRUBY_VERSION")).equals("1.7.0.dev") || ((String)get("JRUBY_VERSION")).equals("1.6.7");
return ((String)get("JRUBY_VERSION")).equals("1.7.0.dev") || ((String)get("JRUBY_VERSION")).startsWith("1.6.");
}

// FIXME(uwe): Remove when we stop supporting JRuby < 1.7.0
@Deprecated public static boolean isJRubyOneSeven() {
return ((String)get("JRUBY_VERSION")).startsWith("1.7.");
return !isJRubyPreOneSeven() && ((String)get("JRUBY_VERSION")).startsWith("1.7.");
}

// FIXME(uwe): Remove when we stop supporting Ruby 1.8
Expand Down
2 changes: 1 addition & 1 deletion src/ruboto/activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def initialize_ruboto()

instance_eval &$context_init_block if $context_init_block
$context_init_block = nil
setup_ruboto_callbacks
setup_ruboto_callbacks

@initialized = true
self
Expand Down