aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/fragment_sensor.xml
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res/layout/fragment_sensor.xml')
-rw-r--r--app/src/main/res/layout/fragment_sensor.xml41
1 files changed, 35 insertions, 6 deletions
diff --git a/app/src/main/res/layout/fragment_sensor.xml b/app/src/main/res/layout/fragment_sensor.xml
index 4d911ca..47aa61f 100644
--- a/app/src/main/res/layout/fragment_sensor.xml
+++ b/app/src/main/res/layout/fragment_sensor.xml
@@ -6,18 +6,47 @@
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
- tools:context="io.trygvis.soilmoisture.SensorActivity$PlaceholderFragment">
+ tools:context="io.trygvis.soilmoisture.SensorActivity.SensorFragment">
- <TextView
- android:text="@string/hello_world"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
+ <GridLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentStart="true"
+ android:layout_above="@+id/button_refresh">
+
+ <TextView
+ android:text="@string/value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ <TextView
+ android:text="@string/warning_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_row="1"
+ android:layout_column="0"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/current_value"
+ android:layout_row="0"
+ android:layout_column="1"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/warning_value"
+ android:layout_row="1"
+ android:layout_column="1"/>
+ </GridLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/refresh"
- android:id="@+id/button"
+ android:id="@+id/button_refresh"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"/>