Dola TENG před 1 rokem
rodič
revize
29f51aacf9

+ 5 - 0
app/src/main/java/com/sambath/kunkhmer/screen/register/RegisterActivity.kt

@@ -3,9 +3,11 @@ package com.sambath.kunkhmer.screen.register
 import android.content.Intent
 import androidx.appcompat.app.AppCompatActivity
 import android.os.Bundle
+import android.text.Html
 import android.view.MenuItem
 import android.view.View
 import android.widget.ArrayAdapter
+import android.widget.TextView
 import com.sambath.kunkhmer.R
 import com.sambath.kunkhmer.screen.login.LoginActivity
 import kotlinx.android.synthetic.main.activity_register.et_gender
@@ -26,6 +28,9 @@ class RegisterActivity : AppCompatActivity() {
         et_gender.setSelection(0)
 
         setGender()
+
+        val textView = findViewById<TextView>(R.id.tv_agreement)
+        textView.text = Html.fromHtml(getString(R.string.agreement_hint))
     }
 
     override fun onOptionsItemSelected(item: MenuItem): Boolean {

binární
app/src/main/res/drawable/ic_event_form.png


binární
app/src/main/res/drawable/ic_fight.png


binární
app/src/main/res/drawable/ic_live.png


binární
app/src/main/res/drawable/ic_logo_header.png


binární
app/src/main/res/drawable/ic_news_form.png


binární
app/src/main/res/drawable/ic_shop_form.png


binární
app/src/main/res/drawable/ic_upload_profile.png


+ 13 - 5
app/src/main/res/layout/activity_login.xml

@@ -32,22 +32,23 @@
             android:layout_gravity="center_horizontal"
             android:layout_marginTop="150dp"
             android:background="@drawable/bg_circle_black"
+            android:padding="10dp"
             android:src="@drawable/default_profile" />
     </FrameLayout>
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:gravity="center"
         android:orientation="vertical">
 
-        <LinearLayout
+        <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
+            android:layout_height="match_parent"
             android:layout_margin="16dp"
             android:orientation="vertical">
 
             <TextView
+                android:id="@+id/tv_username"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:layout_marginBottom="8dp"
@@ -62,6 +63,7 @@
                 style="@style/BoxInputLayout"
                 android:layout_width="match_parent"
                 android:layout_height="48dp"
+                android:layout_below="@id/tv_username"
                 app:endIconMode="clear_text"
                 app:hintEnabled="false">
 
@@ -77,8 +79,10 @@
             </com.google.android.material.textfield.TextInputLayout>
 
             <TextView
+                android:id="@+id/tv_password"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
+                android:layout_below="@id/til_username"
                 android:layout_marginTop="16dp"
                 android:layout_marginBottom="8dp"
                 android:gravity="center_vertical"
@@ -92,6 +96,7 @@
                 style="@style/BoxInputLayout"
                 android:layout_width="match_parent"
                 android:layout_height="48dp"
+                android:layout_below="@id/til_username"
                 app:endIconMode="password_toggle"
                 app:endIconTint="@color/color_highlight"
                 app:hintEnabled="false">
@@ -111,6 +116,7 @@
                 android:id="@+id/tv_error"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
+                android:layout_below="@id/til_password"
                 android:layout_marginTop="8dp"
                 android:gravity="center"
                 android:textColor="@color/color_red_800" />
@@ -119,6 +125,7 @@
                 android:id="@+id/btn_login"
                 android:layout_width="match_parent"
                 android:layout_height="58dp"
+                android:layout_below="@id/tv_error"
                 android:layout_gravity="center"
                 android:layout_marginTop="8dp"
                 android:backgroundTint="@color/color_blue_600"
@@ -131,6 +138,7 @@
                 android:id="@+id/btn_forgot"
                 android:layout_width="match_parent"
                 android:layout_height="58dp"
+                android:layout_below="@id/btn_login"
                 android:layout_gravity="center"
                 android:layout_marginTop="8dp"
                 android:gravity="center"
@@ -141,14 +149,14 @@
                 android:id="@+id/btn_signup"
                 android:layout_width="match_parent"
                 android:layout_height="58dp"
-                android:layout_gravity="center"
+                android:layout_alignParentBottom="true"
                 android:layout_marginTop="8dp"
                 android:backgroundTint="@color/color_blue_600"
                 android:gravity="center"
                 android:text="@string/btn_signup"
                 android:textColor="@color/color_white"
                 app:cornerRadius="0dp" />
-        </LinearLayout>
+        </RelativeLayout>
     </LinearLayout>
 
 

+ 54 - 12
app/src/main/res/layout/activity_register.xml

@@ -19,16 +19,24 @@
             app:cardBackgroundColor="@color/cardview_dark_background"
             app:cardElevation="0dp" />
 
+        <ImageView
+            android:id="@+id/backgroundImage"
+            android:layout_width="match_parent"
+            android:layout_height="200dp"
+            android:src="@drawable/default_background" />
+
         <ImageView
             android:id="@+id/profileImage"
             android:layout_width="100dp"
             android:layout_height="100dp"
             android:layout_gravity="center_horizontal"
             android:layout_marginTop="150dp"
-            android:src="@drawable/ic_user_white" />
+            android:background="@drawable/bg_circle_black"
+            android:padding="15dp"
+            android:src="@drawable/ic_upload_profile" />
     </FrameLayout>
 
-    <LinearLayout
+    <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
@@ -39,6 +47,7 @@
             style="@style/BoxInputLayout"
             android:layout_width="match_parent"
             android:layout_height="48dp"
+            android:layout_marginBottom="1dp"
             app:endIconMode="clear_text"
             app:hintEnabled="false">
 
@@ -58,6 +67,8 @@
             style="@style/BoxInputLayout"
             android:layout_width="match_parent"
             android:layout_height="48dp"
+            android:layout_below="@id/til_firstname"
+            android:layout_marginBottom="1dp"
             app:endIconMode="clear_text"
             app:hintEnabled="false">
 
@@ -76,6 +87,8 @@
             android:id="@+id/et_gender"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_below="@id/til_lastname"
+            android:layout_marginBottom="1dp"
             android:background="@color/color_white"
             android:hint="@string/hint_lastname"
             android:inputType="text"
@@ -84,8 +97,11 @@
             android:paddingBottom="10dp" />
 
         <LinearLayout
+            android:id="@+id/gender_layout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_below="@id/et_gender"
+            android:layout_marginBottom="1dp"
             android:background="@color/color_gray_300"
             android:orientation="vertical">
 
@@ -160,6 +176,8 @@
             style="@style/BoxInputLayout"
             android:layout_width="match_parent"
             android:layout_height="48dp"
+            android:layout_below="@id/gender_layout"
+            android:layout_marginBottom="1dp"
             app:endIconMode="clear_text"
             app:hintEnabled="false">
 
@@ -179,6 +197,8 @@
             style="@style/BoxInputLayout"
             android:layout_width="match_parent"
             android:layout_height="48dp"
+            android:layout_below="@id/til_password"
+            android:layout_marginBottom="1dp"
             app:endIconMode="clear_text"
             app:hintEnabled="false">
 
@@ -193,17 +213,39 @@
                 android:padding="0dp" />
         </com.google.android.material.textfield.TextInputLayout>
 
-        <Button
-            android:id="@+id/registerButton"
+        <TextView
+            android:id="@+id/tv_agreement"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="32dp"
-            android:layout_marginTop="32dp"
-            android:layout_marginEnd="32dp"
-            android:text="Register"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/confirmPasswordEditText" />
-    </LinearLayout>
+            android:layout_below="@id/til_confirm_password"
+            android:text="@string/agreement_hint"
+            android:textColor="@color/color_white"
+            android:textSize="12sp" />
+
+        <com.google.android.material.button.MaterialButton
+            android:id="@+id/registerButton"
+            android:layout_width="match_parent"
+            android:layout_height="58dp"
+            android:layout_below="@id/tv_agreement"
+            android:layout_gravity="center"
+            android:layout_marginTop="8dp"
+            android:backgroundTint="@color/color_blue_600"
+            android:gravity="center"
+            android:text="Sign Up"
+            android:textColor="@color/color_white"
+            app:cornerRadius="0dp" />
+
+        <com.google.android.material.button.MaterialButton
+            android:id="@+id/loginButton"
+            android:layout_width="match_parent"
+            android:layout_height="58dp"
+            android:layout_alignParentBottom="true"
+            android:layout_gravity="center|bottom"
+            android:backgroundTint="@color/color_blue_600"
+            android:gravity="center"
+            android:text="Login"
+            android:textColor="@color/color_white"
+            app:cornerRadius="0dp" />
+    </RelativeLayout>
 
 </androidx.appcompat.widget.LinearLayoutCompat>

+ 1 - 1
app/src/main/res/layout/app_bar_boxing.xml

@@ -28,7 +28,7 @@
                 android:layout_marginBottom="4dp"
                 android:adjustViewBounds="true"
                 android:scaleType="fitXY"
-                android:src="@drawable/ic_logo"
+                android:src="@drawable/ic_logo_header"
                 app:layout_constraintBottom_toBottomOf="parent"
                 app:layout_constraintStart_toStartOf="parent"
                 app:layout_constraintTop_toTopOf="parent" />

+ 6 - 6
app/src/main/res/menu/bottom_nav_menu.xml

@@ -2,27 +2,27 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <item
         android:id="@+id/navigation_home"
-        android:icon="@drawable/ic_help"
+        android:icon="@drawable/ic_fight"
         android:title="@string/title_fighters" />
 
     <item
         android:id="@+id/navigation_dashboard"
-        android:icon="@drawable/ic_help"
+        android:icon="@drawable/ic_news_form"
         android:title="@string/title_news" />
 
     <item
         android:id="@+id/navigation_live"
-        android:icon="@drawable/ic_help"
-        android:title="@string/title_live" />
+        android:icon="@drawable/ic_live"
+        android:title="" />
 
     <item
         android:id="@+id/navigation_event"
-        android:icon="@drawable/ic_help"
+        android:icon="@drawable/ic_event_form"
         android:title="@string/title_event" />
 
     <item
         android:id="@+id/navigation_shop"
-        android:icon="@drawable/ic_help"
+        android:icon="@drawable/ic_shop_form"
         android:title="@string/title_shop" />
 
 </menu>

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -78,4 +78,5 @@
     <string name="hello_blank_fragment">Hello blank fragment</string>
     <string name="title_vs">Vs</string>
     <string name="title_date">Date</string>
+    <string name="agreement_hint"><![CDATA[By signing up, you agree with our <font color="#0000FF">Term & Condition</font> and <font color="#0000FF">Privacy Policy</font>]]></string>
 </resources>