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
0499afd4
Commit
0499afd4
authored
Sep 01, 2020
by
Alfansyah Fadlian
Browse files
Options
Browse Files
Download
Plain Diff
fixed layout register & login bottomsheet
parents
b0babb54
487b7b4b
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
521 additions
and
235 deletions
+521
-235
FormProductActivity.java
...rc/main/java/com/yono/messeripos/FormProductActivity.java
+23
-5
LoginActivity.java
app/src/main/java/com/yono/messeripos/LoginActivity.java
+151
-13
Utils.java
app/src/main/java/com/yono/messeripos/utils/Utils.java
+7
-0
ic_messer_primary.xml
app/src/main/res/drawable/ic_messer_primary.xml
+18
-0
ic_messer_white.xml
app/src/main/res/drawable/ic_messer_white.xml
+0
-0
dashboard_login.xml
app/src/main/res/layout/dashboard_login.xml
+6
-5
layout_login.xml
app/src/main/res/layout/layout_login.xml
+0
-6
layout_register.xml
app/src/main/res/layout/layout_register.xml
+0
-206
login_form.xml
app/src/main/res/layout/login_form.xml
+105
-0
register_form.xml
app/src/main/res/layout/register_form.xml
+211
-0
No files found.
app/src/main/java/com/yono/messeripos/FormProductActivity.java
View file @
0499afd4
...
...
@@ -44,7 +44,9 @@ import java.io.File;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
retrofit2.Call
;
import
retrofit2.Callback
;
...
...
@@ -177,7 +179,9 @@ public class FormProductActivity extends AppCompatActivity {
});
}
@RequiresApi
(
api
=
Build
.
VERSION_CODES
.
N
)
private
void
setSpinner
(
String
s
)
{
HashSet
<
String
>
set
=
new
HashSet
<>();
categoryModels
=
new
ArrayList
<>();
categoryModels
.
add
(
"SELECT CATEGORY"
);
mainViewModels
.
getCategory
().
observe
(
this
,
listDataResponse
->
{
...
...
@@ -185,15 +189,29 @@ public class FormProductActivity extends AppCompatActivity {
List
<
CategoryModels
>
cate
=
listDataResponse
.
getData
();
for
(
CategoryModels
cd:
cate
){
Log
.
i
(
"SPINNER"
,
"setSpinner: "
+
utils
.
convertGson
(
cd
.
getNameCategory
()));
categoryModels
.
add
(
cd
.
getNameCategory
());
}
// Log.i("Spinner data", "onCreate: "+utils.convertGson(categoryModels));
});
List
<
HashSet
<
String
>>
collect
=
categoryModels
.
stream
().
map
(
v
->
{
if
(
set
.
add
(
v
)
==
true
)
{
set
.
add
(
v
);
}
return
set
;
}).
collect
(
Collectors
.
toList
());
Log
.
i
(
"SPINNER"
,
"setSpinner: "
+
utils
.
convertGson
(
collect
));
@SuppressLint
(
"ResourceType"
)
ArrayAdapter
<
String
>
dataAdapter
=
new
ArrayAdapter
<
String
>(
FormProductActivity
.
this
,
R
.
id
.
listCategory
,
categoryModels
);
binding
.
listCategory
.
setAdapter
(
dataAdapter
);
progressDialog
.
dismiss
();
});
}
private
void
saveProduct
(){
...
...
app/src/main/java/com/yono/messeripos/LoginActivity.java
View file @
0499afd4
...
...
@@ -6,22 +6,27 @@ import android.content.SharedPreferences;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.ProgressBar
;
import
androidx.annotation.NonNull
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.constraintlayout.widget.ConstraintLayout
;
import
androidx.lifecycle.Observer
;
import
androidx.lifecycle.ViewModelProviders
;
import
com.google.android.material.bottomsheet.BottomSheetBehavior
;
import
com.google.android.material.button.MaterialButton
;
import
com.google.android.material.snackbar.Snackbar
;
import
com.google.android.material.textfield.TextInputEditText
;
import
com.yono.messeripos.models.MainViewModels
;
import
com.yono.messeripos.models.UsersModels
;
import
com.yono.messeripos.response.DataResponse
;
import
com.yono.messeripos.utils.Utils
;
public
class
LoginActivity
extends
AppCompatActivity
{
...
...
@@ -30,30 +35,72 @@ public class LoginActivity extends AppCompatActivity {
MainViewModels
mainViewModels
;
ProgressBar
progressBar
;
SharedPreferences
sharedPreferences
;
Utils
utils
=
new
Utils
();
MaterialButton
btnSignup
,
btnSignIn
;
ConstraintLayout
loginSheetLayout
,
registerSheetLayout
;
BottomSheetBehavior
sheetBehavior
,
sheetBehavior2
;
int
height
,
width
;
private
String
TAG
=
"MainActivity"
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
dashboard_login
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
Window
w
=
getWindow
();
w
.
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
,
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
);
}
// bindUI
btnSignIn
=
findViewById
(
R
.
id
.
signInButtonDashboardLogin
);
loginSheetLayout
=
findViewById
(
R
.
id
.
ConstraintLoginLayout
);
btnSignup
=
findViewById
(
R
.
id
.
signUpButtonDashboardLogin
);
registerSheetLayout
=
findViewById
(
R
.
id
.
ConstraintRegisterLayout
);
// get window height
DisplayMetrics
displayMetrics
=
new
DisplayMetrics
();
getWindowManager
().
getDefaultDisplay
().
getMetrics
(
displayMetrics
);
height
=
displayMetrics
.
heightPixels
;
width
=
displayMetrics
.
widthPixels
;
setContentView
(
R
.
layout
.
activity_login_m
);
username
=
findViewById
(
R
.
id
.
tiUsername
);
password
=
findViewById
(
R
.
id
.
tiPassword
);
btnLogin
=
findViewById
(
R
.
id
.
btnLogin
);
progressBar
=
findViewById
(
R
.
id
.
progressBar
);
progressBar
.
setVisibility
(
View
.
GONE
);
mainViewModels
=
ViewModelProviders
.
of
(
this
).
get
(
MainViewModels
.
class
);
// get bottom sheets
sheetBehavior
=
BottomSheetBehavior
.
from
(
loginSheetLayout
);
sheetBehavior2
=
BottomSheetBehavior
.
from
(
registerSheetLayout
);
// button on click to form login
btnSignIn
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
if
(
sheetBehavior
.
getState
()
!=
BottomSheetBehavior
.
STATE_EXPANDED
)
{
sheetBehavior
.
setState
(
BottomSheetBehavior
.
STATE_EXPANDED
);
loginSheetLayout
.
setMaxHeight
(
height
-
100
);
}
else
{
sheetBehavior
.
setState
(
BottomSheetBehavior
.
STATE_COLLAPSED
);
}
}
});
sharedPreferences
=
getSharedPreferences
(
SplashScreen
.
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
btnLogin
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
//button on click to form register
btnSignup
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
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
);
}
}
});
/*
* LOGIN LOGIKA DIBAWAH INI
* */
//<<<<<<< HEAD
// public void onClick(View v) {
// Snackbar snackbar = Snackbar.make(v, "Oppss! Wrong Username Or Password!", Snackbar.LENGTH_LONG);
//
// if (TextUtils.isEmpty(username.getText().toString()) &&
...
...
@@ -76,6 +123,7 @@ public class LoginActivity extends AppCompatActivity {
// public void onChanged(DataResponse<UsersModels> usersModelsDataResponse) {
// Log.d("Status", usersModelsDataResponse.getMessageData());
//
// if (usersModelsDataResponse != null){
// if (usersModelsDataResponse.getStatusData()){
// SharedPreferences.Editor editor = sharedPreferences.edit();
// editor.putBoolean(SplashScreen.SESSION, true);
...
...
@@ -88,18 +136,108 @@ public class LoginActivity extends AppCompatActivity {
// password.setEnabled(true);
// btnLogin.setEnabled(true);
// }else {
//
snackbar
.show();
//
utils.snackBar(v,"Oppss! Wrong Username Or Password!")
.show();
// progressBar.setVisibility(View.GONE);
// username.setEnabled(true);
// password.setEnabled(true);
// btnLogin.setEnabled(true);
// }
// }else{
// utils.snackBar(v, "Oppss! ログイン中にエラーが発生しました。しばらくしてからもう一度お試しください").show();
// }
//
// }
// });
// }
//=======
// set Callback
sheetBehavior
.
setBottomSheetCallback
(
new
BottomSheetBehavior
.
BottomSheetCallback
()
{
@Override
public
void
onStateChanged
(
@NonNull
View
bottomSheet
,
int
newState
)
{
switch
(
newState
)
{
case
BottomSheetBehavior
.
STATE_HIDDEN
:
case
BottomSheetBehavior
.
STATE_DRAGGING
:
case
BottomSheetBehavior
.
STATE_SETTLING
:
break
;
case
BottomSheetBehavior
.
STATE_EXPANDED
:
{
Log
.
d
(
TAG
,
"onStateChanged: expanded"
);
}
break
;
case
BottomSheetBehavior
.
STATE_COLLAPSED
:
{
Log
.
d
(
TAG
,
"onStateChanged: collapsed"
);
}
break
;
}
}
@Override
public
void
onSlide
(
@NonNull
View
bottomSheet
,
float
slideOffset
)
{
}
});
//
// setContentView(R.layout.activity_login_m);
// username = findViewById(R.id.tiUsername);
// password = findViewById(R.id.tiPassword);
// btnLogin = findViewById(R.id.btnLogin);
// progressBar = findViewById(R.id.progressBar);
// progressBar.setVisibility(View.GONE);
// mainViewModels = ViewModelProviders.of(this).get(MainViewModels.class);
//
// sharedPreferences = getSharedPreferences(SplashScreen.MY_SHARED_PREFERENCES, Context.MODE_PRIVATE);
//
// btnLogin.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Snackbar snackbar = Snackbar.make(v, "Oppss! Wrong Username Or Password!", Snackbar.LENGTH_LONG);
//
// if (TextUtils.isEmpty(username.getText().toString()) &&
// TextUtils.isEmpty(password.getText().toString())){
// username.setError("This field can't empty");
// password.setError("This field can't empty");
// }else if (TextUtils.isEmpty(username.getText().toString())){
// username.setError("This field can't empty");
// }else if (TextUtils.isEmpty(password.getText().toString())){
// password.setError("This field can't empty");
// }else{
// progressBar.setVisibility(View.VISIBLE);
// username.setEnabled(false);
// password.setEnabled(false);
// btnLogin.setEnabled(false);
//
// mainViewModels.checkLogin(new UsersModels(username.getText().toString(),
// password.getText().toString())).observe(LoginActivity.this, new Observer<DataResponse<UsersModels>>() {
// @Override
// public void onChanged(DataResponse<UsersModels> usersModelsDataResponse) {
// Log.d("Status", usersModelsDataResponse.getMessageData());
//
// if (usersModelsDataResponse.getStatusData()){
// SharedPreferences.Editor editor = sharedPreferences.edit();
// editor.putBoolean(SplashScreen.SESSION, true);
// editor.commit();
//
// startActivity(new Intent(LoginActivity.this, MainActivity.class));
//
// progressBar.setVisibility(View.GONE);
// username.setEnabled(true);
// password.setEnabled(true);
// btnLogin.setEnabled(true);
// }else {
// snackbar.show();
// progressBar.setVisibility(View.GONE);
// username.setEnabled(true);
// password.setEnabled(true);
// btnLogin.setEnabled(true);
// }
//
// }
// });
// }
// }
// });
}
}
app/src/main/java/com/yono/messeripos/utils/Utils.java
View file @
0499afd4
...
...
@@ -7,12 +7,14 @@ import android.graphics.BitmapFactory;
import
android.os.Build
;
import
android.util.Base64
;
import
android.util.Log
;
import
android.view.View
;
import
android.widget.Toast
;
import
androidx.annotation.RequiresApi
;
import
androidx.recyclerview.widget.DividerItemDecoration
;
import
com.bumptech.glide.load.engine.Resource
;
import
com.google.android.material.snackbar.Snackbar
;
import
com.google.gson.Gson
;
import
java.io.ByteArrayOutputStream
;
...
...
@@ -162,4 +164,9 @@ public class Utils {
return
inSampleSize
;
}
public
Snackbar
snackBar
(
View
v
,
String
message
){
Snackbar
snackbar
=
Snackbar
.
make
(
v
,
message
,
Snackbar
.
LENGTH_LONG
);
return
snackbar
;
}
}
app/src/main/res/drawable/ic_messer_primary.xml
0 → 100644
View file @
0499afd4
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"64dp"
android:height=
"43dp"
android:viewportWidth=
"64"
android:viewportHeight=
"43"
>
<path
android:pathData=
"M8.5,36.682C13.1944,36.682 17,32.8764 17,28.182C17,23.4876 13.1944,19.682 8.5,19.682C3.8056,19.682 0,23.4876 0,28.182C0,32.8764 3.8056,36.682 8.5,36.682Z"
android:fillColor=
"@color/colorPrimary"
android:fillAlpha=
"0.87"
/>
<path
android:pathData=
"M59.6642,27.3332L40.9464,5.0349C38.6122,2.2542 34.4658,1.8922 31.6851,4.2264C28.9044,6.5606 28.5424,10.7071 30.8766,13.4878L49.5943,35.7861C51.9285,38.5668 56.075,38.9287 58.8557,36.5945C61.6364,34.2603 61.9984,30.1139 59.6642,27.3332Z"
android:fillColor=
"@color/colorPrimary"
android:fillAlpha=
"0.87"
/>
<path
android:pathData=
"M40.2832,29.2722L21.5654,6.9739C19.2312,4.1932 15.0848,3.8312 12.3041,6.1654C9.5234,8.4996 9.1614,12.6461 11.4956,15.4268L30.2133,37.7251C32.5475,40.5058 36.694,40.8677 39.4747,38.5335C42.2554,36.1993 42.6174,32.0529 40.2832,29.2722Z"
android:fillColor=
"@color/colorPrimary"
android:fillAlpha=
"0.87"
/>
</vector>
app/src/main/res/drawable/ic_messer_
login
.xml
→
app/src/main/res/drawable/ic_messer_
white
.xml
View file @
0499afd4
File moved
app/src/main/res/layout/dashboard_login.xml
View file @
0499afd4
...
...
@@ -16,8 +16,8 @@
<ImageView
android:id=
"@+id/messerLogoDashboardLogin"
android:layout_width=
"215dp"
android:layout_height=
"21
3
dp"
android:src=
"@drawable/ic_messer_
login
"
android:layout_height=
"21
5
dp"
android:src=
"@drawable/ic_messer_
white
"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"50dp"
/>
...
...
@@ -61,12 +61,13 @@
app:rippleColor=
"#A8A8A8"
app:cornerRadius=
"5dp"
android:textColor=
"@color/colorPrimary"
/>
</RelativeLayout>
<include
layout=
"@layout/login_form"
/>
<include
layout=
"@layout/register_form"
/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
app/src/main/res/layout/layout_login.xml
deleted
100644 → 0
View file @
b0babb54
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/layout_register.xml
deleted
100644 → 0
View file @
b0babb54
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
android:paddingTop=
"10dp"
tools:context=
".LoginActivity"
>
<ImageButton
android:id=
"@+id/ivclose"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/ic_close"
android:padding=
"10dp"
android:backgroundTint=
"@color/colorPrimary"
app:layout_constraintStart_toStartOf=
"parent"
tools:ignore=
"MissingConstraints"
/>
<ImageView
android:id=
"@+id/ivLogin"
android:layout_width=
"150dp"
android:layout_height=
"150dp"
android:src=
"@drawable/ic_meser"
app:layout_constraintBottom_toBottomOf=
"parent"
android:background=
"@color/colorPrimary"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/ivclose"
app:layout_constraintVertical_bias=
"0.0"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvLoginToAcc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Create Your Account"
android:textColor=
"@color/colorPrimary"
android:textFontWeight=
"600"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.116"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/ivLogin"
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"
app:cardElevation=
"0dp"
android:backgroundTint=
"@android:color/transparent"
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
android:id=
"@+id/tfUsername"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/username"
android:textColorHint=
"@color/colorPrimary"
app:hintTextColor=
"@color/colorPrimary"
app:boxStrokeColor=
"@color/colorPrimary"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiUsername"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:textColor=
"@color/colorPrimary"
android:inputType=
"text"
android:imeOptions=
"actionNext"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfEmail"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/email"
android:textColorHint=
"@color/colorPrimary"
app:hintTextColor=
"@color/colorPrimary"
app:boxStrokeColor=
"@color/colorPrimary"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tfUsername"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiEmail"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:textColor=
"@color/colorPrimary"
android:inputType=
"textPassword"
android:imeOptions=
"actionGo"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfPassword"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/password"
android:textColorHint=
"@color/colorPrimary"
app:hintTextColor=
"@color/colorPrimary"
app:boxStrokeColor=
"@color/colorPrimary"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tfEmail"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiPassword"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:textColor=
"@color/colorPrimary"
android:inputType=
"textPassword"
android:imeOptions=
"actionGo"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfRePassword"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/password"
android:textColorHint=
"@color/colorPrimary"
app:hintTextColor=
"@color/colorPrimary"
app:boxStrokeColor=
"@color/colorPrimary"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tfPassword"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiRePassword"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:textColor=
"@color/colorPrimary"
android:inputType=
"textPassword"
android:imeOptions=
"actionGo"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnLogin"
android:layout_width=
"match_parent"
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/tfRePassword"
app:layout_constraintVertical_bias=
"0.01999998"
/>
<ProgressBar
android:id=
"@+id/progressBar"
style=
"?android:attr/progressBarStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:elevation=
"2dp"
tools:layout_editor_absoluteX=
"64dp"
tools:layout_editor_absoluteY=
"337dp"
app:layout_constraintTop_toTopOf=
"@id/btnLogin"
app:layout_constraintBottom_toBottomOf=
"@id/btnLogin"
app:layout_constraintStart_toStartOf=
"@id/btnLogin"
app:layout_constraintEnd_toEndOf=
"@id/btnLogin"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/login_form.xml
0 → 100644
View file @
0499afd4
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/ConstraintLoginLayout"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
app:behavior_hideable=
"true"
android:padding=
"20dp"
style=
"@style/Widget.Rounded.BottomSheet"
app:behavior_peekHeight=
"0dp"
android:background=
"@color/colorWhite"
app:layout_behavior=
"com.google.android.material.bottomsheet.BottomSheetBehavior"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<ImageButton
android:id=
"@+id/ivclose"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:adjustViewBounds=
"true"
android:backgroundTint=
"@android:color/transparent"
android:padding=
"50dp"
android:scaleType=
"centerInside"
android:src=
"@drawable/ic_close"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/messerLogoInLogin"
android:layout_width=
"215dp"
android:layout_height=
"215dp"
android:src=
"@drawable/ic_messer_primary"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ivclose"
/>
<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"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/messerLogoInLogin"
>
<com.google.android.material.textfield.TextInputEditText
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</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"
app:layout_constraintTop_toBottomOf=
"@id/formUsernameLogin"
>
<com.google.android.material.textfield.TextInputEditText
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id=
"@+id/CBRememberMe"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Remember Me"
android:textColor=
"@color/colorPrimary"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/FormPasswordLogin"
app:useMaterialThemeColors=
"true"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/SignInButtonInLogin"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:padding=
"20dp"
android:text=
"Sign In"
app:layout_constraintTop_toBottomOf=
"@id/CBRememberMe"
/>
<com.google.android.material.textview.MaterialTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:text=
"Forgot Password?"
android:textColor=
"@color/colorPrimary"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/SignInButtonInLogin"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/register_form.xml
0 → 100644
View file @
0499afd4
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/ConstraintRegisterLayout"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:fitsSystemWindows=
"true"
android:paddingTop=
"10dp"
android:orientation=
"vertical"
app:behavior_peekHeight=
"0dp"
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_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
android:id=
"@+id/ivclose"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:adjustViewBounds=
"true"
android:backgroundTint=
"@android:color/transparent"
android:padding=
"10dp"
android:src=
"@drawable/ic_close"
app:layout_constraintStart_toStartOf=
"parent"
tools:ignore=
"MissingConstraints"
/>
<ImageView
android:id=
"@+id/ivMeserRegister"
android:layout_width=
"150dp"
android:layout_height=
"150dp"
android:src=
"@drawable/ic_messer_primary"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/ivclose"
app:layout_constraintVertical_bias=
"0.0"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/tvLoginToAcc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Create Your Account"
android:textColor=
"@color/colorPrimary"
android:textFontWeight=
"600"
android:textSize=
"16sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
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
android:id=
"@+id/tfUsername"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/username"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiUsername"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionNext"
android:inputType=
"text"
android:textColor=
"@color/colorPrimary"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfEmail"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/email"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tfUsername"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiEmail"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionGo"
android:inputType=
"textEmailAddress"
android:textColor=
"@color/colorPrimary"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfPassword"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/password"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tfEmail"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiPassword"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionGo"
android:inputType=
"textPassword"
android:textColor=
"@color/colorPrimary"
/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/tfRePassword"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginVertical=
"5dp"
android:hint=
"@string/password"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tfPassword"
app:layout_constraintVertical_bias=
"0.0"
>
<com.google.android.material.textfield.TextInputEditText
android:id=
"@+id/tiRePassword"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:imeOptions=
"actionGo"
android:inputType=
"textPassword"
android:textColor=
"@color/colorPrimary"
/>
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id=
"@+id/cbAgree"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"I Agree to terms of use"
android:textColor=
"@color/colorPrimary"
android:fontFamily=
"@font/poppins_medium"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tfRePassword"
app:useMaterialThemeColors=
"true"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/btnLogin"
android:layout_width=
"match_parent"
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_constraintVertical_bias=
"0.01999998"
/>
<ProgressBar
android:id=
"@+id/progressBar"
style=
"?android:attr/progressBarStyle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:elevation=
"2dp"
app:layout_constraintBottom_toBottomOf=
"@id/btnLogin"
app:layout_constraintEnd_toEndOf=
"@id/btnLogin"
app:layout_constraintStart_toStartOf=
"@id/btnLogin"
app:layout_constraintTop_toTopOf=
"@id/btnLogin"
tools:layout_editor_absoluteX=
"64dp"
tools:layout_editor_absoluteY=
"337dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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