-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from douglascraigschmidt/master
Update from original
- Loading branch information
Showing
91 changed files
with
3,728 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.classpath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>A2-Android-App</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> |
39 changes: 39 additions & 0 deletions
39
assignments/assignment2/A2-Android-App/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="edu.vandy" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="19" | ||
android:targetSdkVersion="22" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/palantir"> | ||
<activity | ||
android:name=".view.PalantiriActivity" | ||
android:label="@string/palantiri_configuration"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".view.GazingSimulationActivity" | ||
android:label="@string/palantiri_simulation"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.GAZING_SIMULATION" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
|
||
<service | ||
android:name=".model.service.PalantiriService" | ||
android:process=":palantirService"> | ||
</service> | ||
</application> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
assignments/assignment2/A2-Android-App/proguard-project.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# To enable ProGuard in your project, edit project.properties | ||
# to define the proguard.config property as described in that file. | ||
# | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in ${sdk.dir}/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the ProGuard | ||
# include property in project.properties. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 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 edit | ||
# "ant.properties", and override values to adapt the script to your | ||
# project structure. | ||
# | ||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): | ||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt | ||
|
||
# Project target. | ||
target=android-19 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-hdpi/gray_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.51 KB
assignments/assignment2/A2-Android-App/res/drawable-hdpi/green_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.3 KB
assignments/assignment2/A2-Android-App/res/drawable-hdpi/palantir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-hdpi/purple_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.15 KB
assignments/assignment2/A2-Android-App/res/drawable-hdpi/yellow_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-ldpi/gray_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.51 KB
assignments/assignment2/A2-Android-App/res/drawable-ldpi/green_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.3 KB
assignments/assignment2/A2-Android-App/res/drawable-ldpi/palantir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-ldpi/purple_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.15 KB
assignments/assignment2/A2-Android-App/res/drawable-ldpi/yellow_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-mdpi/gray_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.51 KB
assignments/assignment2/A2-Android-App/res/drawable-mdpi/green_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.14 KB
assignments/assignment2/A2-Android-App/res/drawable-mdpi/palantir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-mdpi/purple_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.15 KB
assignments/assignment2/A2-Android-App/res/drawable-mdpi/yellow_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-xhdpi/gray_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.51 KB
assignments/assignment2/A2-Android-App/res/drawable-xhdpi/green_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-xhdpi/purple_dot.png
Oops, something went wrong.
Binary file added
BIN
+1.11 KB
assignments/assignment2/A2-Android-App/res/drawable-xhdpi/red_dot.png
Oops, something went wrong.
Binary file added
BIN
+1.15 KB
assignments/assignment2/A2-Android-App/res/drawable-xhdpi/yellow_dot.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-xxhdpi/gray_dot.png
Oops, something went wrong.
Binary file added
BIN
+3.51 KB
assignments/assignment2/A2-Android-App/res/drawable-xxhdpi/green_dot.png
Oops, something went wrong.
Binary file added
BIN
+26.5 KB
assignments/assignment2/A2-Android-App/res/drawable-xxhdpi/palantir.png
Oops, something went wrong.
Binary file added
BIN
+1.42 KB
assignments/assignment2/A2-Android-App/res/drawable-xxhdpi/purple_dot.png
Oops, something went wrong.
Binary file added
BIN
+1.11 KB
assignments/assignment2/A2-Android-App/res/drawable-xxhdpi/red_dot.png
Oops, something went wrong.
Binary file added
BIN
+1.15 KB
assignments/assignment2/A2-Android-App/res/drawable-xxhdpi/yellow_dot.png
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
assignments/assignment2/A2-Android-App/res/layout/being_list_element.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="horizontal" > | ||
|
||
<ImageView | ||
android:layout_width="40dp" | ||
android:layout_height="40dp" | ||
android:src="@drawable/being" /> | ||
|
||
<ImageView | ||
android:id="@+id/dot" | ||
android:layout_width="14dp" | ||
android:layout_height="14dp" | ||
android:src="@drawable/yellow_dot" /> | ||
|
||
</LinearLayout> |
40 changes: 40 additions & 0 deletions
40
assignments/assignment2/A2-Android-App/res/layout/gazing_simulation_activity.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
android:orientation="vertical"> | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" > | ||
|
||
<Button | ||
android:id="@+id/button_simulation" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:onClick="simulationButtonPressed"/> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
|
||
<ListView | ||
android:id="@+id/list_view_beings" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" /> | ||
|
||
<ListView | ||
android:id="@+id/list_view_palantiri" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" /> | ||
</LinearLayout> | ||
</LinearLayout> |
18 changes: 18 additions & 0 deletions
18
assignments/assignment2/A2-Android-App/res/layout/palantir_list_element.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="horizontal" > | ||
|
||
<ImageView | ||
android:layout_width="40dp" | ||
android:layout_height="40dp" | ||
android:src="@drawable/palantir" /> | ||
|
||
<ImageView | ||
android:id="@+id/dot" | ||
android:layout_width="14dp" | ||
android:layout_height="14dp" | ||
android:src="@drawable/green_dot" /> | ||
|
||
</LinearLayout> |
72 changes: 72 additions & 0 deletions
72
assignments/assignment2/A2-Android-App/res/layout/palantiri_activity.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
android:orientation="vertical"> | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/label_number_of_palantiri"/> | ||
<EditText | ||
android:id="@+id/edittext_number_of_palantiri" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:inputType="number" | ||
android:hint="@string/edittext_hint_palantiri"/> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/label_number_of_beings"/> | ||
<EditText | ||
android:id="@+id/edittext_number_of_beings" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:inputType="number" | ||
android:hint="@string/edittext_hint_beings"/> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/label_gazing_iterations"/> | ||
<EditText | ||
android:id="@+id/edittext_gazing_iterations" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:inputType="number" | ||
android:hint="@string/edittext_hint_iterations"/> | ||
</LinearLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" > | ||
|
||
<Button | ||
android:id="@+id/button_simulation" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/button_start_simulation" | ||
android:onClick="simulationButtonPressed"/> | ||
</LinearLayout> | ||
</LinearLayout> |
10 changes: 10 additions & 0 deletions
10
assignments/assignment2/A2-Android-App/res/values-w820dp/dimens.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<resources> | ||
|
||
<!-- | ||
Example customization of dimensions originally defined in res/values/dimens.xml | ||
(such as screen margins) for screens with more than 820dp of available width. This | ||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). | ||
--> | ||
<dimen name="activity_horizontal_margin">64dp</dimen> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<resources> | ||
<!-- Default screen margins, per the Android Design guidelines. --> | ||
<dimen name="activity_horizontal_margin">16dp</dimen> | ||
<dimen name="activity_vertical_margin">16dp</dimen> | ||
</resources> |
18 changes: 18 additions & 0 deletions
18
assignments/assignment2/A2-Android-App/res/values/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="palantiri_configuration">Palantiri Configuration</string> | ||
<string name="palantiri_simulation">Palantiri Simulation</string> | ||
<string name="label_number_of_palantiri"># of Palantiri</string> | ||
<string name="edittext_hint_palantiri">1 - 6 (4 default)</string> | ||
<string name="label_number_of_beings"># of Beings</string> | ||
<string name="edittext_hint_beings">1 - 10 (6 default)</string> | ||
<string name="label_lease_duration">Lease Duration</string> | ||
<string name="edittext_hint_duration">1000 to 5000 (5000 default)</string> | ||
<string name="label_gazing_iterations">Gazing Iterations</string> | ||
<string name="edittext_hint_iterations">1 to 100 (5 default)</string> | ||
<string name="label_semaphore">Semaphore</string> | ||
<string name="edittext_hint_semaphore">"java" or "simple" ("java" default)</string> | ||
<string name="button_start_simulation">Start Simulation</string> | ||
<string name="label_fair">Fair?</string> | ||
<string name="action_settings">Settings</string> | ||
</resources> |
Oops, something went wrong.