aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_observation_details.xml216
-rw-r--r--app/src/main/res/layout/observations_list_item.xml41
-rw-r--r--app/src/main/res/values/attrs_square_image_view.xml8
-rw-r--r--app/src/main/res/values/strings.xml7
4 files changed, 272 insertions, 0 deletions
diff --git a/app/src/main/res/layout/activity_observation_details.xml b/app/src/main/res/layout/activity_observation_details.xml
new file mode 100644
index 0000000..938fe91
--- /dev/null
+++ b/app/src/main/res/layout/activity_observation_details.xml
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".ObservationDetailsActivity">
+
+ <ScrollView
+ android:id="@+id/scrollView2"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.0"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.0">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <org.marcinzelent.liberavem.SquareImageView
+ android:id="@+id/details_photo"
+ android:layout_width="match_parent"
+ android:layout_height="fill_parent"
+ app:srcCompat="@drawable/ic_launcher_background" />
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_name"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:minLines="1"
+ android:textAppearance="@style/TextAppearance.AppCompat.Large"
+ android:textStyle="bold" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_created_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:minLines="1"
+ android:text="@string/created"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/details_created"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1"
+ android:minLines="1" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_user_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/author"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/details_user"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_population_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/population"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/details_population"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_placename_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/place"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/details_placename"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_longitude_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/longitude"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/details_longitude"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_latitude_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/latitude"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/details_latitude"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="16dp"
+ android:layout_marginStart="16dp"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/details_comment_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/comment"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/details_comment"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+ </LinearLayout>
+ </ScrollView>
+
+</android.support.constraint.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/observations_list_item.xml b/app/src/main/res/layout/observations_list_item.xml
new file mode 100644
index 0000000..3aea796
--- /dev/null
+++ b/app/src/main/res/layout/observations_list_item.xml
@@ -0,0 +1,41 @@
+<?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/oli_photo"
+ app:srcCompat="@drawable/ic_launcher_background"
+ android:layout_width="60dp"
+ android:layout_height="60dp" />
+
+ <TextView
+ android:id="@+id/oli_name"
+ android:text="Bird name"
+ android:textSize="20sp"
+ android:layout_marginTop="8dp"
+ android:maxLines="1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_toRightOf="@+id/oli_photo"
+ android:layout_toEndOf="@+id/oli_photo"
+ android:layout_marginLeft="12dp"
+ android:layout_marginStart="12dp" />
+
+ <TextView
+ android:id="@+id/oli_date"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignLeft="@+id/oli_name"
+ android:layout_alignStart="@+id/oli_name"
+ android:layout_below="@+id/oli_name"
+ android:maxLines="1"
+ android:text="Date"
+ android:textSize="14sp" />
+
+
+
+</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/attrs_square_image_view.xml b/app/src/main/res/values/attrs_square_image_view.xml
new file mode 100644
index 0000000..13e655a
--- /dev/null
+++ b/app/src/main/res/values/attrs_square_image_view.xml
@@ -0,0 +1,8 @@
+<resources>
+ <declare-styleable name="SquareImageView">
+ <attr name="exampleString" format="string" />
+ <attr name="exampleDimension" format="dimension" />
+ <attr name="exampleColor" format="color" />
+ <attr name="exampleDrawable" format="color|reference" />
+ </declare-styleable>
+</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1f045bd..1561e86 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -88,4 +88,11 @@
<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>
</resources>