diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2014-12-31 16:31:49 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2014-12-31 16:31:49 +0100 |
commit | ed559834ccddafa955df5b528f08fba964e57699 (patch) | |
tree | 3fcbcedaf49232de5c8fe8b6f67bd2fd8c52afa9 /app/src/main/res/layout | |
download | io.trygvis.soilmoisture-android-ed559834ccddafa955df5b528f08fba964e57699.tar.gz io.trygvis.soilmoisture-android-ed559834ccddafa955df5b528f08fba964e57699.tar.bz2 io.trygvis.soilmoisture-android-ed559834ccddafa955df5b528f08fba964e57699.tar.xz io.trygvis.soilmoisture-android-ed559834ccddafa955df5b528f08fba964e57699.zip |
o Initial import of Soil Moisture app.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/actionbar_indeterminate_progress.xml | 23 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_main.xml | 7 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_soil.xml | 60 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_gauge.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/listitem_device.xml | 110 |
5 files changed, 224 insertions, 0 deletions
diff --git a/app/src/main/res/layout/actionbar_indeterminate_progress.xml b/app/src/main/res/layout/actionbar_indeterminate_progress.xml new file mode 100644 index 0000000..c68bc3c --- /dev/null +++ b/app/src/main/res/layout/actionbar_indeterminate_progress.xml @@ -0,0 +1,23 @@ +<!-- + Copyright 2013 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="wrap_content" + android:layout_width="56dp" + android:minWidth="56dp"> + <ProgressBar android:layout_width="32dp" + android:layout_height="32dp" + android:layout_gravity="center"/> +</FrameLayout> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..ead92a8 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,7 @@ +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/container" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity" + tools:ignore="MergeRootFrame"/> diff --git a/app/src/main/res/layout/activity_soil.xml b/app/src/main/res/layout/activity_soil.xml new file mode 100644 index 0000000..c2784b9 --- /dev/null +++ b/app/src/main/res/layout/activity_soil.xml @@ -0,0 +1,60 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + android:paddingBottom="@dimen/activity_vertical_margin" + tools:context="io.trygvis.soilmoisture.SoilActivity"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge" + android:text="Large Text" + android:id="@+id/name" + android:layout_alignParentStart="true" + /> + + <ProgressBar + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:id="@+id/currentValueHorizontal" + android:layout_alignBottom="@+id/textView" + android:layout_toEndOf="@+id/space"/> + + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/currentValueSpinner" + android:layout_above="@+id/button_refresh" + android:layout_centerHorizontal="true"/> + + <Button + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="Refresh" + android:id="@+id/button_refresh" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/current_value" + android:id="@+id/textView" + android:layout_below="@+id/name" + android:layout_alignParentStart="true"/> + + <Space + android:layout_width="20px" + android:layout_height="20px" + android:layout_alignTop="@+id/currentValueHorizontal" + android:layout_toEndOf="@+id/textView" + android:id="@+id/space" + android:layout_alignBottom="@+id/textView"/> + +</RelativeLayout> diff --git a/app/src/main/res/layout/fragment_gauge.xml b/app/src/main/res/layout/fragment_gauge.xml new file mode 100644 index 0000000..ff1df86 --- /dev/null +++ b/app/src/main/res/layout/fragment_gauge.xml @@ -0,0 +1,24 @@ +<?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/listitem_device.xml b/app/src/main/res/layout/listitem_device.xml new file mode 100644 index 0000000..2d6ef91 --- /dev/null +++ b/app/src/main/res/layout/listitem_device.xml @@ -0,0 +1,110 @@ +<?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"/> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/spacer" + android:layout_alignParentTop="true" + android:layout_alignParentEnd="true"> + + <Button + android:layout_width="wrap_content" + android:layout_height="fill_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" + /> + + </LinearLayout> + + <!-- + <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"/> + + <Space + android:id="@+id/spacer" + android:layout_width="2dp" + android:layout_height="fill_parent" + android:layout_toStartOf="@id/button_connect"/> + + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/connect" + android:id="@+id/button_connect" + android:layout_alignParentTop="true" + android:layout_toStartOf="@+id/device_spinner" + /> + + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/device_spinner" + android:layout_alignParentTop="true" + android:layout_alignParentEnd="true" + /> + --> + +</RelativeLayout> |