Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Initial project layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kmmbvnr committed Mar 10, 2012
1 parent aa6cc91 commit da74883
Show file tree
Hide file tree
Showing 13 changed files with 337 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.metadata
CryDetector/bin/
CryDetector/gen/
CryDetector/lint.xml
8 changes: 8 additions & 0 deletions CryDetector/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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 kind="output" path="bin/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions CryDetector/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>CryDetector</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>
5 changes: 5 additions & 0 deletions CryDetector/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Sat Mar 10 19:42:38 OMST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5
23 changes: 23 additions & 0 deletions CryDetector/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cc.wthr.crydetector"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
40 changes: 40 additions & 0 deletions CryDetector/proguard.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-keepclasseswithmembernames class * {
native <methods>;
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
11 changes: 11 additions & 0 deletions CryDetector/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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,
# "ant.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=android-10
4 changes: 4 additions & 0 deletions CryDetector/res/drawable/app_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/background"
android:tileMode="repeat" />
Binary file added CryDetector/res/drawable/background.gif
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 CryDetector/res/drawable/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.
126 changes: 126 additions & 0 deletions CryDetector/res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/app_background"
android:orientation="vertical" >

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="54dp"
android:layout_marginTop="40dp"
android:text="@string/samples"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/samples"
android:layout_alignParentLeft="true"
android:layout_marginLeft="58dp"
android:text="@string/hits"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/hits"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/samples"
android:layout_alignBottom="@+id/samples"
android:layout_alignLeft="@+id/TextView01"
android:text="0"
android:textSize="70dp" />

<TextView
android:id="@+id/samples"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="@+id/textView1"
android:layout_below="@+id/textView1"
android:layout_marginRight="19dp"
android:layout_marginTop="28dp"
android:text="0"
android:textSize="70dp" />

<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="22dp" >

<Button
android:id="@+id/button_nocry1"
android:layout_height="wrap_content"
android:layout_width="76dp"
android:text="@string/nocry1" />

<Button
android:id="@+id/button_nocry2"
android:layout_height="wrap_content"
android:layout_width="76dp"
android:text="@string/nocry2" />

<Button
android:id="@+id/button_nocry3"
android:layout_height="wrap_content"
android:layout_width="76dp"
android:text="@string/nocry3" />

<Button
android:id="@+id/button_nocry4"
android:layout_height="wrap_content"
android:layout_width="76dp"
android:text="@string/nocry4" />
</LinearLayout>

<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/linearLayout2"
android:layout_alignLeft="@+id/linearLayout2"
android:layout_marginBottom="30dp" >

<Button
android:id="@+id/button_cry1"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:text="@string/cry1" />

<Button
android:id="@+id/button_cry2"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:text="@string/cry2" />

<Button
android:id="@+id/button_cry3"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:text="@string/cry3" />

<Button
android:id="@+id/button_cry4"
android:layout_width="76dp"
android:layout_height="wrap_content"
android:text="@string/cry4" />
</LinearLayout>

<Button
android:id="@+id/button_mic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/linearLayout1"
android:layout_alignLeft="@+id/linearLayout1"
android:layout_alignRight="@+id/linearLayout1"
android:layout_marginBottom="36dp"
android:text="@string/microphone" />

</RelativeLayout>
18 changes: 18 additions & 0 deletions CryDetector/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="hello">Hello World, MainActivity!</string>
<string name="app_name">CryDetector</string>
<string name="hits">Hits</string>
<string name="samples">Samples</string>
<string name="microphone">Microphone</string>
<string name="cry1">Cry 1</string>
<string name="cry2">Cry 2</string>
<string name="cry3">Cry 3</string>
<string name="cry4">Cry 4</string>
<string name="nocry1">NoCry 1</string>
<string name="nocry2">NoCry 2</string>
<string name="nocry3">NoCry 3</string>
<string name="nocry4">NoCry 4</string>

</resources>
65 changes: 65 additions & 0 deletions CryDetector/src/cc/wthr/crydetector/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package cc.wthr.crydetector;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {
private Button mButtonCry1;
private Button mButtonCry2;
private Button mButtonCry3;
private Button mButtonCry4;
private Button mButtonNocry1;
private Button mButtonNocry2;
private Button mButtonNocry3;
private Button mButtonNocry4;
private Button mButtonMic;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mButtonCry1 = (Button)findViewById(R.id.button_cry1);
mButtonCry1.setOnClickListener(this);
mButtonCry2 = (Button)findViewById(R.id.button_cry2);
mButtonCry2.setOnClickListener(this);
mButtonCry3 = (Button)findViewById(R.id.button_cry3);
mButtonCry3.setOnClickListener(this);
mButtonCry4 = (Button)findViewById(R.id.button_cry4);
mButtonCry4.setOnClickListener(this);
mButtonNocry1 = (Button)findViewById(R.id.button_nocry1);
mButtonNocry1.setOnClickListener(this);
mButtonNocry2 = (Button)findViewById(R.id.button_nocry2);
mButtonNocry2.setOnClickListener(this);
mButtonNocry3 = (Button)findViewById(R.id.button_nocry3);
mButtonNocry3.setOnClickListener(this);
mButtonNocry4 = (Button)findViewById(R.id.button_nocry4);
mButtonNocry4.setOnClickListener(this);
mButtonMic = (Button)findViewById(R.id.button_mic);
mButtonMic.setOnClickListener(this);
}

public void onClick(View view) {
if(view == mButtonCry1) {

} else if(view == mButtonCry2) {

} else if(view == mButtonCry3) {

} else if(view == mButtonCry4) {

} else if(view == mButtonNocry1) {

} else if(view == mButtonNocry2) {

} else if(view == mButtonNocry3) {

} else if(view == mButtonNocry4) {

}
}
}

0 comments on commit da74883

Please sign in to comment.