aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_new_observation.xml137
-rw-r--r--app/src/main/res/layout/activity_observation_details.xml14
-rw-r--r--app/src/main/res/layout/birds_list_item.xml26
-rw-r--r--app/src/main/res/layout/observations_list.xml14
-rw-r--r--app/src/main/res/values/strings.xml25
5 files changed, 186 insertions, 30 deletions
diff --git a/app/src/main/res/layout/activity_new_observation.xml b/app/src/main/res/layout/activity_new_observation.xml
index 1160131..0f3b10f 100644
--- a/app/src/main/res/layout/activity_new_observation.xml
+++ b/app/src/main/res/layout/activity_new_observation.xml
@@ -6,14 +6,139 @@
android:layout_height="match_parent"
tools:context=".NewObservationActivity">
- <Button
- android:id="@+id/button"
- android:layout_width="wrap_content"
+ <Spinner
+ android:id="@+id/new_birds"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="16dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <EditText
+ android:id="@+id/new_population"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_marginLeft="8dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
- android:text="Button"
+ android:ems="10"
+ android:hint="@string/population"
+ android:inputType="textPersonName"
+ app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toBottomOf="@+id/new_birds" />
+
+ <EditText
+ android:id="@+id/new_place"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:ems="10"
+ android:hint="@string/place"
+ android:inputType="textPersonName"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/new_population" />
+
+ <EditText
+ android:id="@+id/new_longitude"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:ems="10"
+ android:hint="@string/longitude"
+ android:inputType="textPersonName"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/new_place" />
+
+ <EditText
+ android:id="@+id/new_latitude"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:ems="10"
+ android:hint="@string/latitude"
+ android:inputType="textPersonName"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/new_longitude" />
+
+ <EditText
+ android:id="@+id/new_comment"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginStart="8dp"
+ android:layout_marginTop="8dp"
+ android:ems="10"
+ android:gravity="top"
+ android:hint="@string/comment"
+ android:inputType="textMultiLine"
+ app:layout_constraintBottom_toTopOf="@+id/linearLayout"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/new_latitude" />
+
+ <LinearLayout
+ android:id="@+id/linearLayout"
+ style="?android:attr/buttonBarStyle"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginStart="8dp"
+ android:orientation="horizontal"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.0"
+ app:layout_constraintStart_toStartOf="parent">
+
+ <Button
+ android:id="@+id/new_cancel"
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginEnd="8dp"
+ android:layout_marginStart="8dp"
+ android:layout_weight="1"
+ android:text="@string/cancel" />
+
+ <Button
+ android:id="@+id/new_add"
+ style="?android:attr/buttonBarButtonStyle"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginEnd="8dp"
+ android:layout_marginRight="8dp"
+ android:layout_weight="1"
+ android:text="@string/add"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent" />
+ </LinearLayout>
+
</android.support.constraint.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_observation_details.xml b/app/src/main/res/layout/activity_observation_details.xml
index 4372b9a..7d0fd80 100644
--- a/app/src/main/res/layout/activity_observation_details.xml
+++ b/app/src/main/res/layout/activity_observation_details.xml
@@ -61,7 +61,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:minLines="1"
- android:text="@string/created"
+ android:text="@string/created2"
android:textStyle="bold" />
<TextView
@@ -85,7 +85,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="none"
- android:text="@string/author"
+ android:text="@string/author2"
android:textStyle="bold" />
<TextView
@@ -109,7 +109,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:text="@string/population"
+ android:text="@string/population2"
android:textStyle="bold" />
<TextView
@@ -132,7 +132,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:text="@string/place"
+ android:text="@string/place2"
android:textStyle="bold" />
<TextView
@@ -155,7 +155,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:text="@string/longitude"
+ android:text="@string/longitude2"
android:textStyle="bold" />
<TextView
@@ -178,7 +178,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:text="@string/latitude"
+ android:text="@string/latitude2"
android:textStyle="bold" />
<TextView
@@ -201,7 +201,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:text="@string/comment"
+ android:text="@string/comment2"
android:textStyle="bold" />
<TextView
diff --git a/app/src/main/res/layout/birds_list_item.xml b/app/src/main/res/layout/birds_list_item.xml
new file mode 100644
index 0000000..7f928ab
--- /dev/null
+++ b/app/src/main/res/layout/birds_list_item.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="8dp">
+
+ <ImageView
+ android:id="@+id/bli_photo"
+ app:srcCompat="@drawable/ic_launcher_background"
+ android:layout_width="40dp"
+ android:layout_height="40dp" />
+
+ <TextView
+ android:id="@+id/bli_name"
+ android:textSize="20sp"
+ android:layout_marginTop="6dp"
+ android:maxLines="1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@+id/bli_photo"
+ android:layout_toEndOf="@+id/bli_photo"
+ android:layout_marginLeft="12dp"
+ android:layout_marginStart="12dp" />
+</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/observations_list.xml b/app/src/main/res/layout/observations_list.xml
index 8be21a1..9e04484 100644
--- a/app/src/main/res/layout/observations_list.xml
+++ b/app/src/main/res/layout/observations_list.xml
@@ -1,16 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout
+<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/swiperefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
+
<ListView
android:id="@+id/observations_list_view"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-</android.support.constraint.ConstraintLayout> \ No newline at end of file
+ android:layout_height="match_parent"/>
+
+</android.support.v4.widget.SwipeRefreshLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 54fe20a..4885413 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -85,15 +85,22 @@
<string name="pref_title_vibrate">Vibrate</string>
<!-- TODO: Remove or change this placeholder text -->
- <string name="hello_blank_fragment">Hello blank fragment</string>
<string name="my_observations">My observations</string>
<string name="all_observations">All observations</string>
- <string name="created">Created:</string>
- <string name="author">Author:</string>
- <string name="population">Population:</string>
- <string name="place">Place:</string>
- <string name="latitude">Latitude:</string>
- <string name="longitude">Longitude:</string>
- <string name="comment">Comment:</string>
- <string name="title_activity_new_observation">NewObservationActivity</string>
+ <string name="created2">Created:</string>
+ <string name="author2">Author:</string>
+ <string name="population2">Population:</string>
+ <string name="place2">Place:</string>
+ <string name="longitude2">Longitude:</string>
+ <string name="latitude2">Latitude:</string>
+ <string name="comment2">Comment:</string>
+ <string name="title_activity_new_observation">New observation</string>
+ <string name="population">Population</string>
+ <string name="place">Place</string>
+ <string name="longitude">Longitude</string>
+ <string name="latitude">Latitude</string>
+ <string name="comment">Comment</string>
+ <string name="cancel">Cancel</string>
+ <string name="add">Add</string>
+ <string name="observation_details">Observation details</string>
</resources>