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
269aa124
Commit
269aa124
authored
Sep 02, 2020
by
iman Fauzi
Browse files
Options
Browse Files
Download
Plain Diff
fix conflict
parents
3a088d6e
de345f3b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
374 additions
and
267 deletions
+374
-267
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+0
-3
LoginActivity.java
app/src/main/java/com/yono/messeripos/LoginActivity.java
+31
-5
RegisterState.java
app/src/main/java/com/yono/messeripos/RegisterState.java
+95
-0
UsersService.java
...in/java/com/yono/messeripos/api/service/UsersService.java
+3
-0
MainViewModels.java
.../main/java/com/yono/messeripos/models/MainViewModels.java
+57
-30
UsersModels.java
...src/main/java/com/yono/messeripos/models/UsersModels.java
+18
-1
dashboard_login.xml
app/src/main/res/layout/dashboard_login.xml
+1
-3
login_form.xml
app/src/main/res/layout/login_form.xml
+50
-43
register_form.xml
app/src/main/res/layout/register_form.xml
+118
-182
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
269aa124
...
...
@@ -38,9 +38,6 @@
<activity
android:name=
".CartActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".ProductActivity"
android:theme=
"@style/AppTheme.appbar"
/>
<activity
android:name=
".SplashScreen"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
app/src/main/java/com/yono/messeripos/LoginActivity.java
View file @
269aa124
...
...
@@ -32,16 +32,18 @@ import com.yono.messeripos.utils.Utils;
public
class
LoginActivity
extends
AppCompatActivity
{
TextInputEditText
username
,
password
;
MaterialButton
btnLogin
;
MainViewModels
mainViewModels
;
ProgressBar
progressBar
;
SharedPreferences
sharedPreferences
;
Utils
utils
=
new
Utils
();
//State
LoginState
loginState
;
RegisterState
registerState
;
MaterialButton
btnSignup
,
btnSignIn
;
ConstraintLayout
loginSheetLayout
,
registerSheetLayout
;
BottomSheetBehavior
sheetBehavior
,
sheetBehavior2
;
int
height
,
width
;
ImageButton
closeBtn
;
...
...
@@ -59,9 +61,7 @@ public class LoginActivity extends AppCompatActivity {
mainViewModels
=
ViewModelProviders
.
of
(
this
).
get
(
MainViewModels
.
class
);
// bindUI
btnSignIn
=
findViewById
(
R
.
id
.
signInButtonDashboardLogin
);
registerSheetLayout
=
findViewById
(
R
.
id
.
ConstraintRegisterLayout
);
// registerSheetLayout = findViewById(R.id.ConstraintRegisterLayout);
// sheetBehavior2 = BottomSheetBehavior.from(registerSheetLayout);
...
...
@@ -78,6 +78,23 @@ public class LoginActivity extends AppCompatActivity {
// }
// });
// bindUI
btnSignIn
=
findViewById
(
R
.
id
.
signInButtonDashboardLogin
);
btnSignup
=
findViewById
(
R
.
id
.
signUpButtonDashboardLogin
);
// //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
sharedPreferences
=
getSharedPreferences
(
SplashScreen
.
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
...
...
@@ -89,5 +106,14 @@ public class LoginActivity extends AppCompatActivity {
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/RegisterState.java
0 → 100644
View file @
269aa124
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/api/service/UsersService.java
View file @
269aa124
...
...
@@ -11,4 +11,7 @@ import retrofit2.http.POST;
public
interface
UsersService
{
@POST
(
ApiHelper
.
VERSI_API_1
+
"login"
)
Call
<
DataResponse
<
UsersModels
>>
checkLogin
(
@Body
UsersModels
usersModels
);
@POST
(
ApiHelper
.
VERSI_API_1
+
"register"
)
Call
<
DataResponse
<
UsersModels
>>
postRegister
(
@Body
UsersModels
usersModels
);
}
app/src/main/java/com/yono/messeripos/models/MainViewModels.java
View file @
269aa124
...
...
@@ -29,6 +29,8 @@ public class MainViewModels extends ViewModel {
MutableLiveData
<
DataResponse
<
List
<
ProductModels
>>>
productByCategory
;
MutableLiveData
<
DataResponse
<
List
<
CategoryModels
>>>
categoryList
;
MutableLiveData
<
DataResponse
<
UsersModels
>>
usersLogin
;
MutableLiveData
<
DataResponse
<
UsersModels
>>
usersRegister
;
MutableLiveData
<
DataResponse
<
List
<
PaymentsModels
<
String
>>>>
transactions
;
private
MainViewModels
mainViewModels
;
...
...
@@ -36,7 +38,7 @@ public class MainViewModels extends ViewModel {
Client
client
=
new
Client
();
Utils
utils
=
new
Utils
();
public
MainViewModels
(){
public
MainViewModels
()
{
productList
=
new
MutableLiveData
<>();
categoryList
=
new
MutableLiveData
<>();
productByCategory
=
new
MutableLiveData
<>();
...
...
@@ -44,26 +46,26 @@ public class MainViewModels extends ViewModel {
}
public
LiveData
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
getProduct
(){
public
LiveData
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
getProduct
()
{
getProductList
();
return
productList
;
}
public
LiveData
<
DataResponse
<
List
<
CategoryModels
>>>
getCategory
(){
public
LiveData
<
DataResponse
<
List
<
CategoryModels
>>>
getCategory
()
{
getCategoryList
();
return
categoryList
;
}
public
void
postCategory
(
CategoryModels
categoryModels
){
public
void
postCategory
(
CategoryModels
categoryModels
)
{
saveCategory
(
categoryModels
);
}
public
LiveData
<
DataResponse
<
List
<
ProductModels
>>>
getProductByCategory
(
int
id
){
public
LiveData
<
DataResponse
<
List
<
ProductModels
>>>
getProductByCategory
(
int
id
)
{
getDataProductByCategory
(
id
);
return
productByCategory
;
}
public
LiveData
<
DataResponse
<
List
<
PaymentsModels
<
String
>>>>
getAllTransactions
(){
public
LiveData
<
DataResponse
<
List
<
PaymentsModels
<
String
>>>>
getAllTransactions
()
{
getDataTransaction
();
return
transactions
;
}
...
...
@@ -74,27 +76,27 @@ public class MainViewModels extends ViewModel {
categoryServise
.
addCategory
(
categoryModels
).
enqueue
(
new
Callback
<
DataResponse
<
CategoryModels
>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
CategoryModels
>>
call
,
Response
<
DataResponse
<
CategoryModels
>>
response
)
{
Log
.
i
(
"Add Categiry"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
Log
.
i
(
"Add Categiry"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
CategoryModels
>>
call
,
Throwable
t
)
{
Log
.
e
(
"error add"
,
"onFailure: "
,
t
);
Log
.
e
(
"error add"
,
"onFailure: "
,
t
);
}
});
}
public
void
deleteProducts
(
int
id
){
public
void
deleteProducts
(
int
id
)
{
ProductService
productService
=
client
.
Client
(
ProductService
.
class
);
productService
.
deleteProducts
(
id
).
enqueue
(
new
Callback
<
DataResponse
<
ProductModels
>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
ProductModels
>>
call
,
Response
<
DataResponse
<
ProductModels
>>
response
)
{
Log
.
i
(
"Delete"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
Log
.
i
(
"Delete"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
ProductModels
>>
call
,
Throwable
t
)
{
Log
.
e
(
"error delete"
,
"onFailure: "
,
t
);
Log
.
e
(
"error delete"
,
"onFailure: "
,
t
);
}
});
}
...
...
@@ -106,17 +108,17 @@ public class MainViewModels extends ViewModel {
@Override
public
void
onResponse
(
Call
<
DataResponse
<
List
<
PaymentsModels
<
String
>>>>
call
,
Response
<
DataResponse
<
List
<
PaymentsModels
<
String
>>>>
response
)
{
Log
.
i
(
"Get all transaction"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
if
(
response
.
body
()
!=
null
){
Log
.
i
(
"Get all transaction"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
if
(
response
.
body
()
!=
null
)
{
transactions
.
setValue
(
response
.
body
());
}
else
{
}
else
{
transactions
=
null
;
}
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
List
<
PaymentsModels
<
String
>>>>
call
,
Throwable
t
)
{
Log
.
e
(
"Error get transaction"
,
"onFailure: "
,
t
);
Log
.
e
(
"Error get transaction"
,
"onFailure: "
,
t
);
transactions
=
null
;
}
});
...
...
@@ -130,8 +132,8 @@ public class MainViewModels extends ViewModel {
public
void
onResponse
(
Call
<
DataResponse
<
List
<
ProductModels
>>>
call
,
Response
<
DataResponse
<
List
<
ProductModels
>>>
response
)
{
String
js
=
new
Gson
().
toJson
(
response
.
body
());
Log
.
i
(
"Get data by category"
,
"onResponse: "
+
js
);
if
(
response
!=
null
){
Log
.
i
(
"Get data by category"
,
"onResponse: "
+
js
);
if
(
response
!=
null
)
{
productByCategory
.
setValue
(
response
.
body
());
}
}
...
...
@@ -143,28 +145,53 @@ public class MainViewModels extends ViewModel {
});
}
public
MutableLiveData
<
DataResponse
<
UsersModels
>>
checkLogin
(
UsersModels
usersModels
){
public
MutableLiveData
<
DataResponse
<
UsersModels
>>
checkLogin
(
UsersModels
usersModels
)
{
usersLogin
=
new
MutableLiveData
<>();
PeriksaLogin
(
usersModels
);
return
usersLogin
;
}
public
MutableLiveData
<
DataResponse
<
UsersModels
>>
checkRegis
(
UsersModels
usersModels
){
usersRegister
=
new
MutableLiveData
<>();
CreateRegister
(
usersModels
);
return
usersRegister
;
}
private
void
PeriksaLogin
(
UsersModels
usersModels
)
{
UsersService
usersService
=
client
.
Client
(
UsersService
.
class
);
//cek login
usersService
.
checkLogin
(
usersModels
).
enqueue
(
new
Callback
<
DataResponse
<
UsersModels
>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
UsersModels
>>
call
,
Response
<
DataResponse
<
UsersModels
>>
response
)
{
if
(
response
.
body
()
!=
null
){
if
(
response
.
body
()
!=
null
)
{
usersLogin
.
setValue
(
response
.
body
());
}
String
js
=
new
Gson
().
toJson
(
response
.
body
());
Log
.
d
(
"Periksa login"
,
"Response "
+
js
);
Log
.
d
(
"Periksa login"
,
"Response "
+
js
);
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
UsersModels
>>
call
,
Throwable
t
)
{
Log
.
e
(
"Error Login"
,
"Response "
+
t
.
getMessage
());
}
});
}
private
void
CreateRegister
(
UsersModels
usersModels
){
UsersService
usersService
=
client
.
Client
(
UsersService
.
class
);
//post register
usersService
.
postRegister
(
usersModels
).
enqueue
(
new
Callback
<
DataResponse
<
UsersModels
>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
UsersModels
>>
call
,
Response
<
DataResponse
<
UsersModels
>>
response
)
{
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
UsersModels
>>
call
,
Throwable
t
)
{
Log
.
e
(
"Error
Login"
,
"Response
"
+
t
.
getMessage
());
Log
.
e
(
"Error
Register"
,
"Response
"
+
t
.
getMessage
());
}
});
}
...
...
@@ -176,40 +203,40 @@ public class MainViewModels extends ViewModel {
productService
.
getProducts
().
enqueue
(
new
Callback
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
call
,
Response
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
response
)
{
Log
.
i
(
"Get products"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
if
(
response
.
body
()
!=
null
){
Log
.
i
(
"Get products"
,
"onResponse: "
+
utils
.
convertGson
(
response
.
body
()));
if
(
response
.
body
()
!=
null
)
{
productList
.
setValue
(
response
.
body
());
}
else
{
}
else
{
productList
.
setValue
(
null
);
}
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>
call
,
Throwable
t
)
{
Log
.
e
(
"Error get product"
,
"Response "
+
t
.
getMessage
());
Log
.
e
(
"Error get product"
,
"Response "
+
t
.
getMessage
());
}
});
}
private
void
getCategoryList
(){
private
void
getCategoryList
()
{
CategoryServise
categoryServise
=
client
.
Client
(
CategoryServise
.
class
);
categoryServise
.
getCategory
().
enqueue
(
new
Callback
<
DataResponse
<
List
<
CategoryModels
>>>()
{
@Override
public
void
onResponse
(
Call
<
DataResponse
<
List
<
CategoryModels
>>>
call
,
Response
<
DataResponse
<
List
<
CategoryModels
>>>
response
)
{
String
js
=
new
Gson
().
toJson
(
response
.
body
());
Log
.
d
(
"Get Data Category"
,
"Response "
+
js
);
if
(
response
.
body
()
!=
null
){
Log
.
d
(
"Get Data Category"
,
"Response "
+
js
);
if
(
response
.
body
()
!=
null
)
{
categoryList
.
setValue
(
response
.
body
());
}
else
{
}
else
{
categoryList
.
setValue
(
null
);
}
}
@Override
public
void
onFailure
(
Call
<
DataResponse
<
List
<
CategoryModels
>>>
call
,
Throwable
t
)
{
Log
.
e
(
"Error get product"
,
"Response "
+
t
.
getMessage
());
Log
.
e
(
"Error get product"
,
"Response "
+
t
.
getMessage
());
}
});
}
...
...
app/src/main/java/com/yono/messeripos/models/UsersModels.java
View file @
269aa124
...
...
@@ -6,14 +6,31 @@ public class UsersModels {
@SerializedName
(
"username"
)
private
String
usernameUsers
;
@SerializedName
(
"email"
)
private
String
emailUsers
;
@SerializedName
(
"password"
)
private
String
passwordUsers
;
public
UsersModels
(
String
usernameUsers
,
String
passwordUsers
)
{
public
UsersModels
(
String
usernameUsers
,
String
passwordUsers
)
{
this
.
usernameUsers
=
usernameUsers
;
this
.
passwordUsers
=
passwordUsers
;
}
public
UsersModels
(
String
usernameUsers
,
String
emailUsers
,
String
passwordUsers
)
{
this
.
usernameUsers
=
usernameUsers
;
this
.
emailUsers
=
emailUsers
;
this
.
passwordUsers
=
passwordUsers
;
}
public
String
getEmailUsers
()
{
return
emailUsers
;
}
public
void
setEmailUsers
(
String
emailUsers
)
{
this
.
emailUsers
=
emailUsers
;
}
public
String
getUsernameUsers
()
{
return
usernameUsers
;
}
...
...
app/src/main/res/layout/dashboard_login.xml
View file @
269aa124
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
...
...
@@ -39,12 +38,11 @@
app:strokeColor=
"#fff"
android:text=
"sign up"
android:textStyle=
"bold"
android:textColor=
"
@color/colorWhite
"
android:textColor=
"
#fff
"
app:strokeWidth=
"2dp"
app:rippleColor=
"@color/colorWhite"
android:padding=
"20dp"
app:cornerRadius=
"5dp"
android:background=
"@color/colorPrimaryCenter"
android:layout_above=
"@id/signInButtonDashboardLogin"
android:layout_marginBottom=
"10dp"
/>
...
...
app/src/main/res/layout/login_form.xml
View file @
269aa124
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:android=
"http://schemas.android.com/apk/res/android"
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<RelativeLayout
android:id=
"@+id/LoginLayout"
android:padding=
"20dp"
style=
"@style/Widget.Rounded.BottomSheet"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<ImageButton
android:id=
"@+id/closeBtnLogin"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:src=
"@drawable/ic_baseline_plus_24"
android:scaleType=
"centerInside"
android:adjustViewBounds=
"true"
android:padding=
"20dp"
android:backgroundTint=
"@android:color/transparent"
android:layout_alignParentTop=
"true"
android:layout_alignParentStart=
"true"
/>
<RelativeLayout
android:id=
"@+id/LoginLayout"
style=
"@style/Widget.Rounded.BottomSheet"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:padding=
"20dp"
>
<ImageButton
android:id=
"@+id/closeBtnLogin"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:adjustViewBounds=
"true"
android:backgroundTint=
"@android:color/transparent"
android:padding=
"20dp"
android:scaleType=
"centerInside"
android:src=
"@drawable/ic_close"
/>
<ImageView
android:id=
"@+id/messerLogoInLogin"
android:layout_width=
"150dp"
android:layout_height=
"150dp"
android:src=
"@drawable/ic_messer_primary"
android:layout_below=
"@id/closeBtnLogin"
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
android:id=
"@+id/formUsernameLogin"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/username"
android:layout_below=
"@id/messerLogoInLogin"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
android:layout_below=
"@id/tvLogin"
android:hint=
"@string/username"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/ETUsernameLogin"
android:layout_width=
"match_parent"
android:inputType=
"text"
android:imeOptions=
"actionNext"
android:layout_height=
"wrap_content"
/>
android:imeOptions=
"actionNext"
android:inputType=
"text"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/FormPasswordLogin"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/password"
android:layout_below=
"@id/formUsernameLogin"
android:layout_marginTop=
"20dp"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
"
>
android:hint=
"@string/password
"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/ETPasswordLogin"
android:layout_width=
"match_parent"
android:inputType=
"textPassword"
android:imeOptions=
"actionDone|actionGo"
android:layout_height=
"wrap_content"
/>
android:imeOptions=
"actionDone|actionGo"
android:inputType=
"textPassword"
/>
</com.google.android.material.textfield.TextInputLayout>
...
...
@@ -78,17 +85,17 @@
android:id=
"@+id/CBRememberMe"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Remember Me"
android:textColor=
"@color/colorPrimary"
android:layout_below=
"@id/FormPasswordLogin"
android:layout_marginVertical=
"10dp"
app:useMaterialThemeColors=
"true"
/>
android:text=
"Remember Me"
android:textColor=
"@color/colorPrimary"
app:useMaterialThemeColors=
"true"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/constraintBtn"
android:layout_width=
"match_parent
"
android:layout_height=
"wrap_cont
ent"
android:layout_below=
"@id/CBRememberMe
"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/constraintBtn"
android:layout_below=
"@id/CBRememberMe
"
android:layout_width=
"match_par
ent"
android:layout_height=
"wrap_content
"
>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/SignInButtonInLogin"
...
...
@@ -129,4 +136,4 @@
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
\ No newline at end of file
</layout>
app/src/main/res/layout/register_form.xml
View file @
269aa124
This diff is collapsed.
Click to expand it.
app/src/main/res/values/strings.xml
View file @
269aa124
...
...
@@ -29,6 +29,7 @@
<string
name=
"open_cart"
>
Open Cart
</string>
<string
name=
"text_new_category"
>
Add New Category
</string>
<string
name=
"email"
>
Email
</string>
<string
name=
"password_Confirmation"
>
Password Confirmation
</string>
<string-array
name=
"planets_array"
>
<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