Skip to content

Commit

Permalink
adjusted android settings, prints 'Training...' when train is clicked…
Browse files Browse the repository at this point in the history
… (because it can take a while and the user wonders if anything's happening)
  • Loading branch information
dermetfan committed Oct 17, 2014
1 parent 78e39cd commit 13d83a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0" >

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

<application
android:allowBackup="true"
Expand All @@ -13,8 +13,8 @@
android:theme="@style/GdxTheme" >
<activity
android:name="br.lopes.ocrSom.android.AndroidLauncher"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
2 changes: 1 addition & 1 deletion android/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">biometry-som</string>
<string name="app_name">OCR-SOM</string>

</resources>
5 changes: 3 additions & 2 deletions core/src/br/lopes/ocrSom/OcrSom.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public void clicked(InputEvent event, float x, float y) {
train.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
showMessage("Training...");
startTrain(Options.getNormalizeInput(), Options.getTrainLearningMethod(), Options.getLearnRate());
}
});
Expand Down Expand Up @@ -350,7 +351,7 @@ public void showMessage(String msg) {
//Logic Methods
private void startTrain(NormalizationType normalizationType, LearningMethod learningMethod, float learnRate) {
if (letters.getItems().size == 0) {
showMessage("Invalid Training,no Letters to Train!");
showMessage("No letters to train!");
return;
}

Expand Down Expand Up @@ -404,7 +405,7 @@ public String recognizeLetter(Pixmap letterDrawnImage) {
}
}

return "Couldnt recognize! *Unknown*";
return "Couldn't recognize! *Unknown*";
}

// getters and setters
Expand Down

0 comments on commit 13d83a4

Please sign in to comment.