Commit 6a44ae1a authored by Muhammad Suryono's avatar Muhammad Suryono

merge with cart

parents ab90d286 fa9278fd
......@@ -281,4 +281,11 @@ public class CartActivity extends AppCompatActivity {
}
super.onBackPressed();
}
}
\ No newline at end of file
}
/**
* Bug ketika qty kurang dari stock masih bertambah
*
*/
\ No newline at end of file
......@@ -31,10 +31,8 @@ import com.yono.messeripos.utils.Utils;
public class LoginActivity extends AppCompatActivity {
TextInputEditText username, password;
MainViewModels mainViewModels;
SharedPreferences sharedPreferences;
Utils utils = new Utils();
//State
LoginState loginState;
......@@ -42,9 +40,6 @@ public class LoginActivity extends AppCompatActivity {
MaterialButton btnSignin;
MaterialButton btnSignup, btnSignIn;
ConstraintLayout loginSheetLayout, registerSheetLayout;
int height, width;
ImageButton closeBtn;
private String TAG = "MainActivity";
......@@ -110,7 +105,6 @@ public class LoginActivity extends AppCompatActivity {
@Override
public void onClick(View view) {
registerState = new RegisterState(LoginActivity.this,mainViewModels);
registerState.setCancelable(false);
registerState.show(getSupportFragmentManager(),registerState.getTag());
}
});
......
package com.yono.messeripos;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
......@@ -18,7 +20,6 @@ import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.Observer;
......@@ -30,6 +31,7 @@ import com.google.android.material.button.MaterialButton;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputEditText;
import com.yono.messeripos.models.CategoryModels;
import com.yono.messeripos.models.MainViewModels;
import com.yono.messeripos.models.UsersModels;
import com.yono.messeripos.response.DataResponse;
......@@ -50,7 +52,7 @@ public class LoginState extends BottomSheetDialogFragment {
SharedPreferences sharedPreferences;
Utils utils;
ProgressBar bar;
AlertDialog alertDialog;
AlertDialog.Builder builder;
ProgressDialog dialog;
......@@ -59,7 +61,6 @@ public class LoginState extends BottomSheetDialogFragment {
this.mainViewModels = mainViewModels;
}
@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
......@@ -93,34 +94,17 @@ public class LoginState extends BottomSheetDialogFragment {
sheetBehavior = BottomSheetBehavior.from((View) (view.getParent()));
// get Window size
int getHeight = Resources.getSystem().getDisplayMetrics().heightPixels;
int setHeight = getHeight - (getHeight * 5) / 100;
int setHeight = utils.getWindowHeight() - (utils.getWindowHeight() * 5) / 100;
// set max height
sheetBehavior.setPeekHeight(setHeight);
loginLayout.setMinimumHeight(setHeight);
// alert dialog buat nampilin error
alertDialog = new AlertDialog.Builder(context)
.setTitle("Username dan Password Salah")
.setMessage("Oppss! Username dan Password yang kamu masukan salah!")
.setPositiveButton("Coba Lagi", null)
.setCancelable(false)
.create();
loginButton.setOnClickListener(view1 -> {
if (sheetBehavior.getState() != BottomSheetBehavior.STATE_EXPANDED) {
bar.setVisibility(View.VISIBLE);
loginButton.setText("");
sheetDialog.setCancelable(false);
loginAuth(view1);
}
});
// loginButton on click
loginButton.setOnClickListener(this::loginAuth);
// close btn is clicked
closeBtn.setOnClickListener(view12 -> {
Log.d(TAG, "onCreateDialog: "+sheetBehavior.getState());
sheetDialog.dismiss();
});
......@@ -128,7 +112,6 @@ public class LoginState extends BottomSheetDialogFragment {
}
private void loginAuth(View v) {
if (TextUtils.isEmpty(username.getText().toString()) &&
TextUtils.isEmpty(password.getText().toString())){
username.setError("This field can't empty");
......@@ -140,14 +123,12 @@ public class LoginState extends BottomSheetDialogFragment {
}else{
/**
* Jika tombol sign in ditekan
*/
// aktifkan progress bar
*
* nonaktifkan semua form */
bar.setVisibility(View.VISIBLE);
// hilangkan tulisan di button
loginButton.setText("");
sheetDialog.setCancelable(false);
// nonaktifkan semua form
username.setEnabled(false);
password.setEnabled(false);
loginButton.setEnabled(false);
......@@ -156,61 +137,69 @@ public class LoginState extends BottomSheetDialogFragment {
// buat checking login
mainViewModels.checkLogin(new UsersModels(username.getText().toString(),
password.getText().toString()))
.observe((LifecycleOwner) context, new Observer<DataResponse<UsersModels>>() {
@Override
public void onChanged(DataResponse<UsersModels> usersModelsDataResponse) {
if (usersModelsDataResponse != null) {
/**
* Jika response atau data ada dan cocok
*/
if (usersModelsDataResponse.getStatusData()) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(SplashScreen.SESSION, true);
if(editor.commit()){
startActivity(new Intent(context, MainActivity.class));
}
// redirect ke home
// set progress bar jadi nonaktif
bar.setVisibility(View.GONE);
// munculkan tulisan default di button sign in
loginButton.setText(DEFAULT_LOGIN_NAME);
.observe((LifecycleOwner) context, usersModelsDataResponse -> {
// ubah sheet dialog jadi tidak bisa di slide atau cancel
sheetDialog.setCancelable(true);
// set form jadi enable
username.setEnabled(true);
password.setEnabled(true);
loginButton.setEnabled(true);
closeBtn.setEnabled(true);
} else {
if (usersModelsDataResponse != null) {
/**
* Jika response atau data tidak cocok
* Jika response atau data ada dan cocok
*/
bar.setVisibility(View.GONE);
loginButton.setText(DEFAULT_LOGIN_NAME);
sheetDialog.setCancelable(true);
utils.snackBar(v, "Oppss! Wrong Username or Password!").show();
username.setEnabled(true);
password.setEnabled(true);
loginButton.setEnabled(true);
closeBtn.setEnabled(true);
if (usersModelsDataResponse.getStatusData()) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean(SplashScreen.SESSION, true);
if(editor.commit()){
startActivity(new Intent(context, MainActivity.class));
}
// redirect ke home
// set progress bar jadi nonaktif
bar.setVisibility(View.GONE);
// munculkan tulisan default di button sign in
loginButton.setText(DEFAULT_LOGIN_NAME);
// ubah sheet dialog jadi tidak bisa di slide atau cancel
sheetDialog.setCancelable(true);
// set form jadi enable
username.setEnabled(true);
password.setEnabled(true);
loginButton.setEnabled(true);
closeBtn.setEnabled(true);
} else {
/**
* Jika response atau data tidak cocok
*/
bar.setVisibility(View.GONE);
loginButton.setText(DEFAULT_LOGIN_NAME);
sheetDialog.setCancelable(true);
final View customLayout = getLayoutInflater()
.inflate(R.layout.alert_dialog, null);
// tampilkan alert dialog
utils = new Utils(customLayout);
utils.dialog(context, false, customLayout, "Wrong Username or Password",
"The username or password is incorrect. Please try again!",
"Try Again")
.show();
utils.setListener(Dialog::dismiss);
username.setEnabled(true);
password.setEnabled(true);
loginButton.setEnabled(true);
closeBtn.setEnabled(true);
}
} else {
bar.setVisibility(View.VISIBLE);
utils.snackBar(v, "Oppss! ログイン中にエラーが発生しました。しばらくしてからもう一度お試しください").show();
}
} else {
bar.setVisibility(View.VISIBLE);
utils.snackBar(v, "Oppss! ログイン中にエラーが発生しました。しばらくしてからもう一度お試しください").show();
}
}
});
});
}
loginButton.setText(DEFAULT_LOGIN_NAME);
}
}
......@@ -78,8 +78,7 @@ public class RegisterState extends BottomSheetDialogFragment {
sheetBehavior2 = BottomSheetBehavior.from((View) (view.getParent()));
// get Window size
int getHeight = Resources.getSystem().getDisplayMetrics().heightPixels;
int setHeight = getHeight - (getHeight * 5) / 100;
int setHeight = utils.getWindowHeight() - (utils.getWindowHeight() * 5) / 100;
// set max height
sheetBehavior2.setPeekHeight(setHeight);
......
package com.yono.messeripos.utils;
import android.app.AlertDialog;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
......@@ -8,14 +9,20 @@ import android.os.Build;
import android.util.Base64;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.cardview.widget.CardView;
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 com.yono.messeripos.R;
import com.yono.messeripos.adapter.CategoryAdapter;
import com.yono.messeripos.models.CategoryModels;
import java.io.ByteArrayOutputStream;
import java.text.DecimalFormat;
......@@ -31,7 +38,21 @@ import java.util.regex.Pattern;
public class Utils {
public Utils(){};
public Utils(View v){};
public long grandTotal = 0;
public static TextView btnCard;
public interface DialogListener {
void onClickDisimiss(AlertDialog alertDialog);
}
private DialogListener listener;
public void setListener(DialogListener listener) {
this.listener = listener;
}
public String convertPrice(String mataUang, int nilai ){
DecimalFormat rupiah = (DecimalFormat) DecimalFormat.getCurrencyInstance();
......@@ -179,10 +200,116 @@ public class Utils {
}
public boolean isValidPassword(String pass){
public boolean isValidPassword(String pass) {
String regex = "^(?=.*[A-Za-z-0-9])(?=.*\\d)[A-Za-z-0-9\\d]{8,}$";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(pass);
return matcher.matches();
}
/**
* Alert Dialog
* @param context
* @param cancelable
* @param view
* @return
*/
public AlertDialog dialog(Context context, Boolean cancelable, View view) {
CardView btCard = view.findViewById(R.id.cvAlertOnClick);
AlertDialog.Builder builder = new AlertDialog.Builder(context)
.setCancelable(cancelable)
.setView(view);
AlertDialog dialog = builder.create();
dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
btnCard.setOnClickListener(view1 -> listener.onClickDisimiss(dialog));
return dialog;
}
public AlertDialog dialog(Context context, Boolean cancelable, View view, @Nullable String titles) {
TextView title = view.findViewById(R.id.alertTitles);
CardView btCard = view.findViewById(R.id.cvAlertOnClick);
// set title and message
if (titles != null){
title.setText(titles);
}
AlertDialog.Builder builder = new AlertDialog.Builder(context)
.setCancelable(cancelable)
.setView(view);
AlertDialog dialog = builder.create();
dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
btnCard.setOnClickListener(view1 -> listener.onClickDisimiss(dialog));
return dialog;
}
public AlertDialog dialog(Context context, Boolean cancelable, View view, @Nullable String titles, @Nullable String messages) {
TextView title = view.findViewById(R.id.alertTitles);
TextView message = view.findViewById(R.id.alertBody);
CardView btCard = view.findViewById(R.id.cvAlertOnClick);
// set title and message
if (titles != null){
title.setText(titles);
}
if (message != null){
message.setText(messages);
}
AlertDialog.Builder builder = new AlertDialog.Builder(context)
.setCancelable(cancelable)
.setView(view);
AlertDialog dialog = builder.create();
dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
btnCard.setOnClickListener(view1 -> listener.onClickDisimiss(dialog));
return dialog;
}
public AlertDialog dialog(Context context, Boolean cancelable, View view, @Nullable String titles, @Nullable String messages, @Nullable String buttons) {
TextView title = view.findViewById(R.id.alertTitles);
TextView message = view.findViewById(R.id.alertBody);
TextView button = view.findViewById(R.id.tvTextBtn);
CardView btnCard = view.findViewById(R.id.cvAlertOnClick);
// set title and message
if (titles != null){
title.setText(titles);
}
if (message != null){
message.setText(messages);
}
if (button != null){
button.setText(buttons);
}
AlertDialog.Builder builder = new AlertDialog.Builder(context)
.setCancelable(cancelable)
.setView(view);
AlertDialog dialog = builder.create();
dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
btnCard.setOnClickListener(view1 -> listener.onClickDisimiss(dialog));
return dialog;
}
// get window size
public int getWindowHeight() {
return Resources.getSystem().getDisplayMetrics().heightPixels;
}
public int getWindowWidth() {
return Resources.getSystem().getDisplayMetrics().widthPixels;
}
}
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:fromYDelta="0%"
android:toYDelta="100%"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
\ No newline at end of file
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="2000"/>
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:fromYDelta="0%"
android:toYDelta="100%"
android:duration="@android:integer/config_mediumAnimTime"/>
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:interpolator="@android:anim/bounce_interpolator">
<scale
android:duration="1300"
android:fromXScale="0.0"
android:fromYScale="0.0"
android:pivotY="50%"
android:pivotX="50%"
android:toXScale="1.0"
android:toYScale="1.0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:interpolator="@android:anim/bounce_interpolator">
<scale
android:duration="1300"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotY="50%"
android:pivotX="50%"
android:toXScale="0.0"
android:toYScale="0.0" />
</set>
\ No newline at end of file
<vector android:height="24dp" android:tint="#B6B6B6"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zM12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout android:layout_height="wrap_content"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvAlertDialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="0dp"
app:cardBackgroundColor="@android:color/transparent"
android:layout_marginVertical="10dp"
android:layout_marginHorizontal="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/divider"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/alertTitles"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@android:string/dialog_alert_title"
android:textSize="18sp"
android:textStyle="bold"
android:layout_marginBottom="10dp"
android:layout_gravity="center"/>
<TextView
android:id="@+id/alertBody"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Your username or password wrong"
android:textSize="18sp"
android:gravity="center"
android:layout_gravity="center"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<View
android:id="@+id/divider"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="1dp"
style="@style/Divider.Horizontal"
app:layout_constraintTop_toBottomOf="@id/cvAlertDialog"/>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvAlertOnClick"
app:cardCornerRadius="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
app:layout_constraintTop_toBottomOf="@id/divider">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tvTextBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Coba Lagi"
android:textSize="18sp"
android:paddingVertical="15dp"
android:gravity="center"/>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -26,112 +26,118 @@
android:scaleType="centerInside"
android:src="@drawable/ic_close" />
<ImageView
android:id="@+id/messerLogoInLogin"
android:layout_width="150dp"
android:layout_height="150dp"
<ScrollView
android:layout_below="@id/closeBtnLogin"
android:layout_centerHorizontal="true"
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:layout_below="@id/tvLogin"
android:hint="@string/username">
android:layout_height="match_parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ETUsernameLogin"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/messerLogoInLogin"
android:layout_width="wrap_content"
android:layout_height="213dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_marginBottom="40dp"
android:src="@drawable/login_image" />
<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:layout_below="@id/tvLogin"
android:hint="@string/username">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ETUsernameLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionNext"
android:textColor="@color/colorPrimary"
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:layout_below="@id/formUsernameLogin"
android:layout_marginTop="20dp"
android:hint="@string/password">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ETPasswordLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionDone|actionGo"
android:textColor="@color/colorPrimary"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintBtn"
android:layout_below="@id/FormPasswordLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/SignInButtonInLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sign in"
android:padding="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<ProgressBar
android:id="@+id/progressLogin"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="2dp"
app:layout_constraintBottom_toBottomOf="@id/SignInButtonInLogin"
app:layout_constraintTop_toTopOf="@id/SignInButtonInLogin"
app:layout_constraintStart_toStartOf="@id/SignInButtonInLogin"
app:layout_constraintEnd_toEndOf="@id/SignInButtonInLogin"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/forgotPwd"
android:layout_width="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
android:id="@+id/FormPasswordLogin"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/formUsernameLogin"
android:layout_marginTop="20dp"
android:hint="@string/password">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ETPasswordLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:imeOptions="actionDone|actionGo"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id="@+id/CBRememberMe"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/FormPasswordLogin"
android:layout_marginVertical="10dp"
android:text="Remember Me"
android:textColor="@color/colorPrimary"
app:useMaterialThemeColors="true" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintBtn"
android:layout_below="@id/CBRememberMe"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/SignInButtonInLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Sign in"
android:padding="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<ProgressBar
android:id="@+id/progressLogin"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="2dp"
app:layout_constraintBottom_toBottomOf="@id/SignInButtonInLogin"
app:layout_constraintTop_toTopOf="@id/SignInButtonInLogin"
app:layout_constraintStart_toStartOf="@id/SignInButtonInLogin"
app:layout_constraintEnd_toEndOf="@id/SignInButtonInLogin"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/forgotPwd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Forgot Password?"
android:layout_below="@id/constraintBtn"
android:layout_marginTop="10dp"
android:layout_alignParentEnd="true"
android:textColor="@color/colorPrimary"/>
android:text="Forgot Password?"
android:layout_below="@id/constraintBtn"
android:layout_marginTop="10dp"
android:layout_alignParentEnd="true"
android:textColor="@color/colorPrimary"/>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
......
......@@ -25,12 +25,22 @@
/>
<ScrollView
android:layout_below="@id/ivclose"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/ivMeserRegister"
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@drawable/ic_messer_primary"
android:layout_below="@+id/ivclose"
android:layout_width="match_parent"
android:layout_height="213dp"
android:src="@drawable/register_image"
android:layout_marginTop="20dp"
android:layout_marginBottom="40dp"
android:layout_centerHorizontal="true" />
<com.google.android.material.textview.MaterialTextView
......@@ -45,8 +55,6 @@
android:paddingLeft="12dp"
/>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/formUsernameReg"
android:layout_width="match_parent"
......@@ -141,6 +149,11 @@
android:text="Create Account"
android:layout_below="@id/cbAgree"
android:padding="20dp"/>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
......
......@@ -25,7 +25,6 @@
<item name="android:fontFamily">@font/roboto</item>
<item name="actionBarStyle">@style/ThemeActionBar</item>
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.Rounded.BottomSheetDialog</item>
</style>
<style name="AppTheme.my.a" parent="Theme.MaterialComponents.Light.NoActionBar">
......@@ -98,4 +97,23 @@
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Divider">
<item name="android:background">#36333333</item> //you can give your color here. that will change all divider color in your app.
</style>
<style name="Divider.Horizontal" parent="Divider">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item> // You can change thickness here.
</style>
<style name="Divider.Vertical" parent="Divider">
<item name="android:layout_width">1dp</item>
<item name="android:layout_height">match_parent</item>
</style>
<style name="DialogAnimation">
<item name="android:windowEnterAnimation">@anim/zoom_in_bounce</item>
<item name="android:windowExitAnimation">@anim/zoom_out_bounce</item>
</style>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment