Skip to content

Commit

Permalink
Fixed a bug with the new multicat trait
Browse files Browse the repository at this point in the history
Fixed the trait creation layout
  • Loading branch information
trife authored and trife committed Dec 12, 2015
1 parent 2ea5b19 commit d826fdb
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 133 deletions.
25 changes: 0 additions & 25 deletions CONTRIBUTING.md

This file was deleted.

19 changes: 0 additions & 19 deletions Field Book.iml

This file was deleted.

4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fieldbook.tracker"
android:versionCode="310"
android:versionName="3.1.0">
android:versionCode="311"
android:versionName="3.1.1">

<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
13 changes: 9 additions & 4 deletions app/src/main/java/com/fieldbook/tracker/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2833,7 +2833,10 @@ public void onItemClick(AdapterView<?> arg0,
pNum.setVisibility(EditText.GONE);

if (!newTraits.containsKey(currentTrait.trait)) {
eNum.removeTextChangedListener(eNumUpdate);
eNum.setText("");
eNum.setTextColor(Color.BLACK);
eNum.addTextChangedListener(eNumUpdate);
} else {
eNum.removeTextChangedListener(eNumUpdate);
eNum.setText(newTraits.get(currentTrait.trait).toString());
Expand Down Expand Up @@ -3006,7 +3009,7 @@ public void onCompletion(MediaPlayer mp) {
}
});
} catch (NullPointerException e) {
Log.w(TAG,e.getMessage());
Log.w(TAG, e.getMessage());
}
}

Expand Down Expand Up @@ -3238,9 +3241,11 @@ public void onPause() {

//save last plot id
if (ep.getBoolean("ImportFieldFinished", false)) {
Editor ed = ep.edit();
ed.putString("lastplot", cRange.plot_id);
ed.apply();
if(cRange!=null) {
Editor ed = ep.edit();
ed.putString("lastplot", cRange.plot_id);
ed.apply();
}
}

// Backup database
Expand Down
39 changes: 20 additions & 19 deletions app/src/main/res/layout/trait.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp">

<TextView
android:layout_width="250dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_gravity="left|center_vertical"
android:layout_weight=".2"
android:paddingRight="10dp"
android:text="@string/format"
android:textColor="#000000"
Expand All @@ -30,8 +32,9 @@

<Spinner
android:id="@+id/format"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight=".8"
android:textColor="#FFFFFF"
android:textSize="@dimen/text_size_small"
android:textStyle="bold" />
Expand All @@ -45,12 +48,12 @@
android:orientation="horizontal"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp">
android:paddingTop="5dp">

<TextView
android:layout_width="200dp"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_gravity="left|center_vertical"
android:paddingRight="10dp"
android:text="@string/trait"
android:textColor="#000000"
Expand All @@ -62,8 +65,6 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight=".8"
android:imeOptions="actionNext"
android:inputType="textCapWords"
android:paddingRight="10dp"
android:textColor="#000000"
Expand All @@ -82,9 +83,9 @@

<TextView
android:id="@+id/defTv"
android:layout_width="200dp"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_gravity="left|center_vertical"
android:paddingRight="10dp"
android:text="@string/def"
android:textColor="#000000"
Expand All @@ -104,7 +105,7 @@

<ToggleButton
android:id="@+id/boolBtn"
android:layout_width="wrap_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/btn_default"
android:textOff="@string/falsevalue"
Expand All @@ -124,9 +125,9 @@
android:paddingTop="5dp">

<TextView
android:layout_width="200dp"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_gravity="left|center_vertical"
android:paddingRight="10dp"
android:text="@string/minimum"
android:textColor="#000000"
Expand Down Expand Up @@ -156,9 +157,9 @@
android:paddingTop="5dp">

<TextView
android:layout_width="200dp"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_gravity="left|center_vertical"
android:paddingRight="10dp"
android:text="@string/maximum"
android:textColor="#000000"
Expand Down Expand Up @@ -189,9 +190,9 @@
android:paddingTop="5dp">

<TextView
android:layout_width="200dp"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_gravity="left|center_vertical"
android:paddingRight="10dp"
android:text="@string/details"
android:textColor="#000000"
Expand Down Expand Up @@ -221,9 +222,9 @@
android:paddingTop="5dp">

<TextView
android:layout_width="200dp"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_gravity="left|center_vertical"
android:paddingRight="10dp"
android:text="@string/categories"
android:textColor="#000000"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/raw/changelog_releases.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
23/3.1.1
Fixed a bug with the new multicat trait
Fixed the trait creation layout

22/3.1.0
New multicategorical trait format
Added option to overwrite preivously exported files
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/raw/dev_changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
42
Fixed a bug causing crashes in onPause
Fixed a bug causing multicat data not to save
Fixed the trait creation screen

41
Updated sample files
Changed multicat to three columns
Expand Down
64 changes: 0 additions & 64 deletions import-summary.txt

This file was deleted.

0 comments on commit d826fdb

Please sign in to comment.