diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2018-04-25 13:34:54 +0200 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2018-04-25 13:34:54 +0200 |
commit | 4de306375a33b2abd067e65658a46d45cba5e56e (patch) | |
tree | 00a734df4dcd1d94d0916eee6a6cc1cd98aafa7d /app/src/main/res/layout | |
parent | 3812f6ccf9d5796f25f81aeea942c25b58296d01 (diff) |
Added Firebase authentication
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_login.xml | 98 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_new_observation.xml | 192 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_reset_password.xml | 92 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_signup.xml | 103 |
4 files changed, 396 insertions, 89 deletions
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml new file mode 100644 index 0000000..160803c --- /dev/null +++ b/app/src/main/res/layout/activity_login.xml @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.design.widget.CoordinatorLayout 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" + android:fitsSystemWindows="true" + tools:context="org.marcinzelent.liberavem.LoginActivity"> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@color/colorPrimary" + android:gravity="center" + android:orientation="vertical" + android:padding="@dimen/activity_horizontal_margin"> + + + <ImageView + android:layout_width="@dimen/logo_w_h" + android:layout_height="@dimen/logo_w_h" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="30dp" + android:src="@mipmap/ic_launcher" /> + + <android.support.design.widget.TextInputLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/email" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="10dp" + android:hint="@string/hint_email" + android:inputType="textEmailAddress" + android:textColor="@android:color/white" + android:textColorHint="@android:color/white" /> + </android.support.design.widget.TextInputLayout> + + <android.support.design.widget.TextInputLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/password" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="10dp" + android:hint="@string/hint_password" + android:inputType="textPassword" + android:textColor="@android:color/white" + android:textColorHint="@android:color/white" /> + </android.support.design.widget.TextInputLayout> + + <!-- Login Button --> + + <Button + android:id="@+id/btn_login" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + android:background="@color/colorAccent" + android:text="@string/btn_login" + android:textColor="@android:color/black" /> + + <Button + android:id="@+id/btn_reset_password" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + android:background="@null" + android:text="@string/btn_forgot_password" + android:textAllCaps="false" + android:textColor="@color/colorAccent" /> + + <!-- Link to Login Screen --> + + <Button + android:id="@+id/btn_signup" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + android:background="@null" + android:text="@string/btn_link_to_register" + android:textAllCaps="false" + android:textColor="@color/white" + android:textSize="15dp" /> + </LinearLayout> + + <ProgressBar + android:id="@+id/progressBar" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_gravity="center|bottom" + android:layout_marginBottom="20dp" + android:visibility="gone" /> +</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_new_observation.xml b/app/src/main/res/layout/activity_new_observation.xml index 0f3b10f..76e80f8 100644 --- a/app/src/main/res/layout/activity_new_observation.xml +++ b/app/src/main/res/layout/activity_new_observation.xml @@ -6,106 +6,120 @@ android:layout_height="match_parent" tools:context=".NewObservationActivity"> - <Spinner - android:id="@+id/new_birds" + <ScrollView 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" /> + app:layout_constraintBottom_toTopOf="@+id/linearLayout" + app:layout_constraintTop_toTopOf="parent"> - <EditText - android:id="@+id/new_population" - 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/population" - android:inputType="textPersonName" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/new_birds" /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> - <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" /> + <Spinner + android:id="@+id/new_birds" + android:layout_width="match_parent" + android:layout_height="wrap_content" + 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_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_population" + android:layout_width="match_parent" + 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/population" + android:inputType="textPersonName" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/new_birds" /> - <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_place" + android:layout_width="match_parent" + 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_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" /> + <EditText + android:id="@+id/new_latitude" + android:layout_width="match_parent" + 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_longitude" + android:layout_width="match_parent" + 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_comment" + android:layout_width="match_parent" + android:layout_height="200dp" + 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> + </ScrollView> <LinearLayout android:id="@+id/linearLayout" style="?android:attr/buttonBarStyle" - android:layout_width="0dp" + android:layout_width="360dp" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginEnd="8dp" diff --git a/app/src/main/res/layout/activity_reset_password.xml b/app/src/main/res/layout/activity_reset_password.xml new file mode 100644 index 0000000..d4cbff0 --- /dev/null +++ b/app/src/main/res/layout/activity_reset_password.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.design.widget.CoordinatorLayout 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" + android:layout_gravity="center" + android:background="@color/colorPrimary" + android:fitsSystemWindows="true" + tools:context="org.marcinzelent.liberavem.LoginActivity"> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="30dp" + android:gravity="center" + android:orientation="vertical" + android:padding="@dimen/activity_horizontal_margin"> + + + <ImageView + android:layout_width="@dimen/logo_w_h" + android:layout_height="@dimen/logo_w_h" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="10dp" + android:src="@mipmap/ic_launcher" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:padding="10dp" + android:text="@string/lbl_forgot_password" + android:textColor="@android:color/white" + android:textSize="20dp" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="10dp" + android:gravity="center_horizontal" + android:padding="@dimen/activity_horizontal_margin" + android:text="@string/forgot_password_msg" + android:textColor="@android:color/white" + android:textSize="14dp" /> + + <android.support.design.widget.TextInputLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/email" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="10dp" + android:layout_marginTop="20dp" + android:hint="@string/hint_email" + android:inputType="textEmailAddress" + android:textColor="@android:color/white" + android:textColorHint="@android:color/white" /> + </android.support.design.widget.TextInputLayout> + + <!-- Login Button --> + + <Button + android:id="@+id/btn_reset_password" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + android:background="@color/colorAccent" + android:text="@string/btn_reset_password" + android:textColor="@android:color/black" /> + + <Button + android:id="@+id/btn_back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:background="@null" + android:text="@string/btn_back" + android:textColor="@color/colorAccent" /> + + </LinearLayout> + + <ProgressBar + android:id="@+id/progressBar" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_gravity="center|bottom" + android:layout_marginBottom="20dp" + android:visibility="gone" /> +</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_signup.xml b/app/src/main/res/layout/activity_signup.xml new file mode 100644 index 0000000..2d4d966 --- /dev/null +++ b/app/src/main/res/layout/activity_signup.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.design.widget.CoordinatorLayout 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" + android:fitsSystemWindows="true" + tools:context="org.marcinzelent.liberavem.LoginActivity"> + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@color/colorPrimaryDark" + android:gravity="center" + android:orientation="vertical" + android:padding="@dimen/activity_horizontal_margin"> + + + <ImageView + android:layout_width="@dimen/logo_w_h" + android:layout_height="@dimen/logo_w_h" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="30dp" + android:src="@mipmap/ic_launcher" /> + + <android.support.design.widget.TextInputLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/email" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/email" + android:inputType="textEmailAddress" + android:maxLines="1" + android:singleLine="true" + android:textColor="@android:color/white" /> + + </android.support.design.widget.TextInputLayout> + + <android.support.design.widget.TextInputLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <EditText + android:id="@+id/password" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:focusableInTouchMode="true" + android:hint="@string/hint_password" + android:imeActionId="@+id/login" + android:imeOptions="actionUnspecified" + android:inputType="textPassword" + android:maxLines="1" + android:singleLine="true" + android:textColor="@android:color/white" /> + + </android.support.design.widget.TextInputLayout> + + <Button + android:id="@+id/sign_up_button" + style="?android:textAppearanceSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:background="@color/colorAccent" + android:text="@string/action_sign_in_short" + android:textColor="@android:color/black" + android:textStyle="bold" /> + + <Button + android:id="@+id/btn_reset_password" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + android:background="@null" + android:text="@string/btn_forgot_password" + android:textAllCaps="false" + android:textColor="@color/colorAccent" /> + + <!-- Link to Login Screen --> + + <Button + android:id="@+id/sign_in_button" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dip" + android:background="@null" + android:text="@string/btn_link_to_login" + android:textAllCaps="false" + android:textColor="@color/white" + android:textSize="15dp" /> + </LinearLayout> + + <ProgressBar + android:id="@+id/progressBar" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_gravity="center|bottom" + android:layout_marginBottom="20dp" + android:visibility="gone" /> +</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file |