Permalink
Browse files

Allow use of R resources.

  • Loading branch information...
1 parent 4b7e407 commit 1c24f76c5599af7208500bbfd27251da7e19ff86 @technomancy committed Jan 12, 2011
View
@@ -64,7 +64,15 @@
<!-- Execute the Android Setup task that will setup some properties
specific to the target, and import the build rules files. -->
- <target name="compile" depends="-resource-src, -aidl"
+ <target name="javac" description="Compiles R.java">
+ <exec executable="javac" dir="gen">
+ <arg value="griva/della/ferrante/R.java" />
+ <arg value="-d" />
+ <arg value="../bin/classes/" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="javac, -resource-src, -aidl"
description="Compiles project's .mirah files into .class files">
<exec executable="mirahc" dir="src">
<arg line="-c ${sdk.dir}/platforms/${target-version}/android.jar:../bin/classes/" />
@@ -15,7 +15,7 @@
public static final int notification=0x7f020001;
}
public static final class id {
- public static final int =0x7f060000;
+ public static final int finish=0x7f060000;
}
public static final class layout {
public static final int main=0x7f030000;
View
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
-<item android:id="@+id/"
+<item android:id="@+id/finish"
android:title="Finish" />
</menu>
@@ -103,8 +103,7 @@ class Locator < Service
intent = Intent.new(self, Navigator.class).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
Log.d("Ferrante", "Adding notification: #{intent}")
message = "Navigating..."
- # TODO: use R class; compiler can't resolve it
- icon = 0x7f020001
+ icon = R.drawable.icon
notification = Notification.new(icon, message, System.currentTimeMillis)
notification.flags = notification.flags | Notification.FLAG_ONGOING_EVENT |
Notification.FLAG_NO_CLEAR
@@ -59,8 +59,7 @@ class Navigator < Activity
end
def onCreateOptionsMenu(m)
- # TODO: can't access R.menu.menu for some reason
- getMenuInflater.inflate(0x7f050000, m)
+ getMenuInflater.inflate(R.menu.menu, m)
true
end

0 comments on commit 1c24f76

Please sign in to comment.