Skip to content

Commit 4334d8f

Browse files
author
Daniil Efremov
committed
Some minor fixes for the new version #30
- minor default email text style fix at first start - add log after warm up
1 parent df42b0b commit 4334d8f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

app/src/main/java/openscience/crowdsource/video/experiments/MainActivity.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public class MainActivity extends Activity implements GLSurfaceView.Renderer {
9494
private static final int REQUEST_IMAGE_CAPTURE = 100;
9595
private static final int REQUEST_IMAGE_SELECT = 200;
9696
public static final int MEDIA_TYPE_IMAGE = 1;
97+
public static final String ACKNOWLEDGE_YOUR_CONTRIBUTIONS = "acknowledge your contributions!";
9798

9899

99100
String welcome = "This application let you participate in experiment crowdsourcing " +
@@ -571,11 +572,15 @@ private void loadCachedEmail() {
571572
email = read_one_string_file(pemail);
572573
if (email == null) email = "";
573574
if (!email.equals("")) {
574-
t_email.setText(email.trim());
575575
SpannableString spanString = new SpannableString(email);
576576
spanString.setSpan(new UnderlineSpan(), 0, spanString.length(), 0);
577577
t_email.setText(spanString);
578+
} else {
579+
SpannableString spanString = new SpannableString(ACKNOWLEDGE_YOUR_CONTRIBUTIONS);
580+
spanString.setSpan(new UnderlineSpan(), 0, spanString.length(), 0);
581+
t_email.setText(spanString);
578582
}
583+
579584
}
580585

581586
private boolean updateEMail(String newEmailValue) {
@@ -2347,11 +2352,12 @@ public void run() {
23472352
}
23482353
if (it == 0) {
23492354
// first iteration used for mobile warms up if it was in a low freq state
2355+
publishProgress("\nRecognition time (warms up) " + processingTime + " ms \n");
23502356
continue;
23512357
}
2358+
publishProgress("\nRecognition time " + it + ": " + processingTime + " ms \n");
23522359
cpuFreqs.add(get_cpu_freqs());
23532360
processingTimes.add(processingTime);
2354-
publishProgress("\nRecognition time " + it + ": " + processingTime + " ms \n");
23552361
}
23562362
publishProgress("\nRecognition result:\n " + recognitionResultText + "\n\n");
23572363

app/src/main/res/layout/activity_main.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@
154154
android:layout_width="wrap_content"
155155
android:layout_height="wrap_content"
156156
android:layout_below="@+id/log"
157-
android:minHeight="12dp"
158-
android:textSize="14dp"
157+
android:minHeight="28dp"
158+
android:textSize="16dp"
159159
android:layout_alignParentLeft="true"
160160
android:layout_alignParentStart="true"
161161
android:id="@+id/textView"
@@ -168,8 +168,8 @@
168168
android:layout_height="wrap_content"
169169
android:hint="acknowledge your contributions!"
170170
android:inputType="textNoSuggestions|text"
171-
android:minHeight="12dp"
172-
android:textSize="14dp"
171+
android:minHeight="28dp"
172+
android:textSize="16dp"
173173
android:layout_above="@+id/b_about"
174174
android:layout_alignRight="@+id/b_about"
175175
android:layout_alignEnd="@+id/b_about"

0 commit comments

Comments
 (0)