Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meser
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Suryono
meser
Commits
de345f3b
Commit
de345f3b
authored
Sep 02, 2020
by
Alfansyah Fadlian
Browse files
Options
Browse Files
Download
Plain Diff
fixed layout with state
parents
53410090
d365a966
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
304 additions
and
217 deletions
+304
-217
FormProductActivity.java
...rc/main/java/com/yono/messeripos/FormProductActivity.java
+3
-2
LoginActivity.java
app/src/main/java/com/yono/messeripos/LoginActivity.java
+42
-6
LoginState.java
app/src/main/java/com/yono/messeripos/LoginState.java
+2
-1
RegisterState.java
app/src/main/java/com/yono/messeripos/RegisterState.java
+95
-0
UsersModels.java
...src/main/java/com/yono/messeripos/models/UsersModels.java
+4
-0
dashboard_login.xml
app/src/main/res/layout/dashboard_login.xml
+0
-9
login_form.xml
app/src/main/res/layout/login_form.xml
+39
-30
register_form.xml
app/src/main/res/layout/register_form.xml
+118
-169
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/java/com/yono/messeripos/FormProductActivity.java
View file @
de345f3b
...
@@ -188,7 +188,8 @@ public class FormProductActivity extends AppCompatActivity {
...
@@ -188,7 +188,8 @@ public class FormProductActivity extends AppCompatActivity {
HashSet
<
String
>
set
=
new
HashSet
<>();
HashSet
<
String
>
set
=
new
HashSet
<>();
List
<
String
>
str
=
new
ArrayList
<>();
List
<
String
>
str
=
new
ArrayList
<>();
categoryModels
=
new
ArrayList
<>();
categoryModels
=
new
ArrayList
<>();
if
(
productModelsIntent
==
null
){
Log
.
i
(
"GET_CATEGORY"
,
"setSpinner: "
+
utils
.
convertGson
(
productModelsIntent
));
if
(
productModelsIntent
.
getCategoryProduct
()
==
0
){
str
.
add
(
"SELECT CATEGORY"
);
str
.
add
(
"SELECT CATEGORY"
);
}
else
{
}
else
{
str
.
add
(
getCategoryById
(
productModelsIntent
.
getIdProduct
()));
str
.
add
(
getCategoryById
(
productModelsIntent
.
getIdProduct
()));
...
@@ -337,11 +338,11 @@ public class FormProductActivity extends AppCompatActivity {
...
@@ -337,11 +338,11 @@ public class FormProductActivity extends AppCompatActivity {
}
}
private
String
getCategoryById
(
int
s
)
{
private
String
getCategoryById
(
int
s
)
{
CategoryServise
categoryServise
=
client
.
Client
(
CategoryServise
.
class
);
CategoryServise
categoryServise
=
client
.
Client
(
CategoryServise
.
class
);
categoryServise
.
getCategoryId
(
s
).
enqueue
(
new
Callback
<
DataResponse
<
CategoryModels
>>()
{
categoryServise
.
getCategoryId
(
s
).
enqueue
(
new
Callback
<
DataResponse
<
CategoryModels
>>()
{
@Override
@Override
public
void
onResponse
(
Call
<
DataResponse
<
CategoryModels
>>
call
,
Response
<
DataResponse
<
CategoryModels
>>
response
)
{
public
void
onResponse
(
Call
<
DataResponse
<
CategoryModels
>>
call
,
Response
<
DataResponse
<
CategoryModels
>>
response
)
{
Log
.
i
(
"ER"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
categoryName
=
response
.
body
().
getData
().
getNameCategory
();
categoryName
=
response
.
body
().
getData
().
getNameCategory
();
}
}
...
...
app/src/main/java/com/yono/messeripos/LoginActivity.java
View file @
de345f3b
...
@@ -32,16 +32,18 @@ import com.yono.messeripos.utils.Utils;
...
@@ -32,16 +32,18 @@ import com.yono.messeripos.utils.Utils;
public
class
LoginActivity
extends
AppCompatActivity
{
public
class
LoginActivity
extends
AppCompatActivity
{
TextInputEditText
username
,
password
;
TextInputEditText
username
,
password
;
MaterialButton
btnLogin
,
btnRegister
;
MainViewModels
mainViewModels
;
MainViewModels
mainViewModels
;
ProgressBar
progressBar
;
ProgressBar
progressBar
;
SharedPreferences
sharedPreferences
;
SharedPreferences
sharedPreferences
;
Utils
utils
=
new
Utils
();
Utils
utils
=
new
Utils
();
//State
LoginState
loginState
;
LoginState
loginState
;
RegisterState
registerState
;
MaterialButton
btnSignin
;
MaterialButton
btnSignup
,
btnSignIn
;
ConstraintLayout
loginSheetLayout
;
ConstraintLayout
loginSheetLayout
,
registerSheetLayout
;
BottomSheetBehavior
sheetBehavior
;
int
height
,
width
;
int
height
,
width
;
ImageButton
closeBtn
;
ImageButton
closeBtn
;
...
@@ -60,13 +62,38 @@ public class LoginActivity extends AppCompatActivity {
...
@@ -60,13 +62,38 @@ public class LoginActivity extends AppCompatActivity {
mainViewModels
=
ViewModelProviders
.
of
(
this
).
get
(
MainViewModels
.
class
);
mainViewModels
=
ViewModelProviders
.
of
(
this
).
get
(
MainViewModels
.
class
);
// bindUI
// bindUI
btnSignin
=
findViewById
(
R
.
id
.
signInButtonDashboardLogin
);
btnSignIn
=
findViewById
(
R
.
id
.
signInButtonDashboardLogin
);
btnSignup
=
findViewById
(
R
.
id
.
signUpButtonDashboardLogin
);
// bindUI
// get window height
DisplayMetrics
displayMetrics
=
new
DisplayMetrics
();
getWindowManager
().
getDefaultDisplay
().
getMetrics
(
displayMetrics
);
height
=
displayMetrics
.
heightPixels
;
width
=
displayMetrics
.
widthPixels
;
// //button on click to form register
// btnSignup.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// if (sheetBehavior2.getState() != BottomSheetBehavior.STATE_EXPANDED) {
// sheetBehavior2.setState(BottomSheetBehavior.STATE_EXPANDED);
// registerSheetLayout.setMaxHeight(height - 100);
// } else {
// sheetBehavior2.setState(BottomSheetBehavior.STATE_COLLAPSED);
// }
// }
// });
// session login
// session login
sharedPreferences
=
getSharedPreferences
(
SplashScreen
.
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
sharedPreferences
=
getSharedPreferences
(
SplashScreen
.
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
// button login on click
// button login on click
btnSign
i
n
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
btnSign
I
n
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
loginState
=
new
LoginState
(
LoginActivity
.
this
,
mainViewModels
);
loginState
=
new
LoginState
(
LoginActivity
.
this
,
mainViewModels
);
...
@@ -74,5 +101,14 @@ public class LoginActivity extends AppCompatActivity {
...
@@ -74,5 +101,14 @@ public class LoginActivity extends AppCompatActivity {
loginState
.
show
(
getSupportFragmentManager
(),
loginState
.
getTag
());
loginState
.
show
(
getSupportFragmentManager
(),
loginState
.
getTag
());
}
}
});
});
btnSignup
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
registerState
=
new
RegisterState
(
LoginActivity
.
this
,
mainViewModels
);
registerState
.
setCancelable
(
false
);
registerState
.
show
(
getSupportFragmentManager
(),
registerState
.
getTag
());
}
});
}
}
}
}
app/src/main/java/com/yono/messeripos/LoginState.java
View file @
de345f3b
...
@@ -116,7 +116,8 @@ public class LoginState extends BottomSheetDialogFragment {
...
@@ -116,7 +116,8 @@ public class LoginState extends BottomSheetDialogFragment {
loginButton
.
setEnabled
(
false
);
loginButton
.
setEnabled
(
false
);
closeBtn
.
setEnabled
(
false
);
closeBtn
.
setEnabled
(
false
);
mainViewModels
.
checkLogin
(
new
UsersModels
(
username
.
getText
().
toString
(),
password
.
getText
().
toString
())).
observe
((
LifecycleOwner
)
context
,
new
Observer
<
DataResponse
<
UsersModels
>>()
{
mainViewModels
.
checkLogin
(
new
UsersModels
(
username
.
getText
().
toString
(),
password
.
getText
().
toString
())).
observe
((
LifecycleOwner
)
context
,
new
Observer
<
DataResponse
<
UsersModels
>>()
{
@Override
@Override
public
void
onChanged
(
DataResponse
<
UsersModels
>
usersModelsDataResponse
)
{
public
void
onChanged
(
DataResponse
<
UsersModels
>
usersModelsDataResponse
)
{
Log
.
d
(
"Status"
,
usersModelsDataResponse
.
getMessageData
());
Log
.
d
(
"Status"
,
usersModelsDataResponse
.
getMessageData
());
...
...
app/src/main/java/com/yono/messeripos/RegisterState.java
0 → 100644
View file @
de345f3b
package
com
.
yono
.
messeripos
;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.content.SharedPreferences
;
import
android.content.res.Resources
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.RelativeLayout
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
com.google.android.material.bottomsheet.BottomSheetBehavior
;
import
com.google.android.material.bottomsheet.BottomSheetDialog
;
import
com.google.android.material.bottomsheet.BottomSheetDialogFragment
;
import
com.google.android.material.button.MaterialButton
;
import
com.google.android.material.textfield.TextInputEditText
;
import
com.yono.messeripos.models.MainViewModels
;
import
com.yono.messeripos.utils.Utils
;
public
class
RegisterState
extends
BottomSheetDialogFragment
{
private
static
final
String
TAG
=
"RegisterState"
;
BottomSheetBehavior
sheetBehavior2
;
BottomSheetDialog
sheetDialog2
;
RelativeLayout
registerLayout
;
TextInputEditText
username
,
email
,
password
,
repassword
;
MaterialButton
registerButton
;
ImageView
closeBtn
;
Context
context
;
MainViewModels
mainViewModels
;
SharedPreferences
sharedPreferences
;
Utils
utils
;
public
RegisterState
(
Context
context
,
MainViewModels
mainViewModels
)
{
this
.
context
=
context
;
this
.
mainViewModels
=
mainViewModels
;
}
@NonNull
@Override
public
Dialog
onCreateDialog
(
@Nullable
Bundle
savedInstanceState
)
{
sheetDialog2
=
(
BottomSheetDialog
)
super
.
onCreateDialog
(
savedInstanceState
);
// inflating layout
View
view
=
View
.
inflate
(
getContext
(),
R
.
layout
.
register_form
,
null
);
// bindUI
registerLayout
=
view
.
findViewById
(
R
.
id
.
RegisterLayout
);
username
=
view
.
findViewById
(
R
.
id
.
ETUsernameReg
);
email
=
view
.
findViewById
(
R
.
id
.
ETEmailReg
);
password
=
view
.
findViewById
(
R
.
id
.
ETPasswordReg
);
repassword
=
view
.
findViewById
(
R
.
id
.
ETRePasswordReg
);
registerButton
=
view
.
findViewById
(
R
.
id
.
MBRegister
);
closeBtn
=
view
.
findViewById
(
R
.
id
.
ivclose
);
// create session
sharedPreferences
=
context
.
getSharedPreferences
(
SplashScreen
.
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
// utils
utils
=
new
Utils
();
sheetDialog2
.
setContentView
(
view
);
sheetBehavior2
=
BottomSheetBehavior
.
from
((
View
)
(
view
.
getParent
()));
// get Window size
int
getHeight
=
Resources
.
getSystem
().
getDisplayMetrics
().
heightPixels
;
int
setHeight
=
getHeight
-
(
getHeight
*
5
)
/
100
;
// set max height
sheetBehavior2
.
setPeekHeight
(
setHeight
);
registerLayout
.
setMinimumHeight
(
setHeight
);
Log
.
d
(
TAG
,
"onCreateDialog: "
+
sheetBehavior2
.
getState
());
// loginButton.setOnClickListener(view1 -> {
// if (sheetBehavior.getState() != BottomSheetBehavior.STATE_EXPANDED) loginAuth(view1);
// });
// close btn is clicked
closeBtn
.
setOnClickListener
(
view12
->
{
Log
.
d
(
TAG
,
"onCreateDialog: "
+
sheetBehavior2
.
getState
());
sheetDialog2
.
dismiss
();
});
return
sheetDialog2
;
}
}
app/src/main/java/com/yono/messeripos/models/UsersModels.java
View file @
de345f3b
...
@@ -12,6 +12,10 @@ public class UsersModels {
...
@@ -12,6 +12,10 @@ public class UsersModels {
@SerializedName
(
"password"
)
@SerializedName
(
"password"
)
private
String
passwordUsers
;
private
String
passwordUsers
;
public
UsersModels
(
String
usernameUsers
,
String
passwordUsers
)
{
this
.
usernameUsers
=
usernameUsers
;
this
.
passwordUsers
=
passwordUsers
;
}
public
UsersModels
(
String
usernameUsers
,
String
emailUsers
,
String
passwordUsers
)
{
public
UsersModels
(
String
usernameUsers
,
String
emailUsers
,
String
passwordUsers
)
{
this
.
usernameUsers
=
usernameUsers
;
this
.
usernameUsers
=
usernameUsers
;
...
...
app/src/main/res/layout/dashboard_login.xml
View file @
de345f3b
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--<androidx.coordinatorlayout.widget.CoordinatorLayout android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- xmlns:app="http://schemas.android.com/apk/res-auto"-->
<!-- xmlns:tools="http://schemas.android.com/tools"-->
<!-- android:background="@drawable/gradient"-->
<!-- xmlns:android="http://schemas.android.com/apk/res/android"-->
<!-- tools:context=".LoginActivity">-->
<layout
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
...
@@ -70,4 +62,3 @@
...
@@ -70,4 +62,3 @@
</layout>
</layout>
<!--</androidx.coordinatorlayout.widget.CoordinatorLayout>-->
app/src/main/res/layout/login_form.xml
View file @
de345f3b
...
@@ -7,69 +7,78 @@
...
@@ -7,69 +7,78 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<RelativeLayout
<RelativeLayout
android:id=
"@+id/LoginLayout"
android:id=
"@+id/LoginLayout"
android:padding=
"20dp"
style=
"@style/Widget.Rounded.BottomSheet"
style=
"@style/Widget.Rounded.BottomSheet"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
android:padding=
"20dp"
>
<ImageButton
<ImageButton
android:id=
"@+id/closeBtnLogin"
android:id=
"@+id/closeBtnLogin"
android:layout_width=
"20dp"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_height=
"20dp"
android:
src=
"@drawable/ic_baseline_plus_24
"
android:
layout_alignParentStart=
"true
"
android:
scaleType=
"centerInsid
e"
android:
layout_alignParentTop=
"tru
e"
android:adjustViewBounds=
"true"
android:adjustViewBounds=
"true"
android:padding=
"20dp"
android:backgroundTint=
"@android:color/transparent"
android:backgroundTint=
"@android:color/transparent"
android:
layout_alignParentTop=
"true
"
android:
padding=
"20dp
"
android:
layout_alignParentStart=
"tru
e"
android:
scaleType=
"centerInsid
e"
/>
android:src=
"@drawable/ic_close"
/>
<ImageView
<ImageView
android:id=
"@+id/messerLogoInLogin"
android:id=
"@+id/messerLogoInLogin"
android:layout_width=
"150dp"
android:layout_width=
"150dp"
android:layout_height=
"150dp"
android:layout_height=
"150dp"
android:src=
"@drawable/ic_messer_primary"
android:layout_below=
"@id/closeBtnLogin"
android:layout_below=
"@id/closeBtnLogin"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"20dp"
/>
android:layout_marginTop=
"20dp"
android:src=
"@drawable/ic_messer_primary"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvLogin"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/messerLogoInLogin"
android:paddingLeft=
"12dp"
android:text=
"Login Your Account"
android:textColor=
"@color/colorPrimary"
android:textFontWeight=
"600"
android:textSize=
"16sp"
/>
<com.google.android.material.textfield.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/formUsernameLogin"
android:id=
"@+id/formUsernameLogin"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:hint=
"@string/username"
android:layout_below=
"@id/tvLogin"
android:layout_below=
"@id/messerLogoInLogin"
android:hint=
"@string/username"
>
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
<com.google.android.material.textfield.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/ETUsernameLogin"
android:id=
"@+id/ETUsernameLogin"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:inputType=
"text"
android:imeOptions=
"actionNext"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
/>
android:imeOptions=
"actionNext"
android:inputType=
"text"
/>
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/FormPasswordLogin"
android:id=
"@+id/FormPasswordLogin"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:hint=
"@string/password"
android:layout_below=
"@id/formUsernameLogin"
android:layout_below=
"@id/formUsernameLogin"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
"
>
android:hint=
"@string/password
"
>
<com.google.android.material.textfield.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/ETPasswordLogin"
android:id=
"@+id/ETPasswordLogin"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:inputType=
"textPassword"
android:imeOptions=
"actionDone|actionGo"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
/>
android:imeOptions=
"actionDone|actionGo"
android:inputType=
"textPassword"
/>
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
...
@@ -77,29 +86,29 @@
...
@@ -77,29 +86,29 @@
android:id=
"@+id/CBRememberMe"
android:id=
"@+id/CBRememberMe"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Remember Me"
android:textColor=
"@color/colorPrimary"
android:layout_below=
"@id/FormPasswordLogin"
android:layout_below=
"@id/FormPasswordLogin"
android:layout_marginVertical=
"10dp"
android:layout_marginVertical=
"10dp"
app:useMaterialThemeColors=
"true"
/>
android:text=
"Remember Me"
android:textColor=
"@color/colorPrimary"
app:useMaterialThemeColors=
"true"
/>
<com.google.android.material.button.MaterialButton
<com.google.android.material.button.MaterialButton
android:id=
"@+id/SignInButtonInLogin"
android:id=
"@+id/SignInButtonInLogin"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@id/CBRememberMe"
android:text=
"Sign In"
android:layout_below=
"@id/CBRememberMe"
android:layout_below=
"@id/CBRememberMe"
android:padding=
"20dp"
/>
android:padding=
"20dp"
android:text=
"Sign In"
app:layout_constraintTop_toBottomOf=
"@id/CBRememberMe"
/>
<com.google.android.material.textview.MaterialTextView
<com.google.android.material.textview.MaterialTextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Forgot Password?"
android:layout_below=
"@id/SignInButtonInLogin"
android:layout_below=
"@id/SignInButtonInLogin"
android:layout_marginTop=
"10dp"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:textColor=
"@color/colorPrimary"
/>
android:layout_marginTop=
"10dp"
android:text=
"Forgot Password?"
android:textColor=
"@color/colorPrimary"
/>
</RelativeLayout>
</RelativeLayout>
...
...
app/src/main/res/layout/register_form.xml
View file @
de345f3b
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/ConstraintRegisterLayout"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
android:fitsSystemWindows=
"true"
android:paddingTop=
"10dp"
<RelativeLayout
android:orientation=
"vertical"
android:id=
"@+id/RegisterLayout"
app:behavior_hideable=
"true"
android:padding=
"20dp"
app:behavior_peekHeight=
"0dp"
style=
"@style/Widget.Rounded.BottomSheet"
app:layout_behavior=
"com.google.android.material.bottomsheet.BottomSheetBehavior"
style=
"@style/Widget.Rounded.BottomSheet"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
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.0"
>
<ImageButton
<ImageButton
android:id=
"@+id/ivclose"
android:id=
"@+id/ivclose"
...
@@ -33,7 +22,7 @@
...
@@ -33,7 +22,7 @@
android:padding=
"10dp"
android:padding=
"10dp"
android:src=
"@drawable/ic_close"
android:src=
"@drawable/ic_close"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
tools:ignore=
"MissingConstraints"
/>
/>
<ImageView
<ImageView
...
@@ -41,158 +30,118 @@
...
@@ -41,158 +30,118 @@
android:layout_width=
"150dp"
android:layout_width=
"150dp"
android:layout_height=
"150dp"
android:layout_height=
"150dp"
android:src=
"@drawable/ic_messer_primary"
android:src=
"@drawable/ic_messer_primary"
app:layout_constraintBottom_toBottomOf=
"parent"
android:layout_below=
"@+id/ivclose"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_centerHorizontal=
"true"
/>
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/ivclose"
app:layout_constraintVertical_bias=
"0.0"
/>
<com.google.android.material.textview.MaterialTextView
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tv
LoginToAcc
"
android:id=
"@+id/tv
Create
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Create Your Account"
android:text=
"Create Your Account"
android:textColor=
"@color/colorPrimary"
android:textColor=
"@color/colorPrimary"
android:textFontWeight=
"600"
android:textFontWeight=
"600"
android:textSize=
"16sp"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
android:layout_below=
"@id/ivMeserRegister"
app:layout_constraintEnd_toEndOf=
"parent"
android:paddingLeft=
"12dp"
app:layout_constraintHorizontal_bias=
"0.116"
/>
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/ivMeserRegister"
app:layout_constraintVertical_bias=
"0.039"
/>
<com.google.android.material.card.MaterialCardView
android:id=
"@+id/cvLogin"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_marginHorizontal=
"30dp"
android:backgroundTint=
"@android:color/transparent"
app:cardElevation=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tvLoginToAcc"
app:layout_constraintVertical_bias=
"0.0"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.google.android.material.textfield.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfUsername"
android:id=
"@+id/formUsernameReg"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/username"
android:hint=
"@string/username"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_below=
"@id/tvCreate"
app:layout_constraintStart_toStartOf=
"parent"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiUsername
"
android:id=
"@+id/ETUsernameReg
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionNext"
android:inputType=
"text"
android:inputType=
"text"
android:textColor=
"@color/colorPrimary"
/>
android:imeOptions=
"actionNext"
android:layout_height=
"wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfEmail"
android:id=
"@+id/formEmailReg"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/email"
android:hint=
"@string/email"
app:layout_constraintBottom_toBottomOf=
"parent
"
android:layout_marginTop=
"5dp
"
app:layout_constraintTop_toBottomOf=
"@id/tfUsername
"
android:layout_below=
"@id/formUsernameReg
"
app:layout_constraintVertical_bias=
"0.0
"
>
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
"
>
<com.google.android.material.textfield.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiEmail
"
android:id=
"@+id/ETEmailReg
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionGo"
android:inputType=
"textEmailAddress"
android:inputType=
"textEmailAddress"
android:textColor=
"@color/colorPrimary"
/>
android:imeOptions=
"actionNext"
android:layout_height=
"wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfPassword"
android:id=
"@+id/FormPasswordReg"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/password"
android:hint=
"@string/password"
app:layout_constraintBottom_toBottomOf=
"parent
"
android:layout_below=
"@id/formEmailReg
"
app:layout_constraintTop_toBottomOf=
"@id/tfEmail
"
android:layout_marginTop=
"5dp
"
app:layout_constraintVertical_bias=
"0.0
"
>
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
"
>
<com.google.android.material.textfield.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiPassword
"
android:id=
"@+id/ETPasswordReg
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionGo"
android:inputType=
"textPassword"
android:inputType=
"textPassword"
android:textColor=
"@color/colorPrimary"
/>
android:imeOptions=
"actionDone|actionGo"
android:layout_height=
"wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfRePassword"
android:id=
"@+id/FormRePasswordReg"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/password_Confirmation"
android:hint=
"@string/password"
android:layout_below=
"@id/FormPasswordReg"
app:layout_constraintBottom_toBottomOf=
"parent"
android:layout_marginTop=
"5dp"
app:layout_constraintTop_toBottomOf=
"@id/tfPassword"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiRePassword
"
android:id=
"@+id/ETRePasswordReg
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionGo"
android:inputType=
"textPassword"
android:inputType=
"textPassword"
android:textColor=
"@color/colorPrimary"
/>
android:imeOptions=
"actionDone|actionGo"
android:layout_height=
"wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
<CheckBox
android:id=
"@+id/cbAgree"
android:id=
"@+id/cbAgree"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"I Agree to
terms of use"
android:text=
"I Agree of
terms of use"
android:textColor=
"@color/colorPrimary"
android:textColor=
"@color/colorPrimary"
android:fontFamily=
"@font/poppins_medium"
android:layout_below=
"@id/FormRePasswordReg"
app:layout_constraintStart_toStartOf=
"parent"
android:layout_marginVertical=
"10dp"
app:layout_constraintTop_toBottomOf=
"@id/tfRePassword"
app:useMaterialThemeColors=
"true"
/>
app:useMaterialThemeColors=
"true"
/>
<com.google.android.material.button.MaterialButton
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btn
Register"
android:id=
"@+id/MB
Register"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:backgroundTint=
"@color/colorPrimary"
android:imeOptions=
"actionGo"
android:paddingVertical=
"15dp"
android:text=
"create"
android:textColor=
"@color/colorWhite"
android:textFontWeight=
"600"
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/cbAgree"
app:layout_constraintTop_toBottomOf=
"@id/cbAgree"
app:layout_constraintVertical_bias=
"0.01999998"
/>
android:text=
"Create Account"
android:layout_below=
"@id/cbAgree"
android:padding=
"20dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
</layout>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
de345f3b
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
<string
name=
"open_cart"
>
Open Cart
</string>
<string
name=
"open_cart"
>
Open Cart
</string>
<string
name=
"text_new_category"
>
Add New Category
</string>
<string
name=
"text_new_category"
>
Add New Category
</string>
<string
name=
"email"
>
Email
</string>
<string
name=
"email"
>
Email
</string>
<string
name=
"password_Confirmation"
>
Password Confirmation
</string>
<string-array
name=
"planets_array"
>
<string-array
name=
"planets_array"
>
<item>
Mercury
</item>
<item>
Mercury
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment