Skip to content

Commit

Permalink
Merge pull request #6 from Open-Source-Project-Team/master
Browse files Browse the repository at this point in the history
Android: Sign In UI implemented
  • Loading branch information
samiurprapon authored Jul 15, 2021
2 parents 1a4fa4a + feadd9c commit 95e40f9
Show file tree
Hide file tree
Showing 9 changed files with 361 additions and 8 deletions.
8 changes: 1 addition & 7 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ AndroidManifest.xml Created by Samiur Prapon
~ Last modified 6/1/21 11:38 AM
~ Copyright (c) 2021. All rights reserved.
~
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="life.nsu.aether">

Expand All @@ -18,6 +11,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.Aether">

<activity android:name=".views.LoginActivity" />
<activity android:name=".views.RegistrationActivity" />

<activity
Expand Down
23 changes: 23 additions & 0 deletions android/app/src/main/java/life/nsu/aether/views/LoginActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* LoginActivity Created by Samiur Prapon
* Last modified 7/15/21, 7:39 AM
* Copyright (c) 2021. All rights reserved.
*
*/

package life.nsu.aether.views;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import life.nsu.aether.R;

public class LoginActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}
}
7 changes: 7 additions & 0 deletions android/app/src/main/res/drawable/ic_logo_title_sub_title.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
~ ic_logo_title_sub_title.xml Created by Samiur Prapon
~ Last modified 7/15/21, 7:28 AM
~ Copyright (c) 2021. All rights reserved.
~
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="168dp"
android:height="97dp"
Expand Down
159 changes: 159 additions & 0 deletions android/app/src/main/res/drawable/ic_symbolic_eye.xml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions android/app/src/main/res/font/montserrat.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ montserrat.xml Created by Samiur Prapon
~ Last modified 7/15/21, 7:28 AM
~ Copyright (c) 2021. All rights reserved.
~
-->

<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
Expand Down
7 changes: 7 additions & 0 deletions android/app/src/main/res/font/montserrat_bold.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ montserrat_bold.xml Created by Samiur Prapon
~ Last modified 7/15/21, 7:28 AM
~ Copyright (c) 2021. All rights reserved.
~
-->

<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
Expand Down
155 changes: 155 additions & 0 deletions android/app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ activity_login.xml Created by Samiur Prapon
~ Last modified 7/15/21, 7:39 AM
~ Copyright (c) 2021. All rights reserved.
~
-->

<ScrollView 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=".views.LoginActivity">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginEnd="16dp"
android:src="@drawable/ic_symbolic_eye"
app:layout_constraintBottom_toBottomOf="@+id/appCompatImageView2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/appCompatImageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:src="@drawable/ic_logo_title_sub_title"
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.35000002" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_email"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="24dp"
android:labelFor="@id/et_email"
app:boxStrokeErrorColor="@color/red_800"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appCompatImageView2"
app:layout_constraintWidth_percent=".80"
app:startIconDrawable="@drawable/outline_email_24">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat"
android:hint="@string/title_email_address"
android:importantForAutofill="no"
android:inputType="textEmailAddress"
android:maxLines="1"
android:textColor="#2F281E"
android:textSize="16sp" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_password"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="14dp"
android:labelFor="@id/et_password"
app:layout_constraintEnd_toEndOf="@+id/til_email"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/til_email"
app:layout_constraintTop_toBottomOf="@+id/til_email"
app:passwordToggleDrawable="@drawable/toggle_password"
app:passwordToggleEnabled="true"
app:startIconDrawable="@drawable/outline_password_24">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/et_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat"
android:hint="@string/title_password"
android:importantForAutofill="no"
android:inputType="textPassword"
android:maxLines="1"
android:textColor="#2F281E"
android:textSize="16sp" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.button.MaterialButton
android:id="@+id/mb_sign_in"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:alpha="0.6"
android:text="@string/forget_password"
android:textColor="#2F281E"
app:layout_constraintStart_toStartOf="@+id/til_password"
app:layout_constraintTop_toBottomOf="@+id/til_password" />

<com.google.android.material.button.MaterialButton
android:id="@+id/mb_sign_ip"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:background="@color/main_color"
android:fontFamily="@font/montserrat_bold"
android:text="@string/sign_in"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="18sp"
app:layout_constraintEnd_toEndOf="@+id/til_password"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/til_password"
app:layout_constraintTop_toBottomOf="@+id/mb_sign_in" />

<com.google.android.material.button.MaterialButton
android:id="@+id/mb_register"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="32dp"
android:fontFamily="@font/montserrat_bold"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/title_create_an_account"
android:textAllCaps="false"
android:textColor="@color/main_color"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/til_password"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/til_password"
app:layout_constraintTop_toBottomOf="@+id/mb_sign_ip" />

</androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>
2 changes: 1 addition & 1 deletion android/app/src/main/res/layout/activity_registration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
android:id="@+id/mb_sign_up"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="0dp"
android:layout_height="49dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:background="@color/main_color"
android:fontFamily="@font/montserrat_bold"
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
<string name="title_register">Register</string>
<string name="title_existing_member">Already a member?</string>
<string name="sign_in">Sign in</string>
<string name="forget_password">Forget Password?</string>

</resources>

0 comments on commit 95e40f9

Please sign in to comment.