diff --git a/app/src/main/java/io/pslab/activity/MultimeterActivity.java b/app/src/main/java/io/pslab/activity/MultimeterActivity.java
index d3cf79c61..6eeabcd32 100644
--- a/app/src/main/java/io/pslab/activity/MultimeterActivity.java
+++ b/app/src/main/java/io/pslab/activity/MultimeterActivity.java
@@ -2,11 +2,14 @@
import android.Manifest;
import android.app.AlertDialog;
+import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.Typeface;
+import android.location.Location;
+import android.location.LocationManager;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
@@ -32,14 +35,21 @@
import android.widget.TextView;
import java.text.DecimalFormat;
+import java.util.Timer;
+import java.util.TimerTask;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.pslab.R;
import io.pslab.communication.ScienceLab;
+import io.pslab.fragment.MultimeterSettingsFragment;
import io.pslab.others.CSVLogger;
import io.pslab.others.CustomSnackBar;
+import io.pslab.others.GPSLogger;
import io.pslab.others.MathUtils;
+
+import android.support.v7.preference.PreferenceManager;
+
import io.pslab.others.ScienceLabCommon;
import io.pslab.others.SwipeGestureDetector;
import it.beppi.knoblibrary.Knob;
@@ -64,10 +74,6 @@ public class MultimeterActivity extends AppCompatActivity {
TextView unit;
@BindView(R.id.knobs)
Knob knob;
- @BindView(R.id.reset)
- Button reset;
- @BindView(R.id.read)
- Button read;
@BindView(R.id.selector)
SwitchCompat aSwitch;
@BindView(R.id.multimeter_coordinator_layout)
@@ -95,13 +101,18 @@ public class MultimeterActivity extends AppCompatActivity {
private ScienceLab scienceLab;
private int knobState;
private String dataRecorded;
- private String valueRecorded;
private String defaultValue;
private Menu menu;
private Boolean switchIsChecked;
private String[] knobMarker;
private boolean isRecordingStarted = false;
private boolean isDataRecorded = false;
+ private Timer recordTimer;
+ private boolean locationEnabled = true;
+ private long recordPeriod;
+ private double lat = 0, lon = 0;
+ private String multimeterCSVheader = "Data,Value,Latitude,Longitude\n";
+ private GPSLogger gpsLogger;
@Override
protected void onCreate(final Bundle savedInstanceState) {
@@ -114,7 +125,10 @@ protected void onCreate(final Bundle savedInstanceState) {
setSupportActionBar(mToolbar);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
+ checkConfig();
+ logTimer();
+ gpsLogger = new GPSLogger(this, (LocationManager) getSystemService(Context.LOCATION_SERVICE));
setUpBottomSheet();
tvShadow.setOnClickListener(new View.OnClickListener() {
@Override
@@ -126,8 +140,7 @@ public void onClick(View v) {
});
multimeter_data = this.getSharedPreferences(NAME, MODE_PRIVATE);
- dataRecorded = "Data";
- valueRecorded = "Value";
+ dataRecorded = multimeterCSVheader;
knobState = multimeter_data.getInt("KnobState", 2);
switchIsChecked = multimeter_data.getBoolean("SwitchState", false);
aSwitch.setChecked(switchIsChecked);
@@ -157,141 +170,161 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
editor.apply();
}
});
- reset.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- multimeter_data.edit().clear().apply();
- switchIsChecked = false;
- aSwitch.setChecked(false);
- knobState = 2;
- knob.setState(knobState);
- quantity.setText(defaultValue);
- unit.setText("");
- }
- });
- read.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- switch (knobState) {
- case 3:
- if (scienceLab.isConnected()) {
- v.setEnabled(false);
- DecimalFormat resistanceFormat = new DecimalFormat("#.##");
- Double resistance;
- Double avgResistance = 0.0;
- int loops = 20;
- for (int i = 0; i < loops; i++) {
- resistance = scienceLab.getResistance();
- if (resistance == null) {
- avgResistance = null;
- break;
- } else {
- avgResistance = avgResistance + resistance / loops;
- }
- }
- String resistanceUnit;
- String recordUnit = "";
- String Resistance = "";
- if (avgResistance == null) {
- Resistance = "Infinity";
- resistanceUnit = "\u2126";
- recordUnit = "Ohms";
- } else {
- if (avgResistance > 10e5) {
- Resistance = resistanceFormat.format((avgResistance / 10e5));
- resistanceUnit = "M" + "\u2126";
- recordUnit = "MOhms";
- } else if (avgResistance > 10e2) {
- Resistance = resistanceFormat.format((avgResistance / 10e2));
- resistanceUnit = "k" + "\u2126";
- recordUnit = "kOhms";
- } else if (avgResistance > 1) {
- Resistance = resistanceFormat.format(avgResistance);
- resistanceUnit = "\u2126";
- recordUnit = "Ohms";
- } else {
- Resistance = "Cannot measure!";
- resistanceUnit = "";
- }
- }
- saveAndSetData(Resistance, resistanceUnit);
- if (recordData)
- record("Resistance", Resistance + recordUnit);
- v.setEnabled(true);
- }
- break;
- case 4:
- if (scienceLab.isConnected()) {
- v.setEnabled(false);
- Double capacitance = scienceLab.getCapacitance();
- DecimalFormat capacitanceFormat = new DecimalFormat("#.##");
- String Capacitance;
- String capacitanceUnit;
- if (capacitance == null) {
- Capacitance = "Cannot measure!";
- capacitanceUnit = "";
- } else {
- if (capacitance < 1e-9) {
- Capacitance = capacitanceFormat.format((capacitance / 1e-12));
- capacitanceUnit = "pF";
- } else if (capacitance < 1e-6) {
- Capacitance = capacitanceFormat.format((capacitance / 1e-9));
- capacitanceUnit = "nF";
- } else if (capacitance < 1e-3) {
- Capacitance = capacitanceFormat.format((capacitance / 1e-6));
- capacitanceUnit = "\u00B5" + "F";
- } else if (capacitance < 1e-1) {
- Capacitance = capacitanceFormat.format((capacitance / 1e-3));
- capacitanceUnit = "mF";
- } else {
- Capacitance = capacitanceFormat.format(capacitance);
- capacitanceUnit = getString(R.string.capacitance_unit);
- }
- }
- saveAndSetData(Capacitance, capacitanceUnit);
- if (recordData)
- record("Capacitance", Capacitance + capacitanceUnit);
- v.setEnabled(true);
+
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ checkConfig();
+ }
+
+ private void logData() {
+ switch (knobState) {
+ case 3: // Resistor
+ if (scienceLab.isConnected()) {
+ DecimalFormat resistanceFormat = new DecimalFormat("#.##");
+ Double resistance;
+ Double avgResistance = 0.0;
+ int loops = 20;
+ for (int i = 0; i < loops; i++) {
+ resistance = scienceLab.getResistance();
+ if (resistance == null) {
+ avgResistance = null;
+ break;
+ } else {
+ avgResistance = avgResistance + resistance / loops;
}
- break;
- case 5:
- case 6:
- case 7:
- case 8:
- if (!switchIsChecked) {
- if (scienceLab.isConnected()) {
- v.setEnabled(false);
- Double frequency = scienceLab.getFrequency(knobMarker[knobState], null);
- saveAndSetData(DataFormatter.formatDouble(frequency, DataFormatter.LOW_PRECISION_FORMAT), getString(R.string.frequency_unit));
- if (recordData)
- record(knobMarker[knobState], DataFormatter.formatDouble(frequency, DataFormatter.LOW_PRECISION_FORMAT) + getString(R.string.frequency_unit));
- v.setEnabled(true);
- }
+ }
+ String resistanceUnit;
+ String recordUnit = "";
+ String Resistance = "";
+ if (avgResistance == null) {
+ Resistance = "Infinity";
+ resistanceUnit = "\u2126";
+ recordUnit = "Ohms";
+ } else {
+ if (avgResistance > 10e5) {
+ Resistance = resistanceFormat.format((avgResistance / 10e5));
+ resistanceUnit = "M" + "\u2126";
+ recordUnit = "MOhms";
+ } else if (avgResistance > 10e2) {
+ Resistance = resistanceFormat.format((avgResistance / 10e2));
+ resistanceUnit = "k" + "\u2126";
+ recordUnit = "kOhms";
+ } else if (avgResistance > 1) {
+ Resistance = resistanceFormat.format(avgResistance);
+ resistanceUnit = "\u2126";
+ recordUnit = "Ohms";
} else {
- if (scienceLab.isConnected()) {
- v.setEnabled(false);
- scienceLab.countPulses(knobMarker[knobState]);
- double pulseCount = scienceLab.readPulseCount();
- saveAndSetData(DataFormatter.formatDouble(pulseCount, DataFormatter.LOW_PRECISION_FORMAT), "");
- if (recordData)
- record(knobMarker[knobState], String.valueOf(pulseCount));
- v.setEnabled(true);
- }
+ Resistance = "Cannot measure!";
+ resistanceUnit = "";
}
- break;
- default:
- if (scienceLab.isConnected()) {
- v.setEnabled(false);
- saveAndSetData(DataFormatter.formatDouble(scienceLab.getVoltage(knobMarker[knobState], 1), DataFormatter.LOW_PRECISION_FORMAT), getString(R.string.multimeter_voltage_unit));
- if (recordData)
- record(knobMarker[knobState], DataFormatter.formatDouble(scienceLab.getVoltage(knobMarker[knobState], 1), DataFormatter.LOW_PRECISION_FORMAT) + getString(R.string.multimeter_voltage_unit));
- v.setEnabled(true);
+ }
+ saveAndSetData(Resistance, resistanceUnit);
+ if (recordData)
+ record("Resistance", Resistance + " " + recordUnit);
+ }
+ break;
+ case 4: //Capacitor
+ if (scienceLab.isConnected()) {
+ Double capacitance = scienceLab.getCapacitance();
+ DecimalFormat capacitanceFormat = new DecimalFormat("#.##");
+ String Capacitance;
+ String capacitanceUnit;
+ if (capacitance == null) {
+ Capacitance = "Cannot measure!";
+ capacitanceUnit = "";
+ } else {
+ if (capacitance < 1e-9) {
+ Capacitance = capacitanceFormat.format((capacitance / 1e-12));
+ capacitanceUnit = "pF";
+ } else if (capacitance < 1e-6) {
+ Capacitance = capacitanceFormat.format((capacitance / 1e-9));
+ capacitanceUnit = "nF";
+ } else if (capacitance < 1e-3) {
+ Capacitance = capacitanceFormat.format((capacitance / 1e-6));
+ capacitanceUnit = "\u00B5" + "F";
+ } else if (capacitance < 1e-1) {
+ Capacitance = capacitanceFormat.format((capacitance / 1e-3));
+ capacitanceUnit = "mF";
+ } else {
+ Capacitance = capacitanceFormat.format(capacitance);
+ capacitanceUnit = getString(R.string.capacitance_unit);
}
- break;
+ }
+ saveAndSetData(Capacitance, capacitanceUnit);
+ if (recordData)
+ record("Capacitance", Capacitance + " " + capacitanceUnit);
}
+ break;
+ case 5:
+ getIDdata();
+ break;
+ case 6:
+ getIDdata();
+ break;
+ case 7:
+ getIDdata();
+ break;
+ case 8:
+ getIDdata();
+ break;
+ default:
+ if (scienceLab.isConnected()) {
+ saveAndSetData(DataFormatter.formatDouble(scienceLab.getVoltage(knobMarker[knobState], 1), DataFormatter.LOW_PRECISION_FORMAT), getString(R.string.multimeter_voltage_unit));
+ if (recordData)
+ record(knobMarker[knobState], DataFormatter.formatDouble(scienceLab.getVoltage(knobMarker[knobState], 1), DataFormatter.LOW_PRECISION_FORMAT) + " " + getString(R.string.multimeter_voltage_unit));
+ }
+ break;
+ }
+ }
+
+ private void logTimer() {
+ if (recordTimer == null) {
+ recordTimer = new Timer();
+ }
+ recordTimer.schedule(new TimerTask() {
+ @Override
+ public void run() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ logData();
+ }
+ });
}
- });
+ }, 0, recordPeriod);
+ }
+
+ private void getIDdata() {
+ try {
+ if (!switchIsChecked) {
+ if (scienceLab.isConnected()) {
+ Double frequency = scienceLab.getFrequency(knobMarker[knobState], null);
+ saveAndSetData(DataFormatter.formatDouble(frequency, DataFormatter.LOW_PRECISION_FORMAT), getString(R.string.frequency_unit));
+ if (recordData)
+ record(knobMarker[knobState], DataFormatter.formatDouble(frequency, DataFormatter.LOW_PRECISION_FORMAT) + getString(R.string.frequency_unit));
+ }
+ } else {
+ if (scienceLab.isConnected()) {
+ scienceLab.countPulses(knobMarker[knobState]);
+ double pulseCount = scienceLab.readPulseCount();
+ saveAndSetData(DataFormatter.formatDouble(pulseCount, DataFormatter.LOW_PRECISION_FORMAT), "");
+ if (recordData)
+ record(knobMarker[knobState], String.valueOf(pulseCount));
+ }
+ }
+ } catch (Exception e) {
+ saveAndSetData("Cannot measure!", "");
+ record(knobMarker[knobState], "null");
+ }
+ }
+ private void checkConfig() {
+ SharedPreferences multimeterConfigs = PreferenceManager.getDefaultSharedPreferences(this);
+ recordPeriod = Long.valueOf(multimeterConfigs.getString(MultimeterSettingsFragment.KEY_UPDATE_PERIOD, getResources().getString(R.string.multimeter_default_1000)));
+ locationEnabled = multimeterConfigs.getBoolean(MultimeterSettingsFragment.KEY_INCLUDE_LOCATION, true);
}
private void setUpBottomSheet() {
@@ -373,8 +406,14 @@ private void saveAndSetData(String Quantity, String Unit) {
}
private void record(String data, String value) {
- dataRecorded = dataRecorded + "," + data;
- valueRecorded = valueRecorded + "," + value;
+ if (locationEnabled && gpsLogger.isGPSEnabled()) {
+ Location location = gpsLogger.getDeviceLocation();
+ lat = location.getLatitude();
+ lon = location.getLongitude();
+ } else {
+ lat = lon = 0;
+ }
+ dataRecorded += data + "," + value + "," + lat + "," + lon + "\n";
}
private void saveKnobState(int state) {
@@ -409,9 +448,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
if (isDataRecorded) {
MenuItem item1 = menu.findItem(R.id.record_pause_data);
item1.setIcon(R.drawable.ic_record_white);
- multimeterLogger.writeCSVFile(dataRecorded + "\n" + valueRecorded + "\n");
- dataRecorded = "Data";
- valueRecorded = "Value";
+ multimeterLogger.writeCSVFile(dataRecorded);
+ dataRecorded = multimeterCSVheader;
// Export Data
CustomSnackBar.showSnackBar(coordinatorLayout,
getString(R.string.csv_store_text) + " " + multimeterLogger.getCurrentFilePath()
@@ -445,7 +483,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
multimeterLogger.prepareLogFile();
isRecordingStarted = true;
recordData = true;
- CustomSnackBar.showSnackBar(coordinatorLayout, getString(R.string.data_recording_start), null, null, Snackbar.LENGTH_SHORT);
+ CustomSnackBar.showSnackBar(coordinatorLayout, getString(R.string.data_recording_start), null, null, Snackbar.LENGTH_SHORT);
}
}
} else {
@@ -489,6 +527,10 @@ public void onClick(DialogInterface dialogInterface, int i) {
@Override
protected void onDestroy() {
super.onDestroy();
+ if (recordTimer != null) {
+ recordTimer.cancel();
+ recordTimer = null;
+ }
if (isRecordingStarted) {
if (multimeterLogger != null)
multimeterLogger.deleteFile();
diff --git a/app/src/main/java/io/pslab/activity/SettingsActivity.java b/app/src/main/java/io/pslab/activity/SettingsActivity.java
index a65d34be3..5e030e389 100644
--- a/app/src/main/java/io/pslab/activity/SettingsActivity.java
+++ b/app/src/main/java/io/pslab/activity/SettingsActivity.java
@@ -21,6 +21,7 @@
import io.pslab.fragment.BaroMeterSettingsFragment;
import io.pslab.fragment.GyroscopeSettingsFragment;
import io.pslab.fragment.LuxMeterSettingFragment;
+import io.pslab.fragment.MultimeterSettingsFragment;
import io.pslab.fragment.SettingsFragment;
import io.pslab.fragment.ThermometerSettingsFragment;
import io.pslab.models.PSLabSensor;
@@ -72,6 +73,9 @@ protected void onCreate(Bundle savedInstanceState) {
case PSLabSensor.THERMOMETER_CONFIGURATIONS:
fragment = new ThermometerSettingsFragment();
break;
+ case "Multimeter Configurations":
+ fragment = new MultimeterSettingsFragment();
+ break;
default:
fragment = new SettingsFragment();
break;
diff --git a/app/src/main/java/io/pslab/fragment/MultimeterSettingsFragment.java b/app/src/main/java/io/pslab/fragment/MultimeterSettingsFragment.java
new file mode 100644
index 000000000..9691e89a7
--- /dev/null
+++ b/app/src/main/java/io/pslab/fragment/MultimeterSettingsFragment.java
@@ -0,0 +1,86 @@
+package io.pslab.fragment;
+
+import android.annotation.SuppressLint;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.support.v7.preference.CheckBoxPreference;
+import android.support.v7.preference.EditTextPreference;
+import android.support.v7.preference.PreferenceFragmentCompat;
+import android.support.v7.preference.PreferenceManager;
+import android.widget.Toast;
+
+import io.pslab.R;
+import io.pslab.others.PSLabPermission;
+
+public class MultimeterSettingsFragment extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener {
+
+ public static final String KEY_INCLUDE_LOCATION = "include_location_sensor_data";
+ public static final String KEY_UPDATE_PERIOD = "setting_multimeter_update_period";
+
+ private PSLabPermission psLabPermission;
+
+ private EditTextPreference updatePeriodPref;
+ private CheckBoxPreference locationPreference;
+ private SharedPreferences sharedPref;
+
+ @Override
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
+ setPreferencesFromResource(R.xml.multimeter_settings, rootKey);
+ updatePeriodPref = (EditTextPreference) getPreferenceScreen().findPreference(KEY_UPDATE_PERIOD);
+ locationPreference = (CheckBoxPreference) getPreferenceScreen().findPreference(KEY_INCLUDE_LOCATION);
+ sharedPref = PreferenceManager.getDefaultSharedPreferences(getActivity());
+
+ psLabPermission = PSLabPermission.getInstance();
+ if (!psLabPermission.checkPermissions(getActivity(), PSLabPermission.MAP_PERMISSION)) {
+ SharedPreferences.Editor editor = sharedPref.edit();
+ editor.putBoolean(MultimeterSettingsFragment.KEY_INCLUDE_LOCATION, true);
+ editor.apply();
+ }
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ locationPreference.setChecked(sharedPref.getBoolean(KEY_INCLUDE_LOCATION, true));
+ updatePeriodPref.setSummary(updatePeriodPref.getText() + " ms");
+ getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
+ }
+
+ @SuppressLint("ApplySharedPref")
+ @Override
+ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {
+ switch (s) {
+ case KEY_INCLUDE_LOCATION:
+ if (locationPreference.isChecked()) {
+ psLabPermission.checkPermissions(
+ getActivity(), PSLabPermission.MAP_PERMISSION);
+ }
+ break;
+ case KEY_UPDATE_PERIOD:
+ try {
+ Integer updatePeriod = Integer.parseInt(updatePeriodPref.getText());
+ if (updatePeriod > 2000 || updatePeriod < 100) {
+ throw new NumberFormatException();
+ } else {
+ updatePeriodPref.setSummary(String.valueOf(updatePeriod) + " ms");
+ }
+ } catch (NumberFormatException e) {
+ Toast.makeText(getActivity(), getActivity().getResources().getString(R.string.update_period_msg), Toast.LENGTH_SHORT).show();
+ updatePeriodPref.setSummary("1000 ms");
+ updatePeriodPref.setText("1000");
+ SharedPreferences.Editor editor = sharedPref.edit();
+ editor.putString(s, "1000");
+ editor.commit();
+ }
+ break;
+ default:
+ break;
+ }
+ }
+}
diff --git a/app/src/main/res/layout-hdpi/activity_multimeter.xml b/app/src/main/res/layout-hdpi/activity_multimeter.xml
index 6511aa533..f799934b7 100644
--- a/app/src/main/res/layout-hdpi/activity_multimeter.xml
+++ b/app/src/main/res/layout-hdpi/activity_multimeter.xml
@@ -23,20 +23,20 @@
@@ -84,9 +84,9 @@
@@ -95,11 +95,11 @@
android:id="@+id/upper_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
- android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
- android:layout_marginRight="@dimen/multimeter_layout_margin_2"
android:layout_marginStart="@dimen/multimeter_layout_margin_2"
+ android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
android:layout_marginTop="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginRight="@dimen/multimeter_layout_margin_2"
android:background="@drawable/rectangle_border"
app:layout_constraintBottom_toBottomOf="@+id/upper_line"
app:layout_constraintEnd_toEndOf="parent"
@@ -111,14 +111,14 @@
android:id="@+id/upper_box_title"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_weight="1"
android:gravity="center"
- android:paddingBottom="@dimen/multimeter_button_text_padding"
android:paddingTop="@dimen/multimeter_button_text_padding"
+ android:paddingBottom="@dimen/multimeter_button_text_padding"
android:text="@string/voltage_channels"
android:textColor="@color/colorPrimary"
android:textSize="14sp"
@@ -140,11 +140,11 @@
android:id="@+id/lower_line"
android:layout_width="match_parent"
android:layout_height="@dimen/multimeter_line_width"
- android:layout_marginBottom="16dp"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_constraint_2"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="@+id/id4"
app:layout_constraintEnd_toEndOf="parent"
@@ -154,11 +154,11 @@
android:id="@+id/lower_left_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="@dimen/multimeter_constraint_1"
- android:layout_marginEnd="@dimen/multimeter_left_box_endmargin"
+ android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
+ android:layout_marginEnd="@dimen/multimeter_left_box_endmargin"
android:layout_marginRight="@dimen/multimeter_left_box_endmargin"
- android:layout_marginStart="@dimen/multimeter_layout_margin_2"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:background="@drawable/rectangle_border_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/lower_right_box"
@@ -169,11 +169,11 @@
android:id="@+id/lower_right_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="@dimen/multimeter_constraint_1"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginStart="@dimen/multimeter_end_box_rightmargin"
android:layout_marginLeft="@dimen/multimeter_end_box_rightmargin"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
android:layout_marginRight="@dimen/multimeter_layout_margin_2"
- android:layout_marginStart="@dimen/multimeter_end_box_rightmargin"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:background="@drawable/rectangle_border_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -186,12 +186,12 @@
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
android:layout_centerHorizontal="true"
- android:layout_marginBottom="@dimen/multimeter_margin_2"
- android:layout_marginEnd="@dimen/multimeter_margin_2"
- android:layout_marginLeft="@dimen/multimeter_margin_3"
- android:layout_marginRight="@dimen/multimeter_margin_2"
android:layout_marginStart="@dimen/multimeter_margin_3"
+ android:layout_marginLeft="@dimen/multimeter_margin_3"
android:layout_marginTop="@dimen/multimeter_margin_3"
+ android:layout_marginEnd="@dimen/multimeter_margin_2"
+ android:layout_marginRight="@dimen/multimeter_margin_2"
+ android:layout_marginBottom="@dimen/multimeter_margin_2"
android:layout_weight="1"
app:kCircularIndicatorRelativeRadius="0"
app:kDefaultState="2"
@@ -216,11 +216,11 @@
android:id="@+id/freq_count"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginBottom="5dp"
- android:layout_marginEnd="@dimen/multimeter_constraint_2"
+ android:layout_marginStart="@dimen/multimeter_constraint_2"
android:layout_marginLeft="@dimen/multimeter_constraint_2"
+ android:layout_marginEnd="@dimen/multimeter_constraint_2"
android:layout_marginRight="@dimen/multimeter_constraint_2"
- android:layout_marginStart="@dimen/multimeter_constraint_2"
+ android:layout_marginBottom="@dimen/multimeter_left_button_margin_bottom"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@+id/lower_left_box"
app:layout_constraintEnd_toEndOf="@+id/lower_left_box"
@@ -244,11 +244,11 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
- android:paddingBottom="@dimen/multimeter_button_text_padding"
android:paddingTop="@dimen/multimeter_button_text_padding"
+ android:paddingBottom="@dimen/multimeter_button_text_padding"
android:text="@string/count_pulse"
android:textColor="@color/black"
- android:textSize="14sp"
+ android:textSize="@dimen/multimeter_measure_textsize"
android:textStyle="bold" />
@@ -257,12 +257,12 @@
android:id="@+id/knob_marker"
android:layout_width="@dimen/multimeter_knob_width"
android:layout_height="@dimen/multimeter_knob_height"
- android:layout_marginBottom="@dimen/multimeter_margin_3"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
- android:layout_marginLeft="@dimen/multimeter_constraint_1"
- android:layout_marginRight="@dimen/multimeter_constraint_1"
android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginLeft="@dimen/multimeter_constraint_1"
android:layout_marginTop="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginRight="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_margin_3"
android:background="@drawable/knob_base"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@+id/freq_count"
@@ -412,14 +412,14 @@
android:id="@+id/measure"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:gravity="center"
android:text="@string/multimeter_measure"
- android:textSize="14sp"
+ android:textSize="@dimen/multimeter_measure_textsize"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/lower_right_box"
app:layout_constraintEnd_toEndOf="@+id/lower_right_box"
@@ -427,41 +427,13 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout-xhdpi/activity_multimeter.xml b/app/src/main/res/layout-xhdpi/activity_multimeter.xml
index 5df1048e0..d62604659 100644
--- a/app/src/main/res/layout-xhdpi/activity_multimeter.xml
+++ b/app/src/main/res/layout-xhdpi/activity_multimeter.xml
@@ -23,9 +23,9 @@
@@ -33,10 +33,10 @@
android:id="@+id/display_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_textbox_height"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
android:layout_marginRight="@dimen/multimeter_layout_margin_2"
- android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:background="@drawable/tv_border"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -46,9 +46,9 @@
android:id="@+id/quantity"
android:layout_width="wrap_content"
android:layout_height="@dimen/multimeter_length_0"
+ android:layout_marginTop="@dimen/multimeter_constraint_2"
android:layout_marginEnd="@dimen/multimeter_layout_margin"
android:layout_marginRight="@dimen/multimeter_layout_margin"
- android:layout_marginTop="@dimen/multimeter_constraint_2"
android:textSize="@dimen/multimeter_quantity_dimen"
app:layout_constraintBottom_toTopOf="@+id/view"
app:layout_constraintEnd_toEndOf="@+id/display_box"
@@ -58,10 +58,10 @@
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="@dimen/multimeter_line_width"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
android:layout_marginRight="@dimen/multimeter_layout_margin_2"
- android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:background="@android:color/darker_gray"
app:layout_constraintBottom_toTopOf="@+id/unit"
app:layout_constraintEnd_toEndOf="@+id/display_box"
@@ -71,11 +71,11 @@
android:id="@+id/unit"
android:layout_width="wrap_content"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="@dimen/multimeter_margin_2"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_margin_2"
android:textSize="@dimen/multimeter_textsize"
app:layout_constraintBottom_toBottomOf="@+id/display_box"
app:layout_constraintEnd_toEndOf="parent"
@@ -84,10 +84,10 @@
@@ -96,11 +96,11 @@
android:id="@+id/upper_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
- android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
- android:layout_marginRight="@dimen/multimeter_layout_margin_2"
android:layout_marginStart="@dimen/multimeter_layout_margin_2"
+ android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
android:layout_marginTop="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginRight="@dimen/multimeter_layout_margin_2"
android:background="@drawable/rectangle_border"
app:layout_constraintBottom_toBottomOf="@+id/upper_line"
app:layout_constraintEnd_toEndOf="parent"
@@ -112,14 +112,14 @@
android:id="@+id/upper_box_title"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_weight="1"
android:gravity="center"
- android:paddingBottom="@dimen/multimeter_button_text_padding"
android:paddingTop="@dimen/multimeter_button_text_padding"
+ android:paddingBottom="@dimen/multimeter_button_text_padding"
android:text="@string/voltage_channels"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/multimeter_bottombutton_textsize"
@@ -132,7 +132,7 @@
android:id="@+id/upper_line"
android:layout_width="match_parent"
android:layout_height="@dimen/multimeter_line_width"
- android:layout_marginTop="16dp"
+ android:layout_marginTop="@dimen/multimeter_constraint_2"
android:background="@color/black"
android:visibility="invisible"
app:layout_constraintTop_toBottomOf="@+id/ch3" />
@@ -141,11 +141,11 @@
android:id="@+id/lower_line"
android:layout_width="match_parent"
android:layout_height="@dimen/multimeter_line_width"
- android:layout_marginBottom="24dp"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_constraint_3"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="@+id/id4"
app:layout_constraintEnd_toEndOf="parent"
@@ -155,11 +155,11 @@
android:id="@+id/lower_left_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="8dp"
- android:layout_marginEnd="@dimen/multimeter_left_box_endmargin"
+ android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
+ android:layout_marginEnd="@dimen/multimeter_left_box_endmargin"
android:layout_marginRight="@dimen/multimeter_left_box_endmargin"
- android:layout_marginStart="@dimen/multimeter_layout_margin_2"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:background="@drawable/rectangle_border_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/lower_right_box"
@@ -170,11 +170,11 @@
android:id="@+id/lower_right_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="8dp"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginStart="@dimen/multimeter_end_box_rightmargin"
android:layout_marginLeft="@dimen/multimeter_end_box_rightmargin"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
android:layout_marginRight="@dimen/multimeter_layout_margin_2"
- android:layout_marginStart="@dimen/multimeter_end_box_rightmargin"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:background="@drawable/rectangle_border_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -187,12 +187,12 @@
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
android:layout_centerHorizontal="true"
- android:layout_marginBottom="@dimen/multimeter_margin_2"
- android:layout_marginEnd="@dimen/multimeter_margin_2"
- android:layout_marginLeft="@dimen/multimeter_margin_3"
- android:layout_marginRight="@dimen/multimeter_margin_2"
android:layout_marginStart="@dimen/multimeter_margin_3"
+ android:layout_marginLeft="@dimen/multimeter_margin_3"
android:layout_marginTop="@dimen/multimeter_margin_3"
+ android:layout_marginEnd="@dimen/multimeter_margin_2"
+ android:layout_marginRight="@dimen/multimeter_margin_2"
+ android:layout_marginBottom="@dimen/multimeter_margin_2"
android:layout_weight="1"
app:kCircularIndicatorRelativeRadius="0"
app:kDefaultState="2"
@@ -217,11 +217,11 @@
android:id="@+id/freq_count"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/multimeter_constraint_1"
- android:layout_marginEnd="@dimen/multimeter_constraint_2"
+ android:layout_marginStart="@dimen/multimeter_constraint_2"
android:layout_marginLeft="@dimen/multimeter_constraint_2"
+ android:layout_marginEnd="@dimen/multimeter_constraint_2"
android:layout_marginRight="@dimen/multimeter_constraint_2"
- android:layout_marginStart="@dimen/multimeter_constraint_2"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@+id/lower_left_box"
app:layout_constraintEnd_toEndOf="@+id/lower_left_box"
@@ -236,7 +236,7 @@
android:checked="false"
android:gravity="center"
android:text="@string/frequency_unit"
- android:textSize="14sp"
+ android:textSize="@dimen/multimeter_measure_textsize"
android:textStyle="bold"
android:theme="@style/SwitchCompatTheme"
android:thumbTextPadding="@dimen/multimeter_margin_2" />
@@ -246,8 +246,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
- android:paddingBottom="@dimen/multimeter_button_text_padding"
android:paddingTop="@dimen/multimeter_button_text_padding"
+ android:paddingBottom="@dimen/multimeter_button_text_padding"
android:text="@string/count_pulse"
android:textColor="@color/black"
android:textSize="@dimen/multimeter_heading_ll_text_size"
@@ -257,14 +257,14 @@
-
-
-
diff --git a/app/src/main/res/layout/activity_multimeter.xml b/app/src/main/res/layout/activity_multimeter.xml
index 245568cc2..0beec1208 100644
--- a/app/src/main/res/layout/activity_multimeter.xml
+++ b/app/src/main/res/layout/activity_multimeter.xml
@@ -24,9 +24,9 @@
@@ -34,10 +34,10 @@
android:id="@+id/display_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_textbox_height"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
android:layout_marginRight="@dimen/multimeter_layout_margin_2"
- android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:background="@drawable/tv_border"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -47,9 +47,9 @@
android:id="@+id/quantity"
android:layout_width="wrap_content"
android:layout_height="@dimen/multimeter_length_0"
+ android:layout_marginTop="@dimen/multimeter_constraint_2"
android:layout_marginEnd="@dimen/multimeter_layout_margin"
android:layout_marginRight="@dimen/multimeter_layout_margin"
- android:layout_marginTop="@dimen/multimeter_constraint_2"
android:textSize="@dimen/multimeter_quantity_dimen"
app:layout_constraintBottom_toTopOf="@+id/view"
app:layout_constraintEnd_toEndOf="@+id/display_box"
@@ -59,10 +59,10 @@
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="@dimen/multimeter_line_width"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
android:layout_marginRight="@dimen/multimeter_layout_margin_2"
- android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:background="@android:color/darker_gray"
app:layout_constraintBottom_toTopOf="@+id/unit"
app:layout_constraintEnd_toEndOf="@+id/display_box"
@@ -72,11 +72,11 @@
android:id="@+id/unit"
android:layout_width="wrap_content"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="@dimen/multimeter_margin_2"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_margin_2"
android:textSize="@dimen/multimeter_textsize"
app:layout_constraintBottom_toBottomOf="@+id/display_box"
app:layout_constraintEnd_toEndOf="parent"
@@ -85,10 +85,10 @@
@@ -97,11 +97,11 @@
android:id="@+id/upper_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
- android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
- android:layout_marginRight="@dimen/multimeter_layout_margin_2"
android:layout_marginStart="@dimen/multimeter_layout_margin_2"
+ android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
android:layout_marginTop="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginRight="@dimen/multimeter_layout_margin_2"
android:background="@drawable/rectangle_border"
app:layout_constraintBottom_toBottomOf="@+id/upper_line"
app:layout_constraintEnd_toEndOf="parent"
@@ -113,14 +113,14 @@
android:id="@+id/upper_box_title"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_weight="1"
android:gravity="center"
- android:paddingBottom="@dimen/multimeter_button_text_padding"
android:paddingTop="@dimen/multimeter_button_text_padding"
+ android:paddingBottom="@dimen/multimeter_button_text_padding"
android:text="@string/voltage_channels"
android:textColor="@color/colorPrimary"
android:textSize="@dimen/multimeter_bottombutton_textsize"
@@ -133,7 +133,7 @@
android:id="@+id/upper_line"
android:layout_width="match_parent"
android:layout_height="@dimen/multimeter_line_width"
- android:layout_marginTop="16dp"
+ android:layout_marginTop="@dimen/multimeter_constraint_2"
android:background="@color/black"
android:visibility="invisible"
app:layout_constraintTop_toBottomOf="@+id/ch3" />
@@ -142,11 +142,11 @@
android:id="@+id/lower_line"
android:layout_width="match_parent"
android:layout_height="@dimen/multimeter_line_width"
- android:layout_marginBottom="24dp"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_constraint_3"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="@+id/id4"
app:layout_constraintEnd_toEndOf="parent"
@@ -156,11 +156,11 @@
android:id="@+id/lower_left_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="8dp"
- android:layout_marginEnd="@dimen/multimeter_left_box_endmargin"
+ android:layout_marginStart="@dimen/multimeter_layout_margin_2"
android:layout_marginLeft="@dimen/multimeter_layout_margin_2"
+ android:layout_marginEnd="@dimen/multimeter_left_box_endmargin"
android:layout_marginRight="@dimen/multimeter_left_box_endmargin"
- android:layout_marginStart="@dimen/multimeter_layout_margin_2"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:background="@drawable/rectangle_border_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/lower_right_box"
@@ -171,11 +171,11 @@
android:id="@+id/lower_right_box"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
- android:layout_marginBottom="8dp"
- android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
+ android:layout_marginStart="@dimen/multimeter_end_box_rightmargin"
android:layout_marginLeft="@dimen/multimeter_end_box_rightmargin"
+ android:layout_marginEnd="@dimen/multimeter_layout_margin_2"
android:layout_marginRight="@dimen/multimeter_layout_margin_2"
- android:layout_marginStart="@dimen/multimeter_end_box_rightmargin"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:background="@drawable/rectangle_border_black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@@ -188,12 +188,12 @@
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="@dimen/multimeter_length_0"
android:layout_centerHorizontal="true"
- android:layout_marginBottom="@dimen/multimeter_margin_2"
- android:layout_marginEnd="@dimen/multimeter_margin_2"
- android:layout_marginLeft="@dimen/multimeter_margin_3"
- android:layout_marginRight="@dimen/multimeter_margin_2"
android:layout_marginStart="@dimen/multimeter_margin_3"
+ android:layout_marginLeft="@dimen/multimeter_margin_3"
android:layout_marginTop="@dimen/multimeter_margin_3"
+ android:layout_marginEnd="@dimen/multimeter_margin_2"
+ android:layout_marginRight="@dimen/multimeter_margin_2"
+ android:layout_marginBottom="@dimen/multimeter_margin_2"
android:layout_weight="1"
app:kCircularIndicatorRelativeRadius="0"
app:kDefaultState="2"
@@ -218,11 +218,11 @@
android:id="@+id/freq_count"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/multimeter_constraint_1"
- android:layout_marginEnd="@dimen/multimeter_constraint_2"
+ android:layout_marginStart="@dimen/multimeter_constraint_2"
android:layout_marginLeft="@dimen/multimeter_constraint_2"
+ android:layout_marginEnd="@dimen/multimeter_constraint_2"
android:layout_marginRight="@dimen/multimeter_constraint_2"
- android:layout_marginStart="@dimen/multimeter_constraint_2"
+ android:layout_marginBottom="@dimen/multimeter_constraint_1"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="@+id/lower_left_box"
app:layout_constraintEnd_toEndOf="@+id/lower_left_box"
@@ -237,7 +237,7 @@
android:checked="false"
android:gravity="center"
android:text="@string/frequency_unit"
- android:textSize="14sp"
+ android:textSize="@dimen/multimeter_measure_textsize"
android:textStyle="bold"
android:theme="@style/SwitchCompatTheme"
android:thumbTextPadding="@dimen/multimeter_margin_2" />
@@ -247,8 +247,8 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_horizontal"
- android:paddingBottom="@dimen/multimeter_button_text_padding"
android:paddingTop="@dimen/multimeter_button_text_padding"
+ android:paddingBottom="@dimen/multimeter_button_text_padding"
android:text="@string/count_pulse"
android:textColor="@color/black"
android:textSize="@dimen/multimeter_heading_ll_text_size"
@@ -260,12 +260,12 @@
android:id="@+id/knob_marker"
android:layout_width="208dp"
android:layout_height="206dp"
- android:layout_marginBottom="@dimen/multimeter_margin_3"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
- android:layout_marginLeft="@dimen/multimeter_constraint_1"
- android:layout_marginRight="@dimen/multimeter_constraint_1"
android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginLeft="@dimen/multimeter_constraint_1"
android:layout_marginTop="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginRight="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_margin_3"
android:background="@drawable/knob_base"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@+id/freq_count"
@@ -415,14 +415,14 @@
android:id="@+id/measure"
android:layout_width="@dimen/multimeter_length_0"
android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/multimeter_left_button_margin_bottom"
- android:layout_marginEnd="@dimen/multimeter_constraint_1"
+ android:layout_marginStart="@dimen/multimeter_constraint_1"
android:layout_marginLeft="@dimen/multimeter_constraint_1"
+ android:layout_marginEnd="@dimen/multimeter_constraint_1"
android:layout_marginRight="@dimen/multimeter_constraint_1"
- android:layout_marginStart="@dimen/multimeter_constraint_1"
+ android:layout_marginBottom="@dimen/multimeter_left_button_margin_bottom"
android:gravity="center"
android:text="@string/multimeter_measure"
- android:textSize="16sp"
+ android:textSize="@dimen/multimeter_heading_ll_text_size"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/lower_right_box"
app:layout_constraintEnd_toEndOf="@+id/lower_right_box"
@@ -430,40 +430,13 @@
-
-
-
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index eb90293cd..761aac887 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -86,7 +86,9 @@
25dp
20dp
24sp
+ 80dp
18sp
+ 14sp
4dp
16sp
110dp
@@ -102,6 +104,8 @@
50sp
8dp
16dp
+ 24dp
+ 5dp
5dp
7dp
185dp
@@ -117,6 +121,8 @@
10dp
15dp
0dp
+ 208dp
+ 206dp
10dp
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3390fb268..d92cfcdab 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -761,6 +761,11 @@
- 1
+ 1000
+ 1000 ms
+ setting_multimeter_update_period
+ Please provide time interval at which data will be updated (100 ms to 2000 ms)
+
Delete All Data
Are You Sure?
Barometer
diff --git a/app/src/main/res/xml/multimeter_settings.xml b/app/src/main/res/xml/multimeter_settings.xml
new file mode 100644
index 000000000..464fe0de1
--- /dev/null
+++ b/app/src/main/res/xml/multimeter_settings.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
\ No newline at end of file