OSDN Git Service

Updaed the code structure for efficiency. Staging for 1.0.6.
authorHideki Saito <hidekis@gmail.com>
Wed, 11 Feb 2009 04:19:12 +0000 (20:19 -0800)
committerHideki Saito <hidekis@gmail.com>
Wed, 11 Feb 2009 04:19:12 +0000 (20:19 -0800)
AndroidManifest.xml
res/values/strings.xml
src/hsware/HSTempo/HSTempo.java

index 3147cb6..b37e48f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="hsware.HSTempo"
-      android:versionCode="9" android:versionName="@string/VersionSimple">
+      android:versionName="@string/VersionSimple" android:versionCode="10">
     <application android:icon="@drawable/icon" android:label="@string/app_name" android:enabled="true" android:persistent="false" android:allowClearUserData="false" android:allowTaskReparenting="false" android:debuggable="false" android:description="@string/app_info">
         <activity android:label="@string/app_name" android:name=".HSTempo">
             <intent-filter>
index 5ff1834..bc32dbc 100644 (file)
 
 
 
-<string name="VersionInfo">1.0.6 Beta (February 9th, 2009)</string>
+<string name="VersionInfo">1.0.6 (February 10th, 2009)</string>
 <string name="app_info">HSTempo is an application that let you measure BPM of various beat by tapping to the beat.</string>
 <string name="recent_change">New in this version:\n- Stability Bar\n- Menu that enables you to quit this application.</string>
 <string name="AboutHeader">About HSTempo</string>
 <string name="DialogClose">Close</string>
 <string name="Interval">Interval</string>
-<string name="VersionSimple">1.0.6 Beta</string>
+<string name="VersionSimple">1.0.6</string>
 </resources>
index 225db74..659dd97 100644 (file)
@@ -92,33 +92,7 @@ public class HSTempo extends Activity {
        EditText bpmcountbox = (EditText) findViewById(R.id.BeatMonitorDisplay);
        bpmcountbox.setText(String.valueOf(bpmvalue));
        
-       bpmhistory10 = new int[10];
-       for(int i = 0; i < 10; i++)
-               bpmhistory10[i] = 0;
-       bpmhistory15 = new int[15];
-       for(int i = 0; i < 15; i++)
-               bpmhistory15[i] = 0; 
-       bpmhistory20 = new int[20];
-       for(int i = 0; i < 20; i++)
-               bpmhistory20[i] = 0;
-       bpmhistory10_pt = 0;
-       bpmhistory15_pt = 0;
-       bpmhistory20_pt = 0;
-
-       EditText elapsed = (EditText) findViewById(R.id.ElapsedBox);
-       elapsed.setText("0");
-//     EditText fromlast = (EditText) findViewById(R.id.LastBeatBox);
-//     fromlast.setText("0");
-       EditText bpm10 = (EditText) findViewById(R.id.Avg10);
-       EditText bpm15 = (EditText) findViewById(R.id.Avg15);
-       EditText bpm20 = (EditText) findViewById(R.id.Avg20);
-       bpm10.setText("X");
-       bpm15.setText("X");
-       bpm20.setText("X");
-
-       ProgressBar StabilityBar = (ProgressBar) findViewById(R.id.ProgressBar01);
-       StabilityBar.setProgress(0);
-
+       resetAll();
     }
     
     
@@ -289,6 +263,33 @@ public class HSTempo extends Activity {
                beatcount = 0;
        bpmvalue = 0;
        starttime = 0;
+       
+       bpmhistory10 = new int[10];
+       for(int i = 0; i < 10; i++)
+               bpmhistory10[i] = 0;
+       bpmhistory15 = new int[15];
+       for(int i = 0; i < 15; i++)
+               bpmhistory15[i] = 0; 
+       bpmhistory20 = new int[20];
+       for(int i = 0; i < 20; i++)
+               bpmhistory20[i] = 0;
+       bpmhistory10_pt = 0;
+       bpmhistory15_pt = 0;
+       bpmhistory20_pt = 0;
+
+//     EditText fromlast = (EditText) findViewById(R.id.LastBeatBox);
+//     fromlast.setText("0");
+       EditText bpm10 = (EditText) findViewById(R.id.Avg10);
+       EditText bpm15 = (EditText) findViewById(R.id.Avg15);
+       EditText bpm20 = (EditText) findViewById(R.id.Avg20);
+       bpm10.setText("X");
+       bpm15.setText("X");
+       bpm20.setText("X");
+
+       ProgressBar StabilityBar = (ProgressBar) findViewById(R.id.ProgressBar01);
+       StabilityBar.setProgress(0);
+       
+       
         Button resetbutton = (Button)findViewById(R.id.ResetButton);
         resetbutton.setEnabled(false);
 
@@ -312,8 +313,6 @@ public class HSTempo extends Activity {
        bpmhistory20_pt = 0;
        
        UpdateDisplay();
-       ProgressBar StabilityBar = (ProgressBar) findViewById(R.id.ProgressBar01);
-       StabilityBar.setProgress(0);
     }