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
b0435b7d
Commit
b0435b7d
authored
Sep 01, 2020
by
Muhammad Suryono
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
8d183400
041fcb0e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
412 additions
and
82 deletions
+412
-82
FormProductActivity.java
...rc/main/java/com/yono/messeripos/FormProductActivity.java
+16
-21
LoginActivity.java
app/src/main/java/com/yono/messeripos/LoginActivity.java
+178
-57
MainActivity.java
app/src/main/java/com/yono/messeripos/MainActivity.java
+6
-3
gradient.xml
app/src/main/res/drawable/gradient.xml
+1
-1
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
+18
-0
dashboard_login.xml
app/src/main/res/layout/dashboard_login.xml
+69
-0
login_form.xml
app/src/main/res/layout/login_form.xml
+105
-0
colors.xml
app/src/main/res/values/colors.xml
+1
-0
No files found.
app/src/main/java/com/yono/messeripos/FormProductActivity.java
View file @
b0435b7d
...
@@ -181,37 +181,32 @@ public class FormProductActivity extends AppCompatActivity {
...
@@ -181,37 +181,32 @@ public class FormProductActivity extends AppCompatActivity {
@RequiresApi
(
api
=
Build
.
VERSION_CODES
.
N
)
@RequiresApi
(
api
=
Build
.
VERSION_CODES
.
N
)
private
void
setSpinner
(
String
s
)
{
private
void
setSpinner
(
String
s
)
{
progressDialog
.
show
();
HashSet
<
String
>
set
=
new
HashSet
<>();
HashSet
<
String
>
set
=
new
HashSet
<>();
List
<
String
>
str
=
new
ArrayList
<>();
categoryModels
=
new
ArrayList
<>();
categoryModels
=
new
ArrayList
<>();
categoryModels
.
add
(
"SELECT CATEGORY"
);
str
.
add
(
"SELECT CATEGORY"
);
mainViewModels
.
getCategory
().
observe
(
this
,
listDataResponse
->
{
mainViewModels
.
getCategory
().
observe
(
this
,
listDataResponse
->
{
progressDialog
.
dismiss
();
List
<
CategoryModels
>
cate
=
listDataResponse
.
getData
();
for
(
CategoryModels
cd:
listDataResponse
.
getData
()){
for
(
CategoryModels
cd:
cate
){
Log
.
i
(
"SPINNER"
,
"setSpinner: "
+
utils
.
convertGson
(
cd
.
getNameCategory
()));
categoryModels
.
add
(
cd
.
getNameCategory
());
categoryModels
.
add
(
cd
.
getNameCategory
());
}
}
List
<
String
>
collect
=
categoryModels
.
stream
().
map
(
v
->
{
if
(
set
.
add
(
v
)
==
true
)
{
str
.
add
(
v
);
}
return
v
;
}).
collect
(
Collectors
.
toList
());
// Log.i("Spinner data", "onCreate: "+utils.convertGson(categoryModels));
Log
.
i
(
"SPINNER"
,
"setSpinner: "
+
utils
.
convertGson
(
str
));
@SuppressLint
(
"ResourceType"
)
ArrayAdapter
<
String
>
dataAdapter
=
new
ArrayAdapter
<
String
>(
FormProductActivity
.
this
,
R
.
id
.
listCategory
,
str
);
binding
.
listCategory
.
setAdapter
(
dataAdapter
);
});
});
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
(){
private
void
saveProduct
(){
...
...
app/src/main/java/com/yono/messeripos/LoginActivity.java
View file @
b0435b7d
...
@@ -6,16 +6,20 @@ import android.content.SharedPreferences;
...
@@ -6,16 +6,20 @@ import android.content.SharedPreferences;
import
android.os.Build
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.widget.ProgressBar
;
import
android.widget.ProgressBar
;
import
androidx.annotation.NonNull
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.constraintlayout.widget.ConstraintLayout
;
import
androidx.lifecycle.Observer
;
import
androidx.lifecycle.Observer
;
import
androidx.lifecycle.ViewModelProviders
;
import
androidx.lifecycle.ViewModelProviders
;
import
com.google.android.material.bottomsheet.BottomSheetBehavior
;
import
com.google.android.material.button.MaterialButton
;
import
com.google.android.material.button.MaterialButton
;
import
com.google.android.material.snackbar.Snackbar
;
import
com.google.android.material.snackbar.Snackbar
;
import
com.google.android.material.textfield.TextInputEditText
;
import
com.google.android.material.textfield.TextInputEditText
;
...
@@ -33,78 +37,195 @@ public class LoginActivity extends AppCompatActivity {
...
@@ -33,78 +37,195 @@ public class LoginActivity extends AppCompatActivity {
SharedPreferences
sharedPreferences
;
SharedPreferences
sharedPreferences
;
Utils
utils
=
new
Utils
();
Utils
utils
=
new
Utils
();
MaterialButton
btnSignin
;
ConstraintLayout
loginSheetLayout
;
BottomSheetBehavior
sheetBehavior
;
int
height
,
width
;
private
String
TAG
=
"MainActivity"
;
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
dashboard_login
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
Window
w
=
getWindow
();
Window
w
=
getWindow
();
w
.
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
,
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
);
w
.
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
,
WindowManager
.
LayoutParams
.
FLAG_LAYOUT_NO_LIMITS
);
}
}
setContentView
(
R
.
layout
.
activity_login_m
);
// bindUI
username
=
findViewById
(
R
.
id
.
tiUsername
);
btnSignin
=
findViewById
(
R
.
id
.
signInButtonDashboardLogin
);
password
=
findViewById
(
R
.
id
.
tiPassword
);
loginSheetLayout
=
findViewById
(
R
.
id
.
ConstraintLoginLayout
);
btnLogin
=
findViewById
(
R
.
id
.
btnLogin
);
progressBar
=
findViewById
(
R
.
id
.
progressBar
);
// get window height
progressBar
.
setVisibility
(
View
.
GONE
);
DisplayMetrics
displayMetrics
=
new
DisplayMetrics
();
mainViewModels
=
ViewModelProviders
.
of
(
this
).
get
(
MainViewModels
.
class
);
getWindowManager
().
getDefaultDisplay
().
getMetrics
(
displayMetrics
);
height
=
displayMetrics
.
heightPixels
;
width
=
displayMetrics
.
widthPixels
;
int
maxHeight
=
height
-
((
height
*
10
)
/
100
);
loginSheetLayout
.
setMaxHeight
(
maxHeight
);
sharedPreferences
=
getSharedPreferences
(
SplashScreen
.
MY_SHARED_PREFERENCES
,
Context
.
MODE_PRIVATE
);
// get bottom sheets
sheetBehavior
=
BottomSheetBehavior
.
from
(
loginSheetLayout
);
sheetBehavior
.
setDraggable
(
false
);
// button on click
btnSignin
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
if
(
sheetBehavior
.
getState
()
!=
BottomSheetBehavior
.
STATE_EXPANDED
)
{
sheetBehavior
.
setState
(
BottomSheetBehavior
.
STATE_EXPANDED
);
}
else
{
sheetBehavior
.
setState
(
BottomSheetBehavior
.
STATE_COLLAPSED
);
}
}
});
btnLogin
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
/*
* 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()) &&
// 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 != null){
// 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 {
// 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
@Override
public
void
onClick
(
View
v
)
{
public
void
onStateChanged
(
@NonNull
View
bottomSheet
,
int
newState
)
{
Snackbar
snackbar
=
Snackbar
.
make
(
v
,
"Oppss! Wrong Username Or Password!"
,
Snackbar
.
LENGTH_LONG
);
switch
(
newState
)
{
case
BottomSheetBehavior
.
STATE_HIDDEN
:
if
(
TextUtils
.
isEmpty
(
username
.
getText
().
toString
())
&&
case
BottomSheetBehavior
.
STATE_DRAGGING
:
TextUtils
.
isEmpty
(
password
.
getText
().
toString
())){
case
BottomSheetBehavior
.
STATE_SETTLING
:
username
.
setError
(
"This field can't empty"
);
break
;
password
.
setError
(
"This field can't empty"
);
case
BottomSheetBehavior
.
STATE_EXPANDED
:
{
}
else
if
(
TextUtils
.
isEmpty
(
username
.
getText
().
toString
())){
username
.
setError
(
"This field can't empty"
);
Log
.
d
(
TAG
,
"onStateChanged: expanded"
);
}
else
if
(
TextUtils
.
isEmpty
(
password
.
getText
().
toString
())){
}
password
.
setError
(
"This field can't empty"
);
break
;
}
else
{
case
BottomSheetBehavior
.
STATE_COLLAPSED
:
{
progressBar
.
setVisibility
(
View
.
VISIBLE
);
Log
.
d
(
TAG
,
"onStateChanged: collapsed"
);
username
.
setEnabled
(
false
);
}
password
.
setEnabled
(
false
);
break
;
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
!=
null
){
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
{
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
();
}
}
});
}
}
}
}
@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);
// }
//
// }
// });
// }
// }
// });
}
}
}
}
\ No newline at end of file
app/src/main/java/com/yono/messeripos/MainActivity.java
View file @
b0435b7d
...
@@ -390,7 +390,6 @@ public class MainActivity extends AppCompatActivity {
...
@@ -390,7 +390,6 @@ public class MainActivity extends AppCompatActivity {
categoryAdapter
.
setListener
(
new
CategoryAdapter
.
CategoryListener
()
{
categoryAdapter
.
setListener
(
new
CategoryAdapter
.
CategoryListener
()
{
@Override
@Override
public
void
onGetProduct
(
CategoryModels
categoryModels
)
{
public
void
onGetProduct
(
CategoryModels
categoryModels
)
{
progressDialog
.
show
();
Log
.
i
(
"diluar if"
,
"onGetProduct: "
+
selectCategory
);
Log
.
i
(
"diluar if"
,
"onGetProduct: "
+
selectCategory
);
if
(!
selectCategory
){
if
(!
selectCategory
){
binding
.
rvProduct
.
setVisibility
(
View
.
GONE
);
binding
.
rvProduct
.
setVisibility
(
View
.
GONE
);
...
@@ -400,14 +399,16 @@ public class MainActivity extends AppCompatActivity {
...
@@ -400,14 +399,16 @@ public class MainActivity extends AppCompatActivity {
Log
.
i
(
"setelah if"
,
"onGetProduct: "
+
selectCategory
);
Log
.
i
(
"setelah if"
,
"onGetProduct: "
+
selectCategory
);
if
(
categoryModels
.
getIdCategory
()
==
0
){
if
(
categoryModels
.
getIdCategory
()
==
0
){
progressDialog
.
show
();
if
(
mainViewModels
.
getProduct
().
getValue
().
getData
().
size
()
!=
0
){
if
(
mainViewModels
.
getProduct
().
getValue
().
getData
().
size
()
!=
0
){
selectCategory
=
false
;
selectCategory
=
false
;
mainViewModels
.
getProduct
().
observe
(
MainActivity
.
this
,
new
Observer
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>()
{
mainViewModels
.
getProduct
().
observe
(
MainActivity
.
this
,
new
Observer
<
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>>()
{
@Override
@Override
public
void
onChanged
(
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>
listDataResponse
)
{
public
void
onChanged
(
DataResponse
<
List
<
ProductModels
<
CategoryModels
>>>
listDataResponse
)
{
progressDialog
.
dismiss
();
productModelsArrayList
.
clear
();
productModelsArrayList
.
clear
();
productModelsArrayList
.
addAll
(
listDataResponse
.
getData
());
productModelsArrayList
.
addAll
(
listDataResponse
.
getData
());
progressDialog
.
dismiss
();
binding
.
rvProduct
.
setVisibility
(
View
.
VISIBLE
);
binding
.
rvProduct
.
setVisibility
(
View
.
VISIBLE
);
binding
.
imgEmpty
.
setVisibility
(
View
.
GONE
);
binding
.
imgEmpty
.
setVisibility
(
View
.
GONE
);
productAdapter
.
setProduct
(
MainActivity
.
this
,
productModelsArrayList
);
productAdapter
.
setProduct
(
MainActivity
.
this
,
productModelsArrayList
);
...
@@ -422,14 +423,16 @@ public class MainActivity extends AppCompatActivity {
...
@@ -422,14 +423,16 @@ public class MainActivity extends AppCompatActivity {
// binding.imgEmpty.bringToFront();
// binding.imgEmpty.bringToFront();
}
}
}
else
{
}
else
{
progressDialog
.
show
();
selectCategory
=
false
;
selectCategory
=
false
;
mainViewModels
.
getProductByCategory
(
categoryModels
.
getIdCategory
()).
observe
(
MainActivity
.
this
,
new
Observer
<
DataResponse
<
List
<
ProductModels
>>>()
{
mainViewModels
.
getProductByCategory
(
categoryModels
.
getIdCategory
()).
observe
(
MainActivity
.
this
,
new
Observer
<
DataResponse
<
List
<
ProductModels
>>>()
{
@Override
@Override
public
void
onChanged
(
DataResponse
<
List
<
ProductModels
>>
listDataResponse
)
{
public
void
onChanged
(
DataResponse
<
List
<
ProductModels
>>
listDataResponse
)
{
progressDialog
.
dismiss
();
if
(
listDataResponse
!=
null
)
{
if
(
listDataResponse
!=
null
)
{
productModelsArrayList
.
clear
();
productModelsArrayList
.
clear
();
productModelsArrayList
.
addAll
(
listDataResponse
.
getData
());
productModelsArrayList
.
addAll
(
listDataResponse
.
getData
());
progressDialog
.
dismiss
();
showLoading
(
false
);
showLoading
(
false
);
if
(
productModelsArrayList
.
isEmpty
())
{
if
(
productModelsArrayList
.
isEmpty
())
{
binding
.
rvProduct
.
setVisibility
(
View
.
GONE
);
binding
.
rvProduct
.
setVisibility
(
View
.
GONE
);
...
...
app/src/main/res/drawable/gradient.xml
View file @
b0435b7d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<item>
<shape>
<shape>
<gradient
android:startColor=
"@color/colorPrimary"
android:
endColor=
"@color/colorPrimaryDark"
android:angle=
"90
"
/>
<gradient
android:startColor=
"@color/colorPrimary"
android:
centerColor=
"@color/colorPrimaryCenter"
android:endColor=
"@color/colorPrimaryDark"
android:angle=
"-90"
android:centerY=
"0.7
"
/>
</shape>
</shape>
</item>
</item>
</selector>
</selector>
\ No newline at end of file
app/src/main/res/drawable/ic_messer_primary.xml
0 → 100644
View file @
b0435b7d
<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_white.xml
0 → 100644
View file @
b0435b7d
<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=
"#fff"
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=
"#fff"
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=
"#fff"
android:fillAlpha=
"0.87"
/>
</vector>
app/src/main/res/layout/dashboard_login.xml
0 → 100644
View file @
b0435b7d
<?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"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingHorizontal=
"20dp"
android:paddingVertical=
"25dp"
>
<ImageView
android:id=
"@+id/messerLogoDashboardLogin"
android:layout_width=
"215dp"
android:layout_height=
"215dp"
android:src=
"@drawable/ic_messer_white"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"50dp"
/>
<com.google.android.material.textview.MaterialTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"messer"
android:textSize=
"30dp"
android:fontFamily=
"@font/poppins_bold"
android:textStyle=
"bold"
android:textColor=
"@color/colorWhite"
android:layout_below=
"@id/messerLogoDashboardLogin"
android:layout_centerHorizontal=
"true"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/signUpButtonDashboardLogin"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
style=
"?attr/materialButtonOutlinedStyle"
app:strokeColor=
"#fff"
android:text=
"sign up"
android:textStyle=
"bold"
android:textColor=
"#fff"
app:strokeWidth=
"2dp"
app:rippleColor=
"@color/colorWhite"
android:padding=
"20dp"
app:cornerRadius=
"5dp"
android:layout_above=
"@id/signInButtonDashboardLogin"
android:layout_marginBottom=
"10dp"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/signInButtonDashboardLogin"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:backgroundTint=
"@color/colorWhite"
android:layout_alignParentBottom=
"true"
android:padding=
"20dp"
android:text=
"sign in"
android:textStyle=
"bold"
app:rippleColor=
"#A8A8A8"
app:cornerRadius=
"5dp"
android:textColor=
"@color/colorPrimary"
/>
</RelativeLayout>
<include
layout=
"@layout/login_form"
/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
app/src/main/res/layout/login_form.xml
0 → 100644
View file @
b0435b7d
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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"
android:layout_gravity=
"bottom"
app:behavior_hideable=
"false"
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"
>
<ImageButton
android:id=
"@+id/closeBtnLogin"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:src=
"@drawable/ic_baseline_plus_24"
android:scaleType=
"centerInside"
android:adjustViewBounds=
"true"
android:padding=
"50dp"
android:backgroundTint=
"@android:color/transparent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintStart_toStartOf=
"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/closeBtnLogin"
/>
<com.google.android.material.textfield.TextInputLayout
android:id=
"@+id/formUsernameLogin"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/username"
app:layout_constraintTop_toBottomOf=
"@id/messerLogoInLogin"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
<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"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/password"
app:layout_constraintTop_toBottomOf=
"@id/formUsernameLogin"
style=
"@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
>
<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_constraintTop_toBottomOf=
"@id/FormPasswordLogin"
app:layout_constraintStart_toStartOf=
"parent"
app:useMaterialThemeColors=
"true"
/>
<com.google.android.material.button.MaterialButton
android:id=
"@+id/SignInButtonInLogin"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toBottomOf=
"@id/CBRememberMe"
android:text=
"Sign In"
android:padding=
"20dp"
/>
<com.google.android.material.textview.MaterialTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Forgot Password?"
app:layout_constraintTop_toBottomOf=
"@id/SignInButtonInLogin"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_marginTop=
"10dp"
android:textColor=
"@color/colorPrimary"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/values/colors.xml
View file @
b0435b7d
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources>
<color
name=
"colorPrimary"
>
#4d089a
</color>
<color
name=
"colorPrimary"
>
#4d089a
</color>
<color
name=
"colorPrimaryCenter"
>
#4021B9
</color>
<color
name=
"colorPrimaryDark"
>
#323edd
</color>
<color
name=
"colorPrimaryDark"
>
#323edd
</color>
<color
name=
"colorAccent"
>
#dc2ade
</color>
<color
name=
"colorAccent"
>
#dc2ade
</color>
<color
name=
"colorAccentDark"
>
#e8f044
</color>
<color
name=
"colorAccentDark"
>
#e8f044
</color>
...
...
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