Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick King committed Sep 17, 2012
1 parent 41c82f2 commit 8ca4228
Show file tree
Hide file tree
Showing 738 changed files with 49,429 additions and 3 deletions.
Binary file added GuideAndroid/.DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions GuideAndroid/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry combineaccessrules="false" kind="src" path="/library"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions GuideAndroid/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>GuideAndroid</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>
25 changes: 25 additions & 0 deletions GuideAndroid/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.vanderbilt.vm.guide"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".GuideMain"
android:label="@string/title_activity_guide_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Binary file added GuideAndroid/ic_launcher-web.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 not shown.
Binary file added GuideAndroid/libs/android-support-v4.jar
Binary file not shown.
20 changes: 20 additions & 0 deletions GuideAndroid/proguard-project.txt
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 *;
#}
14 changes: 14 additions & 0 deletions GuideAndroid/project.properties
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=Google Inc.:Google APIs:15
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 GuideAndroid/res/drawable-hdpi/ic_launcher.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 GuideAndroid/res/drawable-ldpi/ic_launcher.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 GuideAndroid/res/drawable-mdpi/ic_launcher.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 GuideAndroid/res/drawable-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions GuideAndroid/res/layout/activity_guide_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<RelativeLayout 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" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="@dimen/padding_medium"
android:text="@string/hello_world"
tools:context=".GuideMain" />

</RelativeLayout>
6 changes: 6 additions & 0 deletions GuideAndroid/res/menu/activity_guide_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_settings"
android:title="@string/menu_settings"
android:orderInCategory="100"
android:showAsAction="never" />
</menu>
7 changes: 7 additions & 0 deletions GuideAndroid/res/values-large/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<resources>

<dimen name="padding_small">8dp</dimen>
<dimen name="padding_medium">16dp</dimen>
<dimen name="padding_large">16dp</dimen>

</resources>
5 changes: 5 additions & 0 deletions GuideAndroid/res/values-v11/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>

<style name="AppTheme" parent="android:Theme.Holo.Light" />

</resources>
5 changes: 5 additions & 0 deletions GuideAndroid/res/values-v14/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />

</resources>
7 changes: 7 additions & 0 deletions GuideAndroid/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<resources>

<dimen name="padding_small">8dp</dimen>
<dimen name="padding_medium">8dp</dimen>
<dimen name="padding_large">16dp</dimen>

</resources>
8 changes: 8 additions & 0 deletions GuideAndroid/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<resources>

<string name="app_name">GuideAndroid</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_guide_main">GuideMain</string>

</resources>
5 changes: 5 additions & 0 deletions GuideAndroid/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>

<style name="AppTheme" parent="android:Theme.Light" />

</resources>
18 changes: 18 additions & 0 deletions GuideAndroid/src/edu/vanderbilt/vm/guide/AgendaFragment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package edu.vanderbilt.vm.guide;

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.widget.ArrayAdapter;

public class AgendaFragment extends ListFragment {

private static final String[] AGENDA_LIST = { "Featheringill Hall", "Rand",
"Stevenson", "Central Library" };

@Override
public void onActivityCreated(Bundle savedInstanceState) {
setListAdapter(new ArrayAdapter<String>(getActivity(),
android.R.layout.simple_list_item_1, AGENDA_LIST));
}

}
90 changes: 90 additions & 0 deletions GuideAndroid/src/edu/vanderbilt/vm/guide/GuideMain.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package edu.vanderbilt.vm.guide;

import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.SherlockFragmentActivity;

public class GuideMain extends SherlockFragmentActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_guide_main);
setupActionBar();
}

private void setupActionBar() {
ActionBar ab = getSupportActionBar();
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ab.setDisplayShowTitleEnabled(false);

Tab tab = ab.newTab()
.setText("Agenda")
.setTabListener(new TabListener<AgendaFragment>(
this, "agenda", AgendaFragment.class));
ab.addTab(tab);


}


/**
* TabListener static inner class. TabListeners handle callbacks resulting
* from a tab click. We will be using this to swap in and out fragments
* as a user interacts with the UI. This code was borrowed from the Android
* API guides at http://developer.android.com/guide/topics/ui/actionbar.html#Tabs.
* @author nicholasking
*
* @param <T> The fragment's class
*/
@TargetApi(11)
public static class TabListener<T extends Fragment> implements ActionBar.TabListener {
private Fragment mFragment;
private final Activity mActivity;
private final String mTag;
private final Class<T> mClass;

/** Constructor used each time a new tab is created.
* @param activity The host Activity, used to instantiate the fragment
* @param tag The identifier tag for the fragment
* @param clz The fragment's Class, used to instantiate the fragment
*/
public TabListener(Activity activity, String tag, Class<T> clz) {
mActivity = activity;
mTag = tag;
mClass = clz;
}

/* The following are each of the ActionBar.TabListener callbacks */

public void onTabSelected(Tab tab, FragmentTransaction ft) {
// Check if the fragment is already initialized
if (mFragment == null) {
// If not, instantiate and add it to the activity
mFragment = Fragment.instantiate(mActivity, mClass.getName());
ft.add(android.R.id.content, mFragment, mTag);
} else {
// If it exists, simply attach it in order to show it
ft.attach(mFragment);
}
}

public void onTabUnselected(Tab tab, FragmentTransaction ft) {
if (mFragment != null) {
// Detach the fragment, because another one is being attached
ft.detach(mFragment);
}
}

public void onTabReselected(Tab tab, FragmentTransaction ft) {
// User selected the already selected tab. Usually do nothing.
}
}

}
34 changes: 34 additions & 0 deletions JakeWharton-ActionBarSherlock-88fc341/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#Android generated
bin
gen
lint.xml

#Eclipse
.project
.classpath
.settings
.checkstyle

#IntelliJ IDEA
.idea
*.iml
*.ipr
*.iws
classes
gen-external-apklibs

#Maven
target
release.properties
pom.xml.*

#Ant
build.xml
ant.properties
local.properties
proguard.cfg
proguard-project.txt

#Other
.DS_Store
tmp
Loading

0 comments on commit 8ca4228

Please sign in to comment.