Skip to content

Commit 95e40f9

Browse files
authored
Merge pull request #6 from Open-Source-Project-Team/master
Android: Sign In UI implemented
2 parents 1a4fa4a + feadd9c commit 95e40f9

File tree

9 files changed

+361
-8
lines changed

9 files changed

+361
-8
lines changed

android/app/src/main/AndroidManifest.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
3-
~ AndroidManifest.xml Created by Samiur Prapon
4-
~ Last modified 6/1/21 11:38 AM
5-
~ Copyright (c) 2021. All rights reserved.
6-
~
7-
-->
8-
92
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
103
package="life.nsu.aether">
114

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

14+
<activity android:name=".views.LoginActivity" />
2115
<activity android:name=".views.RegistrationActivity" />
2216

2317
<activity
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* LoginActivity Created by Samiur Prapon
3+
* Last modified 7/15/21, 7:39 AM
4+
* Copyright (c) 2021. All rights reserved.
5+
*
6+
*/
7+
8+
package life.nsu.aether.views;
9+
10+
import androidx.appcompat.app.AppCompatActivity;
11+
12+
import android.os.Bundle;
13+
14+
import life.nsu.aether.R;
15+
16+
public class LoginActivity extends AppCompatActivity {
17+
18+
@Override
19+
protected void onCreate(Bundle savedInstanceState) {
20+
super.onCreate(savedInstanceState);
21+
setContentView(R.layout.activity_login);
22+
}
23+
}

android/app/src/main/res/drawable/ic_logo_title_sub_title.xml

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<!--
2+
~ ic_logo_title_sub_title.xml Created by Samiur Prapon
3+
~ Last modified 7/15/21, 7:28 AM
4+
~ Copyright (c) 2021. All rights reserved.
5+
~
6+
-->
7+
18
<vector xmlns:android="http://schemas.android.com/apk/res/android"
29
android:width="168dp"
310
android:height="97dp"

android/app/src/main/res/drawable/ic_symbolic_eye.xml

+159
Large diffs are not rendered by default.

android/app/src/main/res/font/montserrat.xml

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ montserrat.xml Created by Samiur Prapon
4+
~ Last modified 7/15/21, 7:28 AM
5+
~ Copyright (c) 2021. All rights reserved.
6+
~
7+
-->
8+
29
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
310
app:fontProviderAuthority="com.google.android.gms.fonts"
411
app:fontProviderPackage="com.google.android.gms"

