From cd6f9d6d5df1219a2c40d4d5fd3f34a0756f0db9 Mon Sep 17 00:00:00 2001 From: trife Date: Thu, 9 Feb 2017 22:39:48 -0600 Subject: [PATCH] Replaced lots of words with icons Fixed an issue where default trait value wasn't being saved Added a dialog when importing trait lists and current list hasn't been exported Added location trait --- .../com/fieldbook/tracker/ConfigActivity.java | 2 +- .../com/fieldbook/tracker/DataHelper.java | 6 +- .../com/fieldbook/tracker/MainActivity.java | 196 +++++++++++++++--- .../tracker/Search/SearchActivity.java | 2 - .../fieldbook/tracker/Trait/TraitAdapter.java | 50 ++++- .../tracker/Trait/TraitEditorActivity.java | 55 ++++- app/src/main/res/drawable-hdpi/ic_audio.png | Bin 0 -> 651 bytes app/src/main/res/drawable-hdpi/ic_camera.png | Bin 0 -> 725 bytes .../res/drawable-hdpi/ic_delete_forever.png | Bin 0 -> 312 bytes app/src/main/res/drawable-hdpi/ic_save.png | Bin 0 -> 401 bytes app/src/main/res/drawable-mdpi/ic_audio.png | Bin 0 -> 449 bytes app/src/main/res/drawable-mdpi/ic_camera.png | Bin 0 -> 466 bytes .../res/drawable-mdpi/ic_delete_forever.png | Bin 0 -> 255 bytes app/src/main/res/drawable-mdpi/ic_save.png | Bin 0 -> 279 bytes app/src/main/res/drawable-xhdpi/ic_audio.png | Bin 0 -> 860 bytes app/src/main/res/drawable-xhdpi/ic_camera.png | Bin 0 -> 962 bytes .../res/drawable-xhdpi/ic_delete_forever.png | Bin 0 -> 375 bytes app/src/main/res/drawable-xhdpi/ic_save.png | Bin 0 -> 521 bytes app/src/main/res/drawable-xxhdpi/ic_audio.png | Bin 0 -> 1286 bytes .../main/res/drawable-xxhdpi/ic_camera.png | Bin 0 -> 1426 bytes .../res/drawable-xxhdpi/ic_delete_forever.png | Bin 0 -> 495 bytes app/src/main/res/drawable-xxhdpi/ic_save.png | Bin 0 -> 788 bytes .../main/res/drawable-xxxhdpi/ic_audio.png | Bin 0 -> 1768 bytes .../main/res/drawable-xxxhdpi/ic_camera.png | Bin 0 -> 1995 bytes .../drawable-xxxhdpi/ic_delete_forever.png | Bin 0 -> 604 bytes app/src/main/res/drawable-xxxhdpi/ic_save.png | Bin 0 -> 1095 bytes app/src/main/res/layout-sw600dp/main.xml | 7 + .../main/res/layout-sw600dp/trait_audio.xml | 45 ++-- .../main/res/layout-sw600dp/trait_boolean.xml | 19 +- .../res/layout-sw600dp/trait_categorical.xml | 18 +- .../main/res/layout-sw600dp/trait_counter.xml | 29 ++- .../main/res/layout-sw600dp/trait_date.xml | 38 ++-- .../layout-sw600dp/trait_diseaserating.xml | 19 +- .../res/layout-sw600dp/trait_location.xml | 36 ++++ .../res/layout-sw600dp/trait_multicat.xml | 18 +- .../main/res/layout-sw600dp/trait_percent.xml | 17 +- .../main/res/layout-sw600dp/trait_photo.xml | 36 ++-- app/src/main/res/layout-sw600dp/traitline.xml | 20 +- app/src/main/res/layout/main.xml | 5 + app/src/main/res/layout/trait_audio.xml | 44 ++-- app/src/main/res/layout/trait_boolean.xml | 22 +- app/src/main/res/layout/trait_categorical.xml | 17 +- app/src/main/res/layout/trait_counter.xml | 25 ++- app/src/main/res/layout/trait_date.xml | 40 ++-- .../main/res/layout/trait_diseaserating.xml | 26 ++- app/src/main/res/layout/trait_location.xml | 35 ++++ app/src/main/res/layout/trait_multicat.xml | 17 +- app/src/main/res/layout/trait_percent.xml | 16 +- app/src/main/res/layout/trait_photo.xml | 38 ++-- app/src/main/res/layout/traitline.xml | 17 +- app/src/main/res/raw/dev_changelog.txt | 6 + app/src/main/res/values/strings.xml | 2 + 52 files changed, 605 insertions(+), 318 deletions(-) create mode 100644 app/src/main/res/drawable-hdpi/ic_audio.png create mode 100644 app/src/main/res/drawable-hdpi/ic_camera.png create mode 100644 app/src/main/res/drawable-hdpi/ic_delete_forever.png create mode 100644 app/src/main/res/drawable-hdpi/ic_save.png create mode 100644 app/src/main/res/drawable-mdpi/ic_audio.png create mode 100644 app/src/main/res/drawable-mdpi/ic_camera.png create mode 100644 app/src/main/res/drawable-mdpi/ic_delete_forever.png create mode 100644 app/src/main/res/drawable-mdpi/ic_save.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_audio.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_camera.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_delete_forever.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_save.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_audio.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_camera.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_delete_forever.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_save.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_audio.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_camera.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_delete_forever.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_save.png create mode 100644 app/src/main/res/layout-sw600dp/trait_location.xml create mode 100644 app/src/main/res/layout/trait_location.xml diff --git a/app/src/main/java/com/fieldbook/tracker/ConfigActivity.java b/app/src/main/java/com/fieldbook/tracker/ConfigActivity.java index 80d817708..fc81ce95b 100644 --- a/app/src/main/java/com/fieldbook/tracker/ConfigActivity.java +++ b/app/src/main/java/com/fieldbook/tracker/ConfigActivity.java @@ -546,7 +546,7 @@ public void onClick(DialogInterface dialog, int which) { } // Only used for truncating lat long values - private String truncateDecimalString(String v) { + public String truncateDecimalString(String v) { int count = 0; boolean found = false; diff --git a/app/src/main/java/com/fieldbook/tracker/DataHelper.java b/app/src/main/java/com/fieldbook/tracker/DataHelper.java index 9b315d22d..33dada1cc 100644 --- a/app/src/main/java/com/fieldbook/tracker/DataHelper.java +++ b/app/src/main/java/com/fieldbook/tracker/DataHelper.java @@ -286,12 +286,12 @@ public Cursor convertDatabaseToTable(String[] col, String[] traits) { for (int i = 0; i < traits.length; i++) { traitArgs[i] = "m" + i + ".userValue as '" + traits[i] + "'"; - joinArgs = joinArgs + "LEFT JOIN user_traits m" + i + " ON range." + TICK +ep.getString("ImportUniqueName", "") - +TICK + " = m" + i + ".rid AND m" + i + ".parent = '" + traits[i] + "' "; + joinArgs = joinArgs + "LEFT JOIN user_traits m" + i + " ON range." + TICK + ep.getString("ImportUniqueName", "") + + TICK + " = m" + i + ".rid AND m" + i + ".parent = '" + traits[i] + "' "; } query = "SELECT " + convertToCommaDelimited(rangeArgs) + " , " + convertToCommaDelimited(traitArgs) + - " FROM range range " + joinArgs + "GROUP BY range." +TICK + ep.getString("ImportUniqueName", "")+TICK; + " FROM range range " + joinArgs + "GROUP BY range." + TICK + ep.getString("ImportUniqueName", "") + TICK + "ORDER BY range.id"; Log.i("DH", query); diff --git a/app/src/main/java/com/fieldbook/tracker/MainActivity.java b/app/src/main/java/com/fieldbook/tracker/MainActivity.java index c4b2c0cfe..e02d4ab1f 100644 --- a/app/src/main/java/com/fieldbook/tracker/MainActivity.java +++ b/app/src/main/java/com/fieldbook/tracker/MainActivity.java @@ -2,6 +2,7 @@ import android.app.Activity; import android.graphics.PorterDuff; +import android.provider.Settings; import android.support.v7.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; @@ -59,6 +60,7 @@ import android.widget.Button; import android.widget.EditText; import android.widget.Gallery; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams; @@ -213,8 +215,8 @@ public class MainActivity extends AppCompatActivity implements OnClickListener { private MediaRecorder mRecorder; private MediaPlayer mPlayer; private File mRecordingLocation; - private Button doRecord; - private Button clearRecord; + private ImageButton doRecord; + private ImageButton clearRecord; private boolean mRecording; private boolean mListening = false; @@ -232,7 +234,8 @@ public class MainActivity extends AppCompatActivity implements OnClickListener { private TextView counterTv; - Button rust0, rust5, rust10, rust15, rust20, rust25, rust30, rust35, rust40, rust45, rust50, rust55, rust60, rust65, rust70, rust75, rust80, rust85, rust90, rust95, rust100, rustR, rustM, rustS, rustDelim, rustClear; + Button rust0, rust5, rust10, rust15, rust20, rust25, rust30, rust35, rust40, rust45, rust50, rust55, rust60, rust65, rust70, rust75, rust80, rust85, rust90, rust95, rust100, rustR, rustM, rustS, rustDelim; + ImageButton rustClear; final Button buttonArray[] = new Button[12]; @@ -263,6 +266,7 @@ public class MainActivity extends AppCompatActivity implements OnClickListener { LinearLayout traitAudio; LinearLayout traitDiseaseRating; LinearLayout traitMulticat; + LinearLayout traitLocation; /** * Test area @@ -405,6 +409,7 @@ private void loadScreen() { traitCounter = (LinearLayout) findViewById(R.id.counterLayout); traitDiseaseRating = (LinearLayout) findViewById(R.id.diseaseLayout); traitMulticat = (LinearLayout) findViewById(R.id.multicatLayout); + traitLocation = (LinearLayout) findViewById(R.id.locationLayout); traitType = (Spinner) findViewById(R.id.traitType); newTraits = new HashMap(); @@ -468,16 +473,16 @@ public void onClick(View v) { pNum = (EditText) findViewById(R.id.pNum); // Clear button for most traits - doRecord = (Button) traitAudio.findViewById(R.id.record); + doRecord = (ImageButton) traitAudio.findViewById(R.id.record); doRecord.setOnClickListener(this); - clearRecord = (Button) traitAudio.findViewById(R.id.clearRecord); + clearRecord = (ImageButton) traitAudio.findViewById(R.id.clearRecord); clearRecord.setOnClickListener(this); - Button capture = (Button) traitPhoto.findViewById(R.id.capture); + ImageButton capture = (ImageButton) traitPhoto.findViewById(R.id.capture); capture.setOnClickListener(this); - Button captureClear = (Button) traitPhoto.findViewById(R.id.clearPhoto); + ImageButton captureClear = (ImageButton) traitPhoto.findViewById(R.id.clearPhoto); captureClear.setOnClickListener(this); photo = (Gallery) traitPhoto.findViewById(R.id.photo); @@ -582,7 +587,7 @@ public void onTextChanged(CharSequence arg0, int arg1, int arg2, // Progress bar seekBar = (SeekBar) traitPercent.findViewById(R.id.seekbar); - Button clearPercent = (Button) traitPercent.findViewById(R.id.clearPercent); + ImageButton clearPercent = (ImageButton) traitPercent.findViewById(R.id.clearPercent); seekBar.setMax(100); seekListener = new OnSeekBarChangeListener() { @@ -621,24 +626,27 @@ public boolean onTouch(View arg0, MotionEvent arg1) { rangeName = (TextView) findViewById(R.id.rangeName); plotName = (TextView) findViewById(R.id.plotName); + ImageButton getLocation = (ImageButton) traitLocation.findViewById(R.id.getLocationBtn); + ImageButton clearLocation = (ImageButton) traitLocation.findViewById(R.id.clearLocationBtn); + Button addDayBtn = (Button) traitDate.findViewById(R.id.addDateBtn); Button minusDayBtn = (Button) traitDate.findViewById(R.id.minusDateBtn); - Button saveDayBtn = (Button) traitDate.findViewById(R.id.enterBtn); - Button clearDate = (Button) traitDate.findViewById(R.id.clearDateBtn); + ImageButton saveDayBtn = (ImageButton) traitDate.findViewById(R.id.enterBtn); + ImageButton clearDate = (ImageButton) traitDate.findViewById(R.id.clearDateBtn); Button addCounterBtn = (Button) traitCounter.findViewById(R.id.addBtn); Button minusCounterBtn = (Button) traitCounter.findViewById(R.id.minusBtn); - Button clearCounterBtn = (Button) traitCounter.findViewById(R.id.clearCounterBtn); + ImageButton clearCounterBtn = (ImageButton) traitCounter.findViewById(R.id.clearCounterBtn); counterTv = (TextView) traitCounter.findViewById(R.id.curCount); // Multicat - Button clearMultiCat = (Button) traitMulticat.findViewById(R.id.clearMultiCatBtn); + ImageButton clearMultiCat = (ImageButton) traitMulticat.findViewById(R.id.clearMultiCatBtn); gridMultiCat = (ExpandableHeightGridView) traitMulticat.findViewById(R.id.catGrid); gridMultiCat.setExpanded(true); buttonsCreated = false; //Button clearBtn = (Button) findViewById(R.id.clearBtn); - Button clearCat = (Button) traitCategorical.findViewById(R.id.clearCatBtn); + ImageButton clearCat = (ImageButton) traitCategorical.findViewById(R.id.clearCatBtn); Button k1 = (Button) traitNumeric.findViewById(R.id.k1); Button k2 = (Button) traitNumeric.findViewById(R.id.k2); @@ -710,7 +718,7 @@ public boolean onLongClick(View v) { rustM=(Button) traitDiseaseRating.findViewById(R.id.rustM); rustS=(Button) traitDiseaseRating.findViewById(R.id.rustS); rustDelim = (Button) traitDiseaseRating.findViewById(R.id.rustDelim); - rustClear = (Button) traitDiseaseRating.findViewById(R.id.clearRustBtn); + rustClear = (ImageButton) traitDiseaseRating.findViewById(R.id.clearRustBtn); Button[] rustBtnArray = new Button[]{rust0,rust5,rust10,rust15,rust20,rust25,rust30,rust35,rust40,rust45,rust50,rust55,rust60,rust65,rust70,rust75,rust80,rust85,rust90,rust95,rust100}; List temps = new ArrayList(); @@ -757,8 +765,11 @@ public boolean onLongClick(View v) { rustDelim.setOnClickListener(this); rustClear.setOnClickListener(this); - rangeName.setText(ep.getString("ImportFirstName", getString(R.string.range)) + ":"); - plotName.setText(ep.getString("ImportSecondName", getString(R.string.plot)) + ":"); + String primaryName = ep.getString("ImportFirstName", getString(R.string.range)) + ":"; + String secondaryName = ep.getString("ImportSecondName", getString(R.string.plot)) + ":"; + + rangeName.setText(primaryName); + plotName.setText(secondaryName); clearPercent.setOnClickListener(new OnClickListener() { @Override @@ -885,6 +896,38 @@ public void onClick(View arg0) { } }); + // Get Location + getLocation.setOnClickListener(new OnClickListener() { + public void onClick(View arg0) { + GPSTracker gps = new GPSTracker(thisActivity); + String fullLocation = ""; + double lat; + double lng; + + if (gps.canGetLocation()) { //GPS enabled + lat = gps.getLatitude(); // returns latitude + lng = gps.getLongitude(); // returns longitude + fullLocation = truncateDecimalString(String.valueOf(lat)) + "; " + truncateDecimalString(String.valueOf(lng)); + } else { + Intent intent = new Intent( + Settings.ACTION_LOCATION_SOURCE_SETTINGS); + startActivity(intent); + } + eNum.setText(fullLocation); + updateTrait(currentTrait.trait, "location", fullLocation); + } + }); + + // Clear location + clearLocation.setOnClickListener(new OnClickListener() { + public void onClick(View arg0) { + eNum.removeTextChangedListener(eNumUpdate); + eNum.setText(""); + removeTrait(currentTrait.trait); + eNum.addTextChangedListener(eNumUpdate); + } + }); + // Add counter addCounterBtn.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { @@ -1062,7 +1105,7 @@ public void onClick(View arg0) { }); eImg = (ImageView) traitBoolean.findViewById(R.id.eImg); - Button clearBoolean = (Button) traitBoolean.findViewById(R.id.clearBoolean); + ImageButton clearBoolean = (ImageButton) traitBoolean.findViewById(R.id.clearBoolean); // Boolean eImg.setOnClickListener(new OnClickListener() { @@ -2071,6 +2114,11 @@ public void onItemSelected(AdapterView arg0, View arg1, } } + //Save default if it exists + if (currentTrait.defaultValue != null && currentTrait.defaultValue.length() > 0) { + updateTrait(currentTrait.trait, currentTrait.format, currentTrait.defaultValue); + } + // All the logic is here // What it does is hide all other controls except the // current displayed trait @@ -2089,6 +2137,7 @@ public void onItemSelected(AdapterView arg0, View arg1, traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.setVisibility(EditText.VISIBLE); tNum.setSelection(tNum.getText().length()); @@ -2122,7 +2171,6 @@ public void onItemSelected(AdapterView arg0, View arg1, tNum.addTextChangedListener(tNumUpdate); tNum.setSelection(tNum.getText().length()); - } // This is needed to fix the keyboard bug @@ -2151,6 +2199,7 @@ public void run() { traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.setVisibility(EditText.GONE); tNum.setEnabled(false); @@ -2207,6 +2256,7 @@ public void run() { traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.setVisibility(EditText.GONE); tNum.setEnabled(false); @@ -2289,6 +2339,7 @@ public void run() { traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.setEnabled(false); tNum.setVisibility(View.GONE); @@ -2363,6 +2414,7 @@ public void run() { traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.setVisibility(EditText.GONE); tNum.setEnabled(false); @@ -2416,6 +2468,7 @@ public void run() { traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.setVisibility(EditText.GONE); tNum.setEnabled(false); @@ -2453,6 +2506,7 @@ public void run() { traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.removeTextChangedListener(tNumUpdate); tNum.setVisibility(EditText.VISIBLE); @@ -2461,12 +2515,14 @@ public void run() { eNum.setVisibility(EditText.GONE); if (!newTraits.containsKey(currentTrait.trait)) { - doRecord.setText(getString(R.string.record)); + //doRecord.setText(getString(R.string.record)); + doRecord.setImageResource(R.drawable.ic_audio); tNum.setText(""); //tNum.setText(R.string.nodata); } else { mRecordingLocation = new File(newTraits.get(currentTrait.trait).toString()); - doRecord.setText(getString(R.string.play)); + //doRecord.setText(getString(R.string.play)); + doRecord.setImageResource(R.drawable.ic_play_arrow); tNum.setText(getString(R.string.stored)); } @@ -2482,6 +2538,7 @@ public void run() { traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.removeTextChangedListener(tNumUpdate); tNum.setVisibility(EditText.GONE); @@ -2539,6 +2596,7 @@ public void onItemClick(AdapterView arg0, traitCounter.setVisibility(View.VISIBLE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.removeTextChangedListener(tNumUpdate); tNum.setVisibility(EditText.GONE); @@ -2565,6 +2623,7 @@ public void onItemClick(AdapterView arg0, traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.VISIBLE); traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.removeTextChangedListener(tNumUpdate); tNum.setVisibility(EditText.GONE); @@ -2604,6 +2663,7 @@ public void onItemClick(AdapterView arg0, traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); traitMulticat.setVisibility(View.VISIBLE); + traitLocation.setVisibility(View.GONE); tNum.setVisibility(EditText.GONE); tNum.setEnabled(false); @@ -2675,6 +2735,47 @@ public void onGlobalLayout() { } }); + } else if(currentTrait.format.equals("location")) { + traitText.setVisibility(View.GONE); + traitNumeric.setVisibility(View.GONE); + traitPercent.setVisibility(View.GONE); + traitDate.setVisibility(View.GONE); + traitCategorical.setVisibility(View.GONE); + traitBoolean.setVisibility(View.GONE); + traitAudio.setVisibility(View.GONE); + traitPhoto.setVisibility(View.GONE); + traitCounter.setVisibility(View.GONE); + traitDiseaseRating.setVisibility(View.GONE); + traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.VISIBLE); + + tNum.setVisibility(EditText.GONE); + tNum.setEnabled(false); + + eNum.setVisibility(EditText.VISIBLE); + eNum.setEnabled(true); + eNum.setCursorVisible(false); + + pNum.setVisibility(EditText.GONE); + + if (newTraits.containsKey(currentTrait.trait)) { + eNum.removeTextChangedListener(eNumUpdate); + eNum.setText(newTraits.get(currentTrait.trait).toString()); + eNum.setTextColor(Color.parseColor(displayColor)); + eNum.addTextChangedListener(eNumUpdate); + } else { + eNum.removeTextChangedListener(eNumUpdate); + + eNum.setText(""); + eNum.setTextColor(Color.BLACK); + + if (currentTrait.defaultValue != null + && currentTrait.defaultValue.length() > 0) + eNum.setText(currentTrait.defaultValue); + + eNum.addTextChangedListener(eNumUpdate); + } + } else { traitText.setVisibility(View.GONE); traitNumeric.setVisibility(View.GONE); @@ -2686,6 +2787,8 @@ public void onGlobalLayout() { traitPhoto.setVisibility(View.GONE); traitCounter.setVisibility(View.GONE); traitDiseaseRating.setVisibility(View.GONE); + traitMulticat.setVisibility(View.GONE); + traitLocation.setVisibility(View.GONE); tNum.removeTextChangedListener(tNumUpdate); tNum.setVisibility(EditText.GONE); @@ -2769,7 +2872,8 @@ private void releaseRecorder() { private void beginPlayback() { mListening = true; - doRecord.setText(R.string.stop); + //doRecord.setText(R.string.stop); + doRecord.setImageResource(R.drawable.ic_stop); mPlayer = new MediaPlayer(); mPlayer = MediaPlayer.create(MainActivity.this, Uri.parse(mRecordingLocation.getAbsolutePath())); @@ -2786,7 +2890,9 @@ private void beginPlayback() mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { public void onCompletion(MediaPlayer mp) { mListening = false; - doRecord.setText(R.string.play); + //doRecord.setText(R.string.play); + doRecord.setImageResource(R.drawable.ic_play_arrow); + clearRecord.setEnabled(true); } }); @@ -3132,8 +3238,11 @@ public void onResume() { plot.setVisibility(EditText.GONE); } - rangeName.setText(ep.getString("ImportFirstName", getString(R.string.range)) + ":"); - plotName.setText(ep.getString("ImportSecondName", getString(R.string.plot)) + ":"); + String primaryName = ep.getString("ImportFirstName", getString(R.string.range)) + ":"; + String secondaryName = ep.getString("ImportSecondName", getString(R.string.plot)) + ":"; + + rangeName.setText(primaryName); + plotName.setText(secondaryName); paging = 1; @@ -3626,7 +3735,9 @@ public void onClick(View b) { if (mListening) { mPlayer.stop(); - doRecord.setText(R.string.play); + //doRecord.setText(R.string.play); + doRecord.setImageResource(R.drawable.ic_play_arrow); + mListening = false; clearRecord.setEnabled(true); break; @@ -3650,7 +3761,8 @@ public void onClick(View b) { tNum.setText(getString(R.string.stored)); mRecording = false; - doRecord.setText(R.string.play); + //doRecord.setText(R.string.play); + doRecord.setImageResource(R.drawable.ic_play_arrow); rangeLeft.setEnabled(true); rangeRight.setEnabled(true); @@ -3681,7 +3793,8 @@ public void onClick(View b) { mRecorder.start(); mRecording = true; - doRecord.setText(R.string.stop); + //doRecord.setText(R.string.stop); + doRecord.setImageResource(R.drawable.ic_stop); } break; @@ -3690,7 +3803,9 @@ public void onClick(View b) { removeTrait(currentTrait.trait); tNum.setText(""); mRecording = false; - doRecord.setText(R.string.record); + //doRecord.setText(R.string.record); + doRecord.setImageResource(R.drawable.ic_audio); + mListening = false; mRecording = false; break; @@ -4419,4 +4534,29 @@ public static boolean isGooglePlayInstalled(Context context) { } return app_installed; } + + public String truncateDecimalString(String v) { + int count = 0; + + boolean found = false; + + String truncated = ""; + + for (int i = 0; i < v.length(); i++) { + if (found) { + count += 1; + + if (count == 5) + break; + } + + if (v.charAt(i) == '.') { + found = true; + } + + truncated += v.charAt(i); + } + + return truncated; + } } \ No newline at end of file diff --git a/app/src/main/java/com/fieldbook/tracker/Search/SearchActivity.java b/app/src/main/java/com/fieldbook/tracker/Search/SearchActivity.java index 5c0e67e50..6fb0fd28a 100644 --- a/app/src/main/java/com/fieldbook/tracker/Search/SearchActivity.java +++ b/app/src/main/java/com/fieldbook/tracker/Search/SearchActivity.java @@ -92,8 +92,6 @@ public void onClick(View arg0) { try { // Create the sql query based on user selection - //TODO add ticks - String sql1 = "select range.id, range." + TICK + ep.getString("ImportFirstName", "") + TICK + "," + " range." + TICK + ep.getString("ImportSecondName", "") + TICK + " from range where range.id is not null "; String sql2 = "select range.id, range." + TICK + ep.getString("ImportFirstName", "") + TICK + "," + "range." + TICK + ep.getString("ImportSecondName", "") + TICK + " from traits, range, user_traits where user_traits.rid = range." + TICK + ep.getString("ImportUniqueName", "") + TICK + " and user_traits.parent = traits.trait and user_traits.trait = traits.format "; diff --git a/app/src/main/java/com/fieldbook/tracker/Trait/TraitAdapter.java b/app/src/main/java/com/fieldbook/tracker/Trait/TraitAdapter.java index e85853e40..33fc2c07c 100644 --- a/app/src/main/java/com/fieldbook/tracker/Trait/TraitAdapter.java +++ b/app/src/main/java/com/fieldbook/tracker/Trait/TraitAdapter.java @@ -60,7 +60,7 @@ public long getItemId(int position) { private class ViewHolder { TextView name; - TextView format; + ImageView format; CheckBox visible; ImageView dragSort; ImageView menuPopup; @@ -77,7 +77,7 @@ public View getView(final int position, View convertView, final ViewGroup parent holder = new ViewHolder(); holder.name = (TextView) convertView.findViewById(R.id.text1); - holder.format = (TextView) convertView.findViewById(R.id.text2); + holder.format = (ImageView) convertView.findViewById(R.id.traitType); holder.visible = (CheckBox) convertView.findViewById(R.id.visible); holder.dragSort = (ImageView) convertView.findViewById(R.id.dragSort); holder.menuPopup = (ImageView) convertView.findViewById(R.id.popupMenu); @@ -90,7 +90,51 @@ public View getView(final int position, View convertView, final ViewGroup parent holder.id = getItem(position).id; holder.realPosition = getItem(position).realPosition; holder.name.setText(getItem(position).trait); - holder.format.setText(getItem(position).format); + + switch (getItem(position).format) { + case "numeric": + holder.format.setBackgroundResource(R.drawable.ic_numeric); + break; + case "categorical": + holder.format.setBackgroundResource(R.drawable.ic_categorical); + break; + case "date": + holder.format.setBackgroundResource(R.drawable.ic_today); + break; + case "percent": + holder.format.setBackgroundResource(R.drawable.ic_percent); + break; + case "boolean": + holder.format.setBackgroundResource(R.drawable.ic_cancel); + break; + case "text": + holder.format.setBackgroundResource(R.drawable.ic_text); + break; + case "photo": + holder.format.setBackgroundResource(R.drawable.ic_camera); + break; + case "audio": + holder.format.setBackgroundResource(R.drawable.ic_audio); + break; + case "counter": + holder.format.setBackgroundResource(R.drawable.ic_counter); + break; + case "disease rating": + holder.format.setBackgroundResource(R.drawable.ic_bug); + break; + case "rust rating": + holder.format.setBackgroundResource(R.drawable.ic_bug); + break; + case "multicat": + holder.format.setBackgroundResource(R.drawable.ic_multicat); + break; + case "location": + holder.format.setBackgroundResource(R.drawable.ic_location); + break; + default: + holder.format.setBackgroundResource(R.drawable.ic_reorder); + break; + } // Check or uncheck the list items if (visibility != null) { diff --git a/app/src/main/java/com/fieldbook/tracker/Trait/TraitEditorActivity.java b/app/src/main/java/com/fieldbook/tracker/Trait/TraitEditorActivity.java index 06b2477c5..cb0ea1575 100644 --- a/app/src/main/java/com/fieldbook/tracker/Trait/TraitEditorActivity.java +++ b/app/src/main/java/com/fieldbook/tracker/Trait/TraitEditorActivity.java @@ -295,8 +295,8 @@ public void onCreate(Bundle savedInstanceState) { thisActivity = this; - final String[] data = new String[11]; - final String[] enData = new String[11]; + final String[] data = new String[12]; + final String[] enData = new String[12]; data[0] = getString(R.string.numeric); data[1] = getString(R.string.qualitative); @@ -309,6 +309,7 @@ public void onCreate(Bundle savedInstanceState) { data[8] = getString(R.string.counter); data[9] = getString(R.string.rustrating); data[10] = getString(R.string.multicategorical); + data[11] = getString(R.string.location_trait); enData[0] = "Numeric"; enData[1] = "Categorical"; @@ -321,6 +322,7 @@ public void onCreate(Bundle savedInstanceState) { enData[8] = "Counter"; enData[9] = "Disease Rating"; enData[10] = "Multicat"; + enData[11] = "Location"; HashMap visibility = MainActivity.dt.getTraitVisibility(); traitList = (DragSortListView) findViewById(R.id.myList); @@ -585,6 +587,7 @@ public void onClick(View arg0) { Editor ed = ep.edit(); ed.putBoolean("CreateTraitFinished", true); + ed.putBoolean("TraitsExported", false); ed.apply(); loadData(); @@ -769,6 +772,13 @@ private void prepareFields(int position) { maxBox.setVisibility(View.GONE); categoryBox.setVisibility(View.VISIBLE); break; + case 11: //location + defBox.setVisibility(View.GONE); + minBox.setVisibility(View.GONE); + maxBox.setVisibility(View.GONE); + bool.setVisibility(View.GONE); + categoryBox.setVisibility(View.GONE); + break; } } @@ -919,7 +929,11 @@ private void importExportDialog() { public void onItemClick(AdapterView av, View arg1, int which, long arg3) { switch (which) { case 0: - showImportDialog(); + if(ep.getBoolean("TraitsExported",false)) { + showImportDialog(); + } else { + checkTraitExportDialog(); + } break; case 1: showExportDialog(); @@ -941,6 +955,38 @@ public void onClick(View arg0) { importExport.show(); } + private void checkTraitExportDialog() { + String[] allTraits = MainActivity.dt.getTraitColumnData("trait"); + + if (allTraits == null) { + makeToast(getString(R.string.createtraitserror)); + return; + } + + AlertDialog.Builder builder = new AlertDialog.Builder(TraitEditorActivity.this, R.style.AppAlertDialog); + builder.setMessage(getString(R.string.trait_export_check)); + + builder.setPositiveButton(getString(R.string.yes), new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + showExportDialog(); + dialog.dismiss(); + } + + }); + + builder.setNegativeButton(getString(R.string.no), new DialogInterface.OnClickListener() { + + public void onClick(DialogInterface dialog, int which) { + showImportDialog(); + dialog.dismiss(); + } + + }); + + AlertDialog alert = builder.create(); + alert.show(); + } + private void sortDialog() { String[] allTraits = MainActivity.dt.getTraitColumnData("trait"); @@ -1088,6 +1134,9 @@ public void onClick(View v) { public void onClick(View arg0) { exportTable(exportFile.getText().toString()); + Editor ed = ep.edit(); + ed.putBoolean("TraitsExported", true); + ed.apply(); exportDialog.dismiss(); } }); diff --git a/app/src/main/res/drawable-hdpi/ic_audio.png b/app/src/main/res/drawable-hdpi/ic_audio.png new file mode 100644 index 0000000000000000000000000000000000000000..2d484923199fcf2d25be974872750e43f509a99a GIT binary patch literal 651 zcmV;60(AX}P)EfJ28IER4u+qZ0jvpQz*QyvvXLQ=*{6n&mpF3q=9M?)o1LXs8T+1d4 zG-CvsN)~9t2(+FoP}2xhPZr1tVGI;(y9{KoKMZ8B-wf1iK))EsU`+-xSc8FjtseSc zfLf*MNyXnV0_`aIXX2V$TcV>2ioaq6T2}He3BMf;=&R`Hmg1i_0!=FUw}t;pG@y5) zqeqHAX9OBn@}CR;+h{=drCSYEOMy5awCv9!G7$~vqV$lnO2k6d7w0=oV)bI86+0hw zovnzjUTcvNAEX^z(=sPT>|6AOUyv5;X)R`<>dccaoq`e&HnRZW^xbxb{)=sBrFLF8_*$^r!-PiCGgTA@P@row7oL}t5 z$zSvo81FGg50`ZUcQEUz1-gRcYMg%myc?m7Pne_6SjJ}CAI9-+7G_sN6dtlws704` zgjQKC6wFUNq3lF7Nachb2xH>~jwM@F_v0oVnrqnA?#*vVNZ0}bE+D7Bkc l24WxvVxWTx#A306^cNV9mLgn8`GNod002ovPDHLkV1fnJEU*9o literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_camera.png b/app/src/main/res/drawable-hdpi/ic_camera.png new file mode 100644 index 0000000000000000000000000000000000000000..1841b6216449fa5a232c9b26dc3b049e568bb1cb GIT binary patch literal 725 zcmV;`0xJE9P)_z014`{mS5hcQx9zH6OmtDRktn54;KoM~vgkso58($? zErmWowFGTYuzsXX&s~_DiJ9EF=AOAh=N!13{JryY=A1ca<^s-~IqO85N7caRZQ;B# z!l~jP-rB%HunATF3EyRu8lp3(&S6=rk6fGd)l> zCU-#AfG)6x4AMwZ>L%!!#thbR84u7g3V7J`ElDheta%Xtt8%(6Ewd%QA3zu63%7s9n4@|uwRXUP2WjB@3R@z;b0x4Wc71t%E9i|eh zzkqqnl%M3PeVLkxx(!hYZ9Y33rynPh4O+3GTg*3HVjWQIs9ob{=@vHA@Hbslv+}eF zF4J?2WtLf4jikw+GH&wU;IExy(6kXw&JZV(gJMw$@0-?d6g!a~rOVVSC!4+{MTveA z>RpjtHe6D3nxjh9OZn!}bA*b-M&LH+?uYI&(0Qj_dhWymw511{iv=jF2lB9Q9p`JS zPYeFXmp#ik13?wYqs?ub0!==Yw`j2v?u)uJXU?2CyKD9zqVoh3a8ia!00000NkvXX Hu0mjf)tpYj literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_delete_forever.png b/app/src/main/res/drawable-hdpi/ic_delete_forever.png new file mode 100644 index 0000000000000000000000000000000000000000..03dd5d778da99210e5340969c1196cfa8ee40907 GIT binary patch literal 312 zcmV-80muG{P)5Czb+_Xrj=^c=wxP%9OB25lLRz>%2Y1l)rIK!YX)4uNEZWm$#Uzm);=#t9n? zfJCyz1aP)gum*L97G9QW)fFa+gv*^%PpMq6A7C-03o8EeCibjN{H;73mZH`x6-=!>V(Py;dI!Y&^#rjigZupsa&CKat z6xq|*=UfzFpAES&McUMvaYwf14#N1$7}t#PX=Lp))*Xa(Z)Dx|ncru7`dg5oump!) zQP>5CouHmg)#_WwJZEE%CC8>4RFk1<`62KC{-kr6ukMscHj_7ji)1@W(3)BR0000< KMNUMnLSTX$EQd@0 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_save.png b/app/src/main/res/drawable-hdpi/ic_save.png new file mode 100644 index 0000000000000000000000000000000000000000..b17d252d763b9518308045e1c02638700accc552 GIT binary patch literal 401 zcmV;C0dD?@P)5QPgfZ(F7SCAqerNy2=ik`qrl@^iW))5i34D=j|xM~duQfSBg=}cZ+ zyq9%;K1e2im;j2RD2gdL#(2a#)(wr@dYluyHb!ZHltN{(U%HSf>3>Q(1Kg%Eim#c+}X_6An`@vd101ak<`y!v= zG|*Sy7)~+dFtEbKkMCy?#HmJ@ z;V@Ly1ajI!$Dx`ZGI(QE5dch>5EVxl*vQFlLcpkmMd}HLRHU|?JTQqO^2R9!0djLR z55qc?wDXqX8pCy94n`JR1&jxZKpevhoXwW!3^CLw>bQW(@;rv&=NPgHq%abJEJGOF r@G$DOtuc#jnt@RZMt}vQfEEA%V*;1aX8U-000000NkvXXu0mjfWYxcW literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_camera.png b/app/src/main/res/drawable-mdpi/ic_camera.png new file mode 100644 index 0000000000000000000000000000000000000000..0f2934ac60f05762bf6feb23cb3fac5cb96b627e GIT binary patch literal 466 zcmV;@0WJQCP)Ithi(E&xS{aC0zAnEGm=m5i23et((bM@`$fKfDsiR#xX;Dl28HThtk&es-wX`xdg*0WB7G_5> zwedalH2`L-zIY9_0(z^x{61nwe7_#huc;TOC$?Y5I{t5b0!|Mfs2Del!8i~9| zEll8+XOb`-rZ;zTl=;}aWb<#JqA~)DBq^+dULHVxOdKVGuGm966!A#mmIAtC_lzvc zVyu+UDgs0}xmY_4e14Io5ze!D9ds7R}<2W#YM8eJ- z6>9X3wXq+6aUSkOR1?Qr6SW6mMLb(=<4pJhql7;&LNEX$!2x;!2!L-1Ai%!@4Kl#06cfkW%weN>n zF}G>2eyeCO{=_~iTD9*}^3X|ZiYL9HG{JV*~cC|H6hBL2b(3SRUeC|a~0JSbi~cu;aFh|>Cl zil7%;v|g>K_2Q)>S`VRBD@JMJkEBiG6e)Ig-X=TEPG$n{`=A8o&CL63cW2(bU4X@6 zu~;k?ixsw(;~e@iimb2^@v8&T$_YM-d&nX0u^f8PSP9`DL|O@c#?okWJ^Xgx;AiZV z+gCpyzz(>3@23L+q|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A`oN&uU}L#od30m>a-mC74Zsl&f2e1JlSSHChqkHfzxd;sSbHmMBo zLfFni2S^P#3IEu%uos*-fY-VK5*K44;=t$-+Is9@J&g|D|(*COg9m$-9Ho>!2+Ot~le4?iw_#o^B zvcssyRnV;JDk&RWC1tNf_+m-ftgj|sL#E5WhE|yPW53$fKIe$`Av{(Y^XMU)%9U>( z3um`5br1Di_k*nl&tB3f-|wM}bDDCV3HnqL=aju!`FcqQ*c0~D<9=D~7#{9!2Sh02 z@o@L>TWC}czd7Kmg2#5iG444LK3>9w9$&-vyL3 ztR{GcP>xyW(1|K4QnKiNN9b=6<@;TfamJF+yE*7K00!WHf8lA7HNd<-z%XloXEHC; z$JmA+lY3d8?~9j%a;a7trdWpmQXJsBTyl*yx{+h8XUvF`nREL3Nf5JV6`%s;?A|ImstR!NVj@hNVOBIDwM|RLluvaRP^Ih!a%Q zW1N7`-kOyICq{db2wXbqfd_{zuAOcy?Dr6~{n#hz+Ma|DQuFmncoiLiDEh=s6QGVUZ!a1Dq|a1V$`&;W=;&;f`*&;qa~=mA&~ zGy$v#x&T`O2q1s}0vrQeF9HZ4fB*srAbS+}nlFbq-m1Y@lL|H$U~oeQjV0-B*~Uuy)+51c$f$z!1p z&@rlhs}E2&s@~8CC>vF;=mQjtsuv017W#J=ao4DNPanWHx{)n4juNfVwc9#pp{30G zVRDI2t>g44)HprS{6N!}29LLYul(m z?zcr*75UYR^hUx8;P%7U-SuS-_)rCynggCy0Upc&SJ) z(f*5^WUwW8jyKXq{(bBAf3Afmyvs3`{=qqwOScM!VHk#C7$z{^LW4x9@+KRX00000 LNkvXXu0mjfW6R%g literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_audio.png b/app/src/main/res/drawable-xxhdpi/ic_audio.png new file mode 100644 index 0000000000000000000000000000000000000000..6cc28798539b6c49cad1b77778d8fff0ffefefd1 GIT binary patch literal 1286 zcmV+h1^N1kP)yzyrZZgNbNR5|yga0yTjcBCA+zf|_C!O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UDUzDEPOeqeAt%x_)nzR~%TwdZ-G=kFYsp4*K}&)2Q|zCxA3 zaSzY6`Ej4(g^LzN9z%j-1% zD%ULb6?w#J_0VlsQLjyh>9n8l)BP1JB%eh~D23#$n0M!+2rVJtc|v-Q6$RwoMSDr{ z>?gf@BJpvkEKZT(IUT~zA{7Ue@APW}!%2{J>=6Xyr9pZEz^PILg6WXXEFysN^Zeab zc=iw!`?3J!#RD8Nq}253u)`!1QbvICo&Oi=Uh*Fl)}RyDh&yyPfby}3QCv`M%T6?+ zP64S=KO5C=ed@12hwyC*>;Oe21dsp{KmterxdbR)8%-{k4k!~VKo(n-%4W9(^l7XB zS?p||jMawQNt^V-P;3CD?b1^X1CEi6h8 zR~HDh4L6Ixkp$^g)7r5rl~r;d;TI59yxMMhy1t~kfsTBoU$q`_bin9uI}a&>+l zi5P4Y5h5ZYA|jfhom3-^T`a6OImy?E<78ivAS)8u6jlVZsjSs$)#R@|$58b*1`HT5V8DO@1GWIHkwVPiC}T%8F~J(y+A%K!G$XkkwH>6X zfn8WKKx=j@J+k^~3Sfm}^ewHM zb*|70Gk3q7+p=Gpo8_KpRQ$&JX;WBgX2rILmN`#V6T@}PO`F0}b?4ze<;Js=-7EUi zx~_7{@9uqQnFmYZvSo!bOyfN?4^dHkd4e%uARjRltIEmfj7!R^FlORjs_ z;$DsAaW6EJ-5N-CGsl1XEstyaE#VE*gtxd8ekhUfVY>R_-s zEUXL$E5pK`maN2B%h12KI|u~*6Tv^V{PAg^)~Wu=dQW_ lR8`t{+XxX65fKrM?Hf?ilZyD&E?)ou002ovPDHLkV1gNi-%kJl literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_save.png b/app/src/main/res/drawable-xxhdpi/ic_save.png new file mode 100644 index 0000000000000000000000000000000000000000..a024316d7d86e9c089b4855f65000d0584a9fe0a GIT binary patch literal 788 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q1xWh(YZ)^zFx~caaSW-r_4e*rFX=#u_K)@E zyZCoyZ{3x#b%#Jxkl=dfKesrQN`f`KV!x`1yopo&$`;ggfjdxSiC)j@Itfu{tAJga zDrrW~ea=-ruRN!=yYlD6nI}~yyC}iIr<*&y^kL7y@rtF4$< zEOnR7TKBf>dFhj{zpou+4*mM-WUhb3AFsj-4%?&NSN)dG65)Lj^)y8I%!)Xb1=)N3 zY!5GCU*yo37i?Gk&-8VTJGV&2-shHP-3%dTO-^=}E;z2|_hxRti|=iR_L=D`Z?Mfe zZF9OQbwM!uW}C}9V;97#Uw(6&HLA$y?5fxWnd+CPyk(j?$HzEDJmbJglV%1{u@h(Y z%+5IO+Q9xY)$jA%>+>dO+TCWgDlS@CnD{fPbYAz>bFVc%>m1+KIBV7klao`vnxBbU zl{)K5wBWrh_g_@@l^^{PvUuUldCMwR?_N|>5OF=_mE^q_%RJ<5uba;PbhG$zV%LKF zxQq{c%S0CU1yu=%nk%-s)+I+5Ep6#NtqYedo8y*!4X0oi>#r!KnDC4y3h0_}U|GZc! zUFh~?Lzm?OX3N}={XQT6Tqw58J1TNvkFVdQ&MBb@03i!t AjsO4v literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_audio.png b/app/src/main/res/drawable-xxxhdpi/ic_audio.png new file mode 100644 index 0000000000000000000000000000000000000000..5702f3dd6d6663108350d3229b6a67a6269e3786 GIT binary patch literal 1768 zcmZWqX*e5*7EPk5EtxR2Q(H)drh;hG&=UJnq^-S1k(mlcQG2UFsePF~v5abKYtWFX zie-p4C~6sM8nhH4mWmp?38h|N=GXh?$36GE=bU@K`|qX`9Ic^Z3Ss~N0BUPvaphZQ z{jWrheMA0eWflN%{5M+*ymQRN>Z3bpE|yBYujng*wp9A^zWTV`ojH}n#4Bc#LK
    ngWZCI1M#PN&A%6Ogzl2L1R@-UZXX?cv0x8d4q|C=6G^-gu_((Vt7dSgKnF( z!H}T~4Sx^*y5{e*QSU!gvbHoGeq)gdFcVQrmiQMSFG?3B+{SQJi$fjr5j$1KcXUs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HNfR7LUmzbwnV*g|Wr8n6VJ7tap8wu`nM3TsfoXlbg5FtMZjC0@bmAyH{Jb_kTC zf~{Y?n^BHCa;5r21u*ZZUHwbFUSysAa&Vu1FofJFuzt7M@7W`ln)tkN;7@JLFdGq4 z+>reWH2d*2SJ z&0$2+`iGsx(?yKrw`P{i2O#f?68)Y${+Ekc-AgD#J@5Q~6y|CRKkG1xbkphr?vf5Ryo0n_D zJgdOzA)$ft5z`5)Q6&uENh=-ubIWaWXMyv|u->)Y8(057*&&8eSTS!YmF1mTnH_1{E~?PO7lTPb@yEwV3Lf^Cb z$s$b{NkPxwTuqgC#oGc^haks+|ABl4!oo>mY*5s{Y{q0&DiWZncpW*OdH~habG3zvp0T7BcyJXLxt8d1dV{YCGKNo4A2HEpGf0iCOKIV+M@&)j%FxtsN;%Rd=qCl?q<**Qy7kbt0Ipk!edJBLC80~0pl zgj&Gzdk@yBEl@arX@#4~;f?_AfFD)++g=dQIQhu{< z(^hm!T%7uaJ1fMcS87W`a=;(A=MM@i#ky~Qu(9!5-<)J-$KQWj`{i+$$_knL-Ae^B z^9p3|pFOX7$#>$8dHl1Sm&|o6vRk}D_0lI11NF6vmp+RaX3Be;v@f5qT*}bpa|J_^ z`06_G#|mdN=W)B{neK>8-PO!#yeuYrW>M;;dB^QOH&zsA*i`x1v2Cnqe5(KQx}(m5 zB+j^BdnLLpBH8BH$schl`qwq#`AW9>G)7n`c`>~5{rKfuLsYQCTH6Ku!4B-z4$;95 z(bW#wmNOq(^4>p|@II~KThbQ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxxhdpi/ic_save.png b/app/src/main/res/drawable-xxxhdpi/ic_save.png new file mode 100644 index 0000000000000000000000000000000000000000..3be556e786f9fcda060f0acb5d727d3f42d3b879 GIT binary patch literal 1095 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvE1xWt5x}=AJfrZc0#WAGf*4w-O-XVc9$37nC zIcsm+_=7FyQtHg47uo`MqieMcocH{7thpqGs+m{b%}WE*Vzq zXKFsr@6Fu#d|vhWzjo){jvUQDm%gL;-CpCxE*y$20!|pjb=BpHXETG{wO-jgt)02; z==%#zb<68+276stz&W>S>yMR68P~=6#qCX5`b!?X{j|Jc!QIbK{Vg09A7`H*BH)vf z^i$aT!o#QM)LmJ)C8Pea2tBd2e(NQBFyPrV`$U%FnJgXx2h-dbg`5kfL^iYth#2!s z;AmPPICO{tXo%{+j8{JmHfKRYib$Zd}~*`8eFvN_$;G()`r%)%f_Z{ zvo?4xzQw9=O3XBG+SWNH*1y9q%Q5Aw+`Pzh_ZD7En9ol zhT*DCy~s@V1(%xrb5(?|AFERM#FntSEBXKb^{lrUrtJRsrl;i9yBlUp=P~rS+kLlY zIA!@dx2xveoNo*qw*|E)_cIE7n-slx>dD!qJPtGbqGs1hH5k0zXjZMykeIjqhIcO? z1IMdLS6_w$sSQ_Ox-)QO?Z5hx9Y`H~_2n%C%hsc>zN`gO=U#pJ3QTv391L+SH`|yF zbVfKaPFw4@pR3_^cVRmN%lD02Z~opPBfBj4&V<5R?@cF9J-IW9=Wd|(Wc%mKYHqxn zm7aa&DSek87@T(S1k&HWOekIZ9?k?HspD)ak#^8D-84aK>ucORO2zOOmc zmSx9{Df@IkGkaHVes5oFw0b(j^yw>)JI#|ff8Ba`{o4;>4;CGt6}CRhE9U)s@<4IjeVa>?yvK^Kd1GWrP&W09 a|Hsg+E)3T-G@yGywn~bJUpt literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout-sw600dp/main.xml b/app/src/main/res/layout-sw600dp/main.xml index edfa91e57..9dacbbba4 100644 --- a/app/src/main/res/layout-sw600dp/main.xml +++ b/app/src/main/res/layout-sw600dp/main.xml @@ -236,6 +236,7 @@ android:gravity="right" android:paddingRight="10dp" android:text="@string/range" + android:maxLength="10" android:textColor="@color/s_text" android:textSize="@dimen/text_size_xlarge" android:textStyle="bold" /> @@ -259,6 +260,7 @@ android:layout_height="wrap_content" android:gravity="center" android:padding="0dp" + android:maxLength="10" android:singleLine="true" android:text="" android:textColor="#000000" @@ -440,6 +442,11 @@ layout="@layout/trait_multicat" android:layout_width="fill_parent" android:layout_height="wrap_content" /> + + diff --git a/app/src/main/res/layout-sw600dp/trait_audio.xml b/app/src/main/res/layout-sw600dp/trait_audio.xml index 4aaf09fb0..baefddd6b 100644 --- a/app/src/main/res/layout-sw600dp/trait_audio.xml +++ b/app/src/main/res/layout-sw600dp/trait_audio.xml @@ -6,28 +6,31 @@ android:orientation="vertical" android:visibility="gone"> -