diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-01-11 12:28:55 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-01-11 12:28:55 +0100 |
commit | 17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52 (patch) | |
tree | 20c2c99e710fd1db438a49029177552204a63591 /app/src/main/res/layout | |
parent | 4a2ca2d94c827566f8682e8dbd6fbdf17d70b4dd (diff) | |
download | io.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.tar.gz io.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.tar.bz2 io.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.tar.xz io.trygvis.soilmoisture-android-17a1f7227c8c3872fce7bbcc2f5cd46540f9ac52.zip |
o Reading values from the soil sensor.
o Rewrote the database schema to match the new device+sensors model.
o Storing samples in the database.
o To be able to reuse BT callbacks, added a way to always to directly to the next step instead of waiting for an event.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/fragment_device.xml | 40 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_gauge.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_sensor.xml | 21 | ||||
-rw-r--r-- | app/src/main/res/layout/listitem_device.xml | 67 |
4 files changed, 61 insertions, 91 deletions
diff --git a/app/src/main/res/layout/fragment_device.xml b/app/src/main/res/layout/fragment_device.xml new file mode 100644 index 0000000..e6a2f25 --- /dev/null +++ b/app/src/main/res/layout/fragment_device.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:clickable="true"> + + <TextView + android:id="@+id/device_name" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="24sp" + android:layout_alignParentTop="true" + android:layout_marginTop="0dp"/> + + <TextView + android:id="@+id/device_address" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="12sp" + android:layout_below="@+id/device_name" + android:layout_alignParentStart="true"/> + + <TextView + android:id="@+id/device_rssi" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="12sp" + android:layout_below="@+id/device_address" + android:layout_alignParentStart="true"/> + + <TextView + android:id="@+id/device_info" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="12sp" + android:layout_below="@+id/device_rssi" + android:layout_alignParentStart="true"/> + +</RelativeLayout> diff --git a/app/src/main/res/layout/fragment_gauge.xml b/app/src/main/res/layout/fragment_gauge.xml deleted file mode 100644 index ff1df86..0000000 --- a/app/src/main/res/layout/fragment_gauge.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:clickable="true" - android:focusable="true" - > - - <TextView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="Gauge: XX" - android:id="@+id/gauge_title" - android:layout_gravity="center_horizontal" - android:gravity="start"/> - - <SeekBar - style="?android:attr/progressBarStyleHorizontal" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:id="@+id/gauge_seek_bar" - android:layout_gravity="center_horizontal"/> -</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_sensor.xml b/app/src/main/res/layout/fragment_sensor.xml new file mode 100644 index 0000000..82d0d77 --- /dev/null +++ b/app/src/main/res/layout/fragment_sensor.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_height="wrap_content" + android:layout_width="wrap_content"> + + <TextView + android:id="@+id/description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_marginTop="0dp"/> + + <ProgressBar + style="?android:attr/progressBarStyleHorizontal" + android:id="@+id/sensor_progress" + android:layout_width="fill_parent" + android:layout_height="20dp" + android:layout_below="@id/description"/> + +</RelativeLayout> diff --git a/app/src/main/res/layout/listitem_device.xml b/app/src/main/res/layout/listitem_device.xml deleted file mode 100644 index 44021d9..0000000 --- a/app/src/main/res/layout/listitem_device.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_height="wrap_content" - android:layout_width="wrap_content"> - - <TextView - android:id="@+id/device_name" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="24sp" - android:layout_alignParentTop="true" - android:layout_marginTop="0dp" - android:layout_toStartOf="@+id/spacer"/> - - <TextView - android:id="@+id/device_address" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="12sp" - android:layout_below="@+id/device_name" - android:layout_alignParentStart="true" - android:layout_toStartOf="@+id/spacer"/> - - <TextView - android:id="@+id/device_rssi" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="12sp" - android:layout_below="@+id/device_address" - android:layout_alignParentStart="true" - android:layout_toStartOf="@+id/spacer"/> - - <TextView - android:id="@+id/device_info" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="12sp" - android:layout_below="@+id/device_rssi" - android:layout_alignParentStart="true" - android:layout_toStartOf="@+id/spacer"/> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:id="@+id/spacer" - android:layout_alignParentEnd="true" - android:layout_alignParentTop="true" - android:layout_centerInParent="true"> - - <Button - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:text="@string/connect" - android:id="@+id/button_connect" - /> - - <ProgressBar - style="?android:attr/progressBarStyleLarge" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:id="@+id/device_spinner" - android:visibility="gone"/> - - </LinearLayout> - -</RelativeLayout> |