android/app/src/main/res/font/montserrat_bold.xml

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ montserrat_bold.xml Created by Samiur Prapon
4+
~ Last modified 7/15/21, 7:28 AM
5+
~ Copyright (c) 2021. All rights reserved.
6+
~
7+
-->
8+
29
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
310
app:fontProviderAuthority="com.google.android.gms.fonts"
411
app:fontProviderPackage="com.google.android.gms"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
2+
~ activity_login.xml Created by Samiur Prapon
3+
~ Last modified 7/15/21, 7:39 AM
4+
~ Copyright (c) 2021. All rights reserved.
5+
~
6+
-->
7+
8+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
9+
xmlns:app="http://schemas.android.com/apk/res-auto"
10+
xmlns:tools="http://schemas.android.com/tools"
11+
android:layout_width="match_parent"
12+
android:layout_height="match_parent"
13+
tools:context=".views.LoginActivity">
14+
15+
<androidx.constraintlayout.widget.ConstraintLayout
16+
android:layout_width="match_parent"
17+
android:layout_height="wrap_content">
18+
19+
<androidx.appcompat.widget.AppCompatImageView
20+
android:layout_width="wrap_content"
21+
android:layout_height="wrap_content"
22+
android:layout_marginTop="24dp"
23+
android:layout_marginEnd="16dp"
24+
android:src="@drawable/ic_symbolic_eye"
25+
app:layout_constraintBottom_toBottomOf="@+id/appCompatImageView2"
26+
app:layout_constraintEnd_toEndOf="parent"
27+
app:layout_constraintTop_toTopOf="parent"
28+
app:layout_constraintVertical_bias="0.0" />
29+
30+
<androidx.appcompat.widget.AppCompatImageView
31+
android:id="@+id/appCompatImageView2"
32+
android:layout_width="wrap_content"
33+
android:layout_height="wrap_content"
34+
android:layout_marginStart="24dp"
35+
android:src="@drawable/ic_logo_title_sub_title"
36+
app:layout_constraintBottom_toBottomOf="parent"
37+
app:layout_constraintEnd_toEndOf="parent"
38+
app:layout_constraintHorizontal_bias="0.0"
39+
app:layout_constraintStart_toStartOf="parent"
40+
app:layout_constraintTop_toTopOf="parent"
41+
app:layout_constraintVertical_bias="0.35000002" />
42+
43+
<com.google.android.material.textfield.TextInputLayout
44+
android:id="@+id/til_email"
45+
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
46+
android:layout_width="match_parent"
47+
android:layout_height="wrap_content"
48+
android:layout_gravity="center_horizontal"
49+
android:layout_marginStart="24dp"
50+
android:layout_marginTop="16dp"
51+
android:layout_marginEnd="24dp"
52+
android:labelFor="@id/et_email"
53+
app:boxStrokeErrorColor="@color/red_800"
54+
app:layout_constraintEnd_toEndOf="parent"
55+
app:layout_constraintStart_toStartOf="parent"
56+
app:layout_constraintTop_toBottomOf="@+id/appCompatImageView2"
57+
app:layout_constraintWidth_percent=".80"
58+
app:startIconDrawable="@drawable/outline_email_24">
59+
60+
<com.google.android.material.textfield.TextInputEditText
61+
android:id="@+id/et_email"
62+
android:layout_width="match_parent"
63+
android:layout_height="wrap_content"
64+
android:fontFamily="@font/montserrat"
65+
android:hint="@string/title_email_address"
66+
android:importantForAutofill="no"
67+
android:inputType="textEmailAddress"
68+
android:maxLines="1"
69+
android:textColor="#2F281E"
70+
android:textSize="16sp" />
71+
72+
</com.google.android.material.textfield.TextInputLayout>
73+
74+
<com.google.android.material.textfield.TextInputLayout
75+
android:id="@+id/til_password"
76+
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
77+
android:layout_width="0dp"
78+
android:layout_height="wrap_content"
79+
android:layout_gravity="center_horizontal"
80+
android:layout_marginTop="14dp"
81+
android:labelFor="@id/et_password"
82+
app:layout_constraintEnd_toEndOf="@+id/til_email"
83+
app:layout_constraintHorizontal_bias="0.0"
84+
app:layout_constraintStart_toStartOf="@+id/til_email"
85+
app:layout_constraintTop_toBottomOf="@+id/til_email"
86+
app:passwordToggleDrawable="@drawable/toggle_password"
87+
app:passwordToggleEnabled="true"
88+
app:startIconDrawable="@drawable/outline_password_24">
89+
90+
<com.google.android.material.textfield.TextInputEditText
91+
android:id="@+id/et_password"
92+
android:layout_width="match_parent"
93+
android:layout_height="wrap_content"
94+
android:fontFamily="@font/montserrat"
95+
android:hint="@string/title_password"
96+
android:importantForAutofill="no"
97+
android:inputType="textPassword"
98+
android:maxLines="1"
99+
android:textColor="#2F281E"
100+
android:textSize="16sp" />
101+
102+
</com.google.android.material.textfield.TextInputLayout>
103+
104+
<com.google.android.material.button.MaterialButton
105+
android:id="@+id/mb_sign_in"
106+
style="@style/Widget.MaterialComponents.Button.TextButton"
107+
android:layout_width="wrap_content"
108+
android:layout_height="wrap_content"
109+
android:layout_marginStart="4dp"
110+
android:layout_marginTop="4dp"
111+
android:alpha="0.6"
112+
android:text="@string/forget_password"
113+
android:textColor="#2F281E"
114+
app:layout_constraintStart_toStartOf="@+id/til_password"
115+
app:layout_constraintTop_toBottomOf="@+id/til_password" />
116+
117+
<com.google.android.material.button.MaterialButton
118+
android:id="@+id/mb_sign_ip"
119+
android:layout_width="0dp"
120+
android:layout_height="wrap_content"
121+
android:layout_marginTop="4dp"
122+
android:background="@color/main_color"
123+
android:fontFamily="@font/montserrat_bold"
124+
android:text="@string/sign_in"
125+
android:textAllCaps="false"
126+
android:textColor="@color/white"
127+
android:textSize="18sp"
128+
app:layout_constraintEnd_toEndOf="@+id/til_password"
129+
app:layout_constraintHorizontal_bias="1.0"
130+
app:layout_constraintStart_toStartOf="@+id/til_password"
131+
app:layout_constraintTop_toBottomOf="@+id/mb_sign_in" />
132+
133+
<com.google.android.material.button.MaterialButton
134+
android:id="@+id/mb_register"
135+
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
136+
android:layout_width="0dp"
137+
android:layout_height="wrap_content"
138+
android:layout_marginTop="16dp"
139+
android:layout_marginBottom="32dp"
140+
android:fontFamily="@font/montserrat_bold"
141+
android:paddingTop="8dp"
142+
android:paddingBottom="8dp"
143+
android:text="@string/title_create_an_account"
144+
android:textAllCaps="false"
145+
android:textColor="@color/main_color"
146+
android:textSize="18sp"
147+
app:layout_constraintBottom_toBottomOf="parent"
148+
app:layout_constraintEnd_toEndOf="@+id/til_password"
149+
app:layout_constraintHorizontal_bias="1.0"
150+
app:layout_constraintStart_toStartOf="@+id/til_password"
151+
app:layout_constraintTop_toBottomOf="@+id/mb_sign_ip" />
152+
153+
</androidx.constraintlayout.widget.ConstraintLayout>
154+
155+
</ScrollView>

android/app/src/main/res/layout/activity_registration.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
android:id="@+id/mb_sign_up"
192192
style="@style/Widget.MaterialComponents.Button"
193193
android:layout_width="0dp"
194-
android:layout_height="49dp"
194+
android:layout_height="wrap_content"
195195
android:layout_marginTop="32dp"
196196
android:background="@color/main_color"
197197
android:fontFamily="@font/montserrat_bold"

android/app/src/main/res/values/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
<string name="title_register">Register</string>
1919
<string name="title_existing_member">Already a member?</string>
2020
<string name="sign_in">Sign in</string>
21+
<string name="forget_password">Forget Password?</string>
2122

2223
</resources>

0 commit comments

Comments
 (0)