Skip to content

Commit

Permalink
Rudimentary tour navigation completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick King committed Aug 29, 2013
1 parent 2a691cc commit e48e185
Show file tree
Hide file tree
Showing 26 changed files with 3,480 additions and 3,183 deletions.
2 changes: 1 addition & 1 deletion GuideAndroid/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<activity
android:name="edu.vanderbilt.vm.guide.ui.GuideMain"
android:label="@string/university_name"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
6,010 changes: 3,005 additions & 3,005 deletions GuideAndroid/assets/places.json

Large diffs are not rendered by default.

43 changes: 8 additions & 35 deletions GuideAndroid/assets/tours.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id" : 1,
"name" : "Test Tour 1",
"timeRequired" : "1 hour",
"placesOnTour" : [170, 27, 22, 151, 60, 183, 209, 225, 182, 175, 91, 122, 79],
"placesOnTour" : [1, 22, 3, 9],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
Expand All @@ -12,7 +12,7 @@
"id" : 2,
"name" : "Test Tour 2",
"timeRequired" : "1 hour",
"placesOnTour" : [48, 116, 230, 219, 141, 169, 114, 90, 146],
"placesOnTour" : [24, 44, 13, 42],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
Expand All @@ -30,7 +30,7 @@
"id" : 4,
"name" : "Test Tour 4",
"timeRequired" : "1 hour",
"placesOnTour" : [18, 95, 138, 154, 209, 202],
"placesOnTour" : [6, 1, 7],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
Expand All @@ -39,7 +39,7 @@
"id" : 5,
"name" : "Test Tour 5",
"timeRequired" : "1 hour",
"placesOnTour" : [202],
"placesOnTour" : [6, 1, 7],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
Expand All @@ -48,7 +48,7 @@
"id" : 6,
"name" : "Test Tour 6",
"timeRequired" : "1 hour",
"placesOnTour" : [],
"placesOnTour" : [6, 1, 7],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
Expand All @@ -57,7 +57,7 @@
"id" : 7,
"name" : "Test Tour 7",
"timeRequired" : "1 hour",
"placesOnTour" : [7, 12, 129, 134, 34, 194, 131, 228, 132, 59],
"placesOnTour" : [6, 1, 7],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
Expand All @@ -66,7 +66,7 @@
"id" : 8,
"name" : "Test Tour 8",
"timeRequired" : "1 hour",
"placesOnTour" : [7, 12, 129, 134, 34, 194, 138, 154, 209, 182, 175, 91, 122, 79, 131, 228, 132, 59],
"placesOnTour" : [6, 1, 7],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
Expand All @@ -75,40 +75,13 @@
"id" : 9,
"name" : "Test Tour 9",
"timeRequired" : "1 hour",
"placesOnTour" : [7, 12, 129, 134, 34, 194, 182, 175, 91, 122, 79, 131, 228, 132, 59],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
},
{
"id" : 10,
"name" : "Test Tour 10",
"timeRequired" : "1 hour",
"placesOnTour" : [138, 154, 209, 7, 12, 129, 134, 34, 194, 182, 175, 91, 122, 79, 131, 228, 132, 59],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
},
{
"id" : 11,
"name" : "Test Tour 11",
"timeRequired" : "1 hour",
"placesOnTour" : [6, 1, 7],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
},
{
"id" : 12,
"name" : "Test Tour 12",
"timeRequired" : "1 hour",
"placesOnTour" : [7, 12, 129, 134, 34, 194, 182, 175, 91, 122, 79, 131, 228, 132, 59, 17, 215, 77, 65, 171, 214, 203, 1, 83, 126, 130, 189, 149, 4, 111, 198, 205, 119, 5],
"description" : "Description for this tour",
"distance" : "0.7 miles",
"iconPath" : "tour_placeholder"
},
{
"id" : 13,
"id" : 10,
"name" : "Pathing test",
"timeRequired" : "1 hour",
"placesOnTour" : [6, 1, 7, 11, 12, 13, 14, 145, 146, 147, 157, 158, 160, 161, 162, 174, 175, 176],
Expand Down
Binary file modified GuideAndroid/libs/android-support-v4.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion GuideAndroid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.3</version>
<version>3.6.1</version>
<extensions>true</extensions>
<configuration>
<sdk>
Expand Down
66 changes: 15 additions & 51 deletions GuideAndroid/res/layout/fragment_agenda.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,78 +5,42 @@
android:background="@color/light_gold"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/current_ll"
<include
android:id="@+id/current_ll_ref"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:background="@drawable/white_to_darkgold"
android:orientation="horizontal" >

<ImageView
android:id="@+id/current_img"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_weight="45"
android:adjustViewBounds="true"
android:contentDescription="@string/abs__action_bar_home_description"
android:src="@drawable/tour_placeholder" />

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="55"
android:orientation="vertical" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/main_current_location2"
android:textSize="16sp"
android:textStyle="bold" />

<TextView
android:id="@+id/current_tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/main_agenda_empty"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
layout="@layout/location_preview_layout" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" >

<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:textStyle="bold"
android:layout_gravity="center_vertical"
android:layout_margin="8dp"
android:layout_weight="1"
android:text="@string/menu_add_agenda"
android:textSize="26sp" />
android:textSize="26sp"
android:textStyle="bold" />

<ImageButton
android:id="@+id/agenda_edit"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@android:drawable/ic_menu_edit"
android:contentDescription="@string/abs__action_bar_home_description"/>
android:layout_height="wrap_content"
android:contentDescription="@string/abs__action_bar_home_description"
android:src="@android:drawable/ic_menu_edit" />

<ImageButton
android:id="@+id/agenda_remove"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/abs__action_bar_home_description"
android:src="@android:drawable/ic_delete"
android:contentDescription="@string/abs__action_bar_home_description"/>

</LinearLayout>
android:visibility="gone" />
</LinearLayout>

<View
android:layout_width="match_parent"
Expand Down
38 changes: 26 additions & 12 deletions GuideAndroid/res/layout/fragment_agenda_navigator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,37 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:background="@color/light_gold"
android:alpha="0.9"
android:orientation="vertical"
android:padding="8dp" >

<TextView
android:id="@+id/nav_tv1"
style="@style/description_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nav_label3" />

<Button
android:id="@+id/nav_et1"
style="@style/description_text_2"
<include
android:id="@+id/current_ll_ref"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/nav_label4" />
android:layout_margin="8dp"
layout="@layout/location_preview_layout" />

<LinearLayout
android:id="@+id/agenda_nav_button_ll"
android:layout_width = "match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<Button
android:id="@+id/agenda_nav_hide"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="50"
android:text="@string/hide_panel" />

<Button
android:id="@+id/nav_mark_visited"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="50"
android:text="@string/mark_as_visited" />
</LinearLayout>
</LinearLayout>
43 changes: 43 additions & 0 deletions GuideAndroid/res/layout/location_preview_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/current_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/white_to_darkgold"
android:orientation="horizontal" >

<ImageView
android:id="@+id/current_img"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_weight="45"
android:adjustViewBounds="true"
android:contentDescription="@string/abs__action_bar_home_description"
android:src="@drawable/tour_placeholder" />

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:layout_weight="55"
android:orientation="vertical" >

<TextView
android:id="@+id/location_prev_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/main_current_location2"
android:textSize="16sp"
android:textStyle="bold" />

<TextView
android:id="@+id/location_prev_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/current_location_unknown"
android:textSize="14sp" />
</LinearLayout>

</LinearLayout>
4 changes: 3 additions & 1 deletion GuideAndroid/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<string name="app_name">GuideAndroid</string>
<string name="menu_settings">Settings</string>
<string name="university_name">Vanderbilt University</string>

<string name="title_activity_guide_main">Guide Android</string>
<string name="title_activity_place_detail_activity">Place Details</string>
Expand Down Expand Up @@ -67,5 +66,8 @@

<item type="id" name="view_item_position" />
<item type="id" name="view_item_checked_set" />
<string name="current_location_unknown">Unknown</string>
<string name="mark_as_visited">Mark as Visited</string>
<string name="hide_panel">Hide Panel</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

import android.content.Context;
import android.database.Cursor;
import android.util.Log;

import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public String toString() {
return "{ id: " + this.getUniqueId() + ", name: " + getName() + " }";
}

@Override
public int hashCode() {
// We just return the unique ID for efficiency,
// hoping that the client has actually made the ID unique
Expand Down
Loading

0 comments on commit e48e185

Please sign in to comment.