Commit 5ccfc374 by Paktalin

Redesigned LoginActivity

parent 1e0d43e6
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/NoTextActionBar">
<activity <activity
android:label="@string/app_name" android:label="@string/app_name"
android:name=".ui.activities.MainActivity" android:name=".ui.activities.MainActivity"
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
</activity> </activity>
<activity <activity
android:name=".ui.activities.LogInActivity" android:name=".ui.activities.LogInActivity"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
android:label="Vocabulary Notebook"
android:theme="@style/BasicStyle">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
...@@ -6,61 +6,102 @@ ...@@ -6,61 +6,102 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.activities.LogInActivity"> tools:context=".ui.activities.LogInActivity"
android:background="@color/background_color">
<EditText <android.support.constraint.ConstraintLayout
android:id="@+id/etEmail" android:id="@+id/emailPasswordLayout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:background="@drawable/sheet"
android:layout_marginEnd="8dp" android:padding="@dimen/medium_padding"
android:layout_marginLeft="8dp" android:layout_margin="@dimen/medium_margin"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="@string/email_hint"
android:inputType="textEmailAddress"
app:layout_constraintBottom_toTopOf="@+id/etPassword"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" /> app:layout_constraintBottom_toTopOf="@+id/btnLogIn">
<EditText <EditText
android:id="@+id/etPassword" android:id="@+id/etEmail"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_margin="@dimen/small_margin"
android:layout_marginEnd="8dp" android:background="@android:color/transparent"
android:layout_marginLeft="8dp" android:ems="10"
android:layout_marginRight="8dp" android:textSize="@dimen/text_size"
android:layout_marginStart="8dp" android:fontFamily="@font/neucha"
android:layout_marginTop="8dp" android:hint="@string/email_hint"
android:ems="10" android:inputType="textEmailAddress"
android:hint="@string/password_hint" android:paddingEnd="@dimen/small_padding"
android:inputType="textPassword" android:paddingLeft="@dimen/small_padding"
app:layout_constraintBottom_toTopOf="@+id/btnLogIn" android:paddingRight="@dimen/small_padding"
app:layout_constraintEnd_toEndOf="parent" android:paddingStart="@dimen/small_padding"
app:layout_constraintStart_toStartOf="parent" android:textColor="@color/text_color"
app:layout_constraintTop_toBottomOf="@+id/etEmail" /> app:layout_constraintBottom_toTopOf="@+id/etPassword"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<ImageView
android:id="@+id/lineEmail"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:src="@drawable/line"
app:layout_constraintLeft_toLeftOf="@+id/etEmail"
app:layout_constraintRight_toRightOf="@+id/etEmail"
app:layout_constraintTop_toBottomOf="@+id/etEmail"
tools:ignore="ContentDescription" />
<EditText
android:id="@+id/etPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/small_margin"
android:layout_marginTop="@dimen/medium_margin"
android:background="@android:color/transparent"
android:textSize="@dimen/text_size"
android:ems="10"
android:fontFamily="@font/neucha"
android:hint="@string/password_hint"
android:inputType="textPassword"
android:paddingEnd="@dimen/small_padding"
android:paddingLeft="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
android:paddingStart="@dimen/small_padding"
android:textColor="@color/text_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lineEmail" />
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/small_margin"
android:src="@drawable/line"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@+id/etPassword"
app:layout_constraintRight_toRightOf="@+id/etPassword"
app:layout_constraintTop_toBottomOf="@+id/etPassword"
tools:ignore="ContentDescription" />
</android.support.constraint.ConstraintLayout>
<Button <Button
android:id="@+id/btnLogIn" android:id="@+id/btnLogIn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_margin="@dimen/small_margin"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/log_in_text" android:text="@string/log_in_text"
android:background="@android:color/transparent"
android:fontFamily="@font/neucha"
android:textSize="@dimen/button_text_size"
android:textColor="@color/sheet_color"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btnSignUp" app:layout_constraintEnd_toStartOf="@id/btnSignUp"
app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/etPassword" /> app:layout_constraintTop_toBottomOf="@+id/emailPasswordLayout" />
<Button <Button
android:id="@+id/btnSignUp" android:id="@+id/btnSignUp"
...@@ -71,6 +112,10 @@ ...@@ -71,6 +112,10 @@
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:text="@string/sign_up" android:text="@string/sign_up"
android:background="@android:color/transparent"
android:fontFamily="@font/neucha"
android:textSize="@dimen/button_text_size"
android:textColor="@color/sheet_color"
app:layout_constraintBottom_toBottomOf="@+id/btnLogIn" app:layout_constraintBottom_toBottomOf="@+id/btnLogIn"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/btnLogIn" app:layout_constraintStart_toEndOf="@+id/btnLogIn"
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:hint="@string/hint_new_word" android:hint="@string/hint_new_word"
android:inputType="text" android:inputType="text"
android:textSize="22sp" android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:textColor="@color/text_color" android:textColor="@color/text_color"
tools:ignore="LabelFor" /> tools:ignore="LabelFor" />
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:hint="@string/hint_translation" android:hint="@string/hint_translation"
android:inputType="text" android:inputType="text"
android:textSize="22sp" android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:textColor="@color/text_color" android:textColor="@color/text_color"
tools:ignore="LabelFor" /> tools:ignore="LabelFor" />
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textSize="22sp" android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:textColor="@color/text_color" android:textColor="@color/text_color"
tools:ignore="LabelFor" /> tools:ignore="LabelFor" />
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textSize="22sp" android:textSize="@dimen/text_size"
app:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:textColor="@color/text_color" android:textColor="@color/text_color"
tools:ignore="LabelFor" /> tools:ignore="LabelFor" />
......
...@@ -6,4 +6,8 @@ ...@@ -6,4 +6,8 @@
<dimen name="zero_corner_radius">0dp</dimen> <dimen name="zero_corner_radius">0dp</dimen>
<dimen name="small_margin">8dp</dimen> <dimen name="small_margin">8dp</dimen>
<dimen name="small_padding">8dp</dimen> <dimen name="small_padding">8dp</dimen>
<dimen name="button_text_size">24sp</dimen>
<dimen name="medium_padding">16dp</dimen>
<dimen name="medium_margin">16dp</dimen>
<dimen name="text_size">22sp</dimen>
</resources> </resources>
<resources> <resources>
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> <style name="BasicStyle" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style>
<style name="NoTextActionBar" parent="BasicStyle">
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item> <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionOverflowButtonStyle">@style/MyActionButtonOverflow</item> <item name="android:actionOverflowButtonStyle">@style/MyActionButtonOverflow</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment