Permalink
Browse files

Pure Java now and with a 'working' main page

  • Loading branch information...
1 parent e5d8a7a commit c82812bbe343f278111a1b3b81595ccb879fdcc6 @elight committed Dec 25, 2009
View
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="lib" path="bin/out.min.jar"/>
+ <classpathentry kind="lib" path="proguard/proguard.jar"/>
+ <classpathentry kind="lib" path="test_libs/android.jar"/>
+ <classpathentry kind="lib" path="test_libs/mockito-all-1.8.0.jar"/>
+ <classpathentry kind="lib" path="test_libs/specs-1.6.2-SNAPSHOT.jar"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
View
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Camp Stove</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.tiggerpalace.campfire"
+ package="com.tiggerpalace.automan"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name">
- <activity android:name=".MyActivity"
+ <activity android:name=".DroidCarDock"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
+ <category android:name="android.intent.category.CAR_DOCK" />
+ <category android:name="android.intent.category.DESK_DOCK" />
+ <category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
View
@@ -18,7 +18,7 @@ end
app_pkg = manifest[:package]
project = app_pkg.gsub(/\./, '_')
-@spec_pkg = "com.tiggerpalace.campfire.specs"
+@spec_pkg = "com.tiggerpalace.automan.specs"
sdk_location = ENV['ANDROID_SDK']
scala_lib_path = '/usr/local/lib'
@@ -114,19 +114,20 @@ task :aidl => dirs do
end
task :compile => [:resource_src, :aidl] do
- compile_java(classes, gen)
- compile_scala(classes, src, gen)
+ compile_java(classes, src, gen)
+ #compile_scala(classes, src, gen)
end
task :shake => [ :compile ] do
sh "java", "-Xmx512M", "-jar", "proguard/proguard.jar",
- "-injars", "#{classes}:#{scala_jars.last}(!META-INF/MANIFEST.MF,!library.properties)",
+ "-injars", "#{classes}(!META-INF/MANIFEST.MF,!library.properties)",
"-outjars", "#{bin}/out.min.jar",
"-libraryjars", android_jar,
"-dontwarn",
"-dontoptimize",
"-dontobfuscate",
- "-keep", "public class * extends android.app.Activity"
+ "-keep", "public class * extends android.app.Activity",
+ "-keep", "public class * extends android.cotent.BroadcastReceiver"
end
task :dex => :shake do
View
@@ -0,0 +1,13 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Indicates whether an apk should be generated for each density.
+split.density=false
+# Project target.
+target=android-5
View
@@ -0,0 +1,10 @@
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+ <!-- Note built-in ids for 'list' and 'empty' -->
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+</LinearLayout>
View
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TableLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:background="@color/background"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:padding="15dip" >
+ <TableRow
+ android:layout_width="120sp" >
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/call_button"
+ android:text="@string/call" />
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/music_button"
+ android:text="@string/music" />
+ </TableRow>
+ <TableRow
+ android:layout_width="fill_parent" >
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/search_button"
+ android:text="@string/search" />
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/nav_button"
+ android:text="@string/navigation" />
+ </TableRow>
+</TableLayout>
+
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+ <!-- Note built-in ids for 'list' and 'empty' -->
+ <ListView
+ android:id="@android:id/list"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ <TextView
+ android:id="@android:id/empty"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="No data" />
+</LinearLayout>
View
@@ -0,0 +1,10 @@
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+ <!-- Note built-in ids for 'list' and 'empty' -->
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+</LinearLayout>
View
@@ -1,73 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:padding="15dip" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/first_time"
- android:textColor="@color/text"
- android:layout_marginBottom="16dip" />
-
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/text"
- android:textSize="16dip"
- android:testStyle="bold"
- android:text="@string/login" />
- <EditText
- android:id="@+id/login_field"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="10dip"
- android:lines="1" />
-
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/text"
- android:textSize="16dip"
- android:testStyle="bold"
- android:text="@string/password" />
- <EditText
- android:id="@+id/password_field"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="16dip"
- android:lines="1" />
-
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/text"
- android:textSize="16dip"
- android:testStyle="bold"
- android:text="@string/campfire" />
- <LinearLayout
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="16dip">
- <EditText
- android:id="@+id/campfire_field"
- android:layout_width="170dip"
- android:layout_height="wrap_content"
- android:lines="1" />
- <TextView
- android:layout_toRightOf="@id/campfire_field"
- android:layout_width="120dip"
- android:layout_height="wrap_content"
- android:textColor="@color/text"
- android:text="@string/campfirenow" />
- </LinearLayout>
- <Button
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/sign_in_now" />
-</LinearLayout>
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:padding="15dip" >
+ <TableRow
+ android:layout_width="120sp" >
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/call_button"
+ android:text="@string/call" />
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/music_button"
+ android:text="@string/music" />
+ </TableRow>
+ <TableRow
+ android:layout_width="fill_parent" >
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/search_button"
+ android:text="@string/search" />
+ <Button
+ android:layout_height="120sp"
+ android:layout_width="225sp"
+ android:id="@+id/nav_button"
+ android:text="@string/navigation" />
+ </TableRow>
+</TableLayout>
View
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+ <!-- Note built-in ids for 'list' and 'empty' -->
+ <ListView
+ android:id="@android:id/list"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ <TextView
+ android:id="@android:id/empty"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="No data" />
+</LinearLayout>
View
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">Camp Stove</string>
- <string name="sign_in">Sign in</string>
- <string name="first_time">Since this is your first time using Camp Stove, you need to provide your Campfire login, password, and the Campfire (subdomain) to sign in</string>
- <string name="login">Login</string>
- <string name="password">Password</string>
- <string name="campfire">Campfire</string>
- <string name="campfire_example">your_campfire.campfirenow.com</string>
- <string name="sign_in_now">Sign in to your campfire!</string>
- <string name="campfirenow">.campfirenow.com</string>
+ <string name="app_name">AutoDroid</string>
+ <string name="search">Search</string>
+ <string name="navigation">Navigation</string>
+ <string name="music">Music</string>
+ <string name="call">Call</string>
+
</resources>
@@ -0,0 +1,17 @@
+package com.tiggerpalace.automan;
+
+import android.content.BroadcastReceiver;
+import android.os.Bundle;
+import android.content.Context;
+import android.content.Intent;
+
+public class CarDockReceiver extends BroadcastReceiver {
+
+ @Override
+ public void onReceive(Context ctx, Intent intent) {
+ if(intent.hasCategory(Intent.CATEGORY_CAR_DOCK) ||
+ intent.hasCategory(Intent.CATEGORY_DESK_DOCK)) {
+ ctx.startActivity(new Intent(ctx, DroidCarDock.class));
+ }
+ }
+}
@@ -0,0 +1,23 @@
+package com.tiggerpalace.automan;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+
+public class DroidCarDock extends Activity implements OnClickListener {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+
+ View musicButton = findViewById(R.id.music_button);
+ musicButton.setOnClickListener((OnClickListener) this);
+ }
+
+ public void onClick(View v) {
+ Intent playlists = new Intent(this, PlaylistActivity.class);
+ startActivity(playlists);
+ }
+}
Oops, something went wrong.

0 comments on commit c82812b

Please sign in to comment.