Commit a46071ff authored by fauzi's avatar fauzi

Merge branch 'dev' into cart

parents 3864bdbf d980f07e
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -20,8 +20,9 @@
android:roundIcon="@mipmap/ic_launcher_new_icon"
android:supportsRtl="true"
android:theme="@style/AppTheme.appbar">
<activity android:name=".ForgotPasswordActivity"></activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".TransactionActivity"/>
<activity android:name=".TransactionActivity" />
<activity
android:name=".BottomSheets"
tools:ignore="Instantiatable" />
......@@ -34,13 +35,11 @@
android:theme="@style/AppTheme.appbar" />
<activity
android:name=".PaymentActivity"
android:theme="@style/AppTheme.appbar" >
</activity>
android:theme="@style/AppTheme.appbar"></activity>
<activity
android:name=".CartActivity"
android:theme="@style/AppTheme.appbar" />
<activity android:name=".SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -50,7 +49,8 @@
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.appbar" />
<activity android:name=".FormProductActivity" />
<activity android:name=".FormProductActivity"
android:windowSoftInputMode="adjustResize"/>
<provider
android:name="androidx.core.content.FileProvider"
......
......@@ -7,6 +7,7 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.Window;
......@@ -31,6 +32,7 @@ import com.yono.messeripos.api.client.Client;
import com.yono.messeripos.api.service.OrdersService;
import com.yono.messeripos.api.service.PaymentService;
import com.yono.messeripos.models.MainViewModelsCart;
import com.yono.messeripos.models.PaymentPending;
import com.yono.messeripos.models.PaymentsModels;
import com.yono.messeripos.models.ProductCartModels;
import com.yono.messeripos.models.ProductModels;
......@@ -112,8 +114,6 @@ public class CartActivity extends AppCompatActivity {
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(this, DividerItemDecoration.VERTICAL);
recyclerView.addItemDecoration(dividerItemDecoration);
modelsCart = new ViewModelProvider(this).get(MainViewModelsCart.class);
// show to cart
Log.i("GET CART", "onCreate: "+utils.convertGson(paymentsModelsIntent));
if (paymentsModelsIntent == null){
......@@ -230,26 +230,40 @@ public class CartActivity extends AppCompatActivity {
}
private void actionSaveCart() {
ProgressDialog progressDialog = new ProgressDialog(CartActivity.this);
progressDialog.setMessage("Creating your orders....");
progressDialog.show();
Client client = new Client();
modelsCart.getCartById(orderId).observe(this, new Observer<List<ProductCartModels>>() {
modelsCart.getCartById(sharedPreferences.getString(ORDER_ID, "")).observe(this, new Observer<List<ProductCartModels>>() {
@Override
public void onChanged(List<ProductCartModels> productCartModels) {
long grossAmount = 0;
PaymentsModels paymentsModels = new PaymentsModels();
PaymentPending paymentPending = new PaymentPending();
for (ProductCartModels pd:productCartModels){
grossAmount = grossAmount + (pd.getQuantity_orders()*pd.getPrice_orders());
paymentsModels.setGrossAmount(grossAmount);
paymentPending.setGross_amount(grossAmount);
}
// Log.i("ORDER_ID_SAVE", "onCreate: "+sharedPreferences.getString(ORDER_ID,"").toString());
// paymentsModels.setBank("");
// paymentsModels.setPaymentType("pending");
// paymentPending.setTransaction_status("pending");
paymentPending.setId_orders(sharedPreferences.getString(ORDER_ID, ""));
paymentPending.setTransaction_time(utils.dateNow());
Log.i("Convert Input", "onChanged: "+utils.convertGson(paymentPending));
modelsCart.savePaymentPending(paymentPending);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putString(ORDER_ID, "");
if (editor.commit()){
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
progressDialog.dismiss();
startActivity(new Intent(CartActivity.this, MainActivity.class));
finish();
}
}, 700);
}
Log.i("ORDER_ID_SAVE", "onCreate: "+sharedPreferences.getString(ORDER_ID,"").toString());
paymentsModels.setBank("");
paymentsModels.setPaymentType("pending");
paymentsModels.setOrderId(sharedPreferences.getString(ORDER_ID, ""));
paymentsModels.setTransactionStatus("pending");
Log.i("Convert Input", "onChanged: "+utils.convertGson(paymentsModels));
}
});
}
......
package com.yono.messeripos;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class ForgotPasswordActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_forgot_password);
}
}
\ No newline at end of file
......@@ -26,6 +26,7 @@ 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.google.android.material.textview.MaterialTextView;
import com.yono.messeripos.models.MainViewModels;
import com.yono.messeripos.models.UsersModels;
import com.yono.messeripos.response.DataResponse;
......@@ -47,6 +48,8 @@ public class LoginActivity extends AppCompatActivity {
Utils utils;
MaterialTextView tvForgotPassword;
private String TAG = "MainActivity";
@Override
......@@ -121,6 +124,5 @@ public class LoginActivity extends AppCompatActivity {
registerState.show(getSupportFragmentManager(),registerState.getTag());
}
});
}
}
package com.yono.messeripos;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
......@@ -20,6 +23,7 @@ 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.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputEditText;
import com.yono.messeripos.api.client.Client;
import com.yono.messeripos.api.service.UsersService;
......@@ -28,6 +32,9 @@ import com.yono.messeripos.models.UsersModels;
import com.yono.messeripos.response.DataResponse;
import com.yono.messeripos.utils.Utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
......@@ -46,6 +53,8 @@ public class RegisterState extends BottomSheetDialogFragment {
SharedPreferences sharedPreferences;
Utils utils;
String busername,bemail,bpassword,brepassword;
public RegisterState(Context context, MainViewModels mainViewModels) {
this.context = context;
this.mainViewModels = mainViewModels;
......@@ -88,12 +97,71 @@ public class RegisterState extends BottomSheetDialogFragment {
Log.d(TAG, "onCreateDialog: " + sheetBehavior2.getState());
email.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
if (TextUtils.isEmpty(username.getText().toString()) &&
TextUtils.isEmpty(email.getText().toString()) && TextUtils.isEmpty(password.getText().toString()) && TextUtils.isEmpty(repassword.getText().toString())){
username.setError("This field can't empty");
email.setError("This field can't empty");
password.setError("This field can't empty");
repassword.setError("This field can't empty");
}else if (TextUtils.isEmpty(username.getText().toString())){
username.setError("This field can't empty");
}else if (TextUtils.isEmpty(email.getText().toString())){
email.setError("This field can't empty");
}else if (TextUtils.isEmpty(password.getText().toString())){
password.setError("This field can't empty");
}else if (TextUtils.isEmpty(repassword.getText().toString())){
repassword.setError("This field can't empty");
}else if (!utils.isValidEmail(charSequence.toString())){
email.setError("Please enter the correct email format");
}
}
@Override
public void afterTextChanged(Editable editable) {
}
});
//same data password
password.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
if (!utils.isValidPassword(charSequence.toString())){
password.setError("Password Must Be 8 Character");
}
}
@Override
public void afterTextChanged(Editable editable) {
}
});
registerButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
mainViewModels.postRegis(new UsersModels(username.getText().toString(),
email.getText().toString(),password.getText().toString(),
repassword.getText().toString()));
mainViewModels.postRegis(new UsersModels(username.getText().toString(),email.getText().toString(),password.getText().toString(),repassword.getText().toString()));
/**
* Jika tombol sign up ditekan
*
* kembali ke halaman login utama dengan Snackbar Cek Email*/
Snackbar mySnackbar = Snackbar.make(view, "Cek Email Anda", 3000);
mySnackbar.show();
registerButton.setEnabled(false);
}
});
......@@ -106,21 +174,5 @@ public class RegisterState extends BottomSheetDialogFragment {
return sheetDialog2;
}
private void registerUser(View view){
// Client client = new Client();
// UsersService usersService = client.Client(UsersService.class);
// usersService.postRegister(new UsersModels(username.getText().toString(),email.getText().toString(),password.getText().toString(),repassword.getText().toString()).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) {
//
// }
// });
}
}
......@@ -13,6 +13,7 @@ import androidx.viewpager.widget.ViewPager;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.tabs.TabLayout;
import com.yono.messeripos.adapter.TabAdapterTransaction;
import com.yono.messeripos.transactiontab.TransactionPending;
import com.yono.messeripos.transactiontab.TransactionSuccess;
import java.util.Objects;
......@@ -42,7 +43,7 @@ public class TransactionActivity extends AppCompatActivity {
adapter = new TabAdapterTransaction(getSupportFragmentManager());
adapter.addFragment(new TransactionSuccess(), "Transaction Success");
adapter.addFragment(new TransactionSuccess(), "Transaction Pending");
adapter.addFragment(new TransactionPending(), "Transaction Pending");
viewPager.setAdapter(adapter);
tabLayout.setupWithViewPager(viewPager);
......
package com.yono.messeripos.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.yono.messeripos.R;
import com.yono.messeripos.databinding.ItemPendingBinding;
import com.yono.messeripos.models.PaymentPending;
import com.yono.messeripos.models.PaymentsModels;
import com.yono.messeripos.utils.Utils;
import java.util.ArrayList;
public class PendingAdapter extends RecyclerView.Adapter<PendingAdapter.MyViewHolder> {
private ArrayList<PaymentPending> paymentPendings = new ArrayList<>();
Context context;
Utils utils = new Utils();
public void setPendingAdapter(Context context, ArrayList<PaymentPending> paymentPending){
this.paymentPendings = paymentPending;
this.context = context;
}
@NonNull
@Override
public PendingAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ItemPendingBinding itemPendingBinding = DataBindingUtil.inflate(
LayoutInflater.from(parent.getContext()),
R.layout.item_pending,
parent,
false
);
return new MyViewHolder(itemPendingBinding);
}
@Override
public void onBindViewHolder(@NonNull PendingAdapter.MyViewHolder holder, int position) {
holder.binData(paymentPendings.get(position));
}
@Override
public int getItemCount() {
return paymentPendings.size();
}
public class MyViewHolder extends RecyclerView.ViewHolder {
ItemPendingBinding binding;
public MyViewHolder(@NonNull ItemPendingBinding itemView) {
super(itemView.getRoot());
binding = itemView;
}
public void binData(PaymentPending paymentPending) {
binding.setTransaction(paymentPending);
binding.setDate(paymentPending.getTransaction_time());
binding.setGrossAmount(utils.convertPrice("Rp. ", paymentPending.getGross_amount()));
}
}
}
......@@ -64,6 +64,14 @@ public class MainViewModelsCart extends AndroidViewModel {
public void updateQtyCart(long qty, long id){cartRepositories.updateQty(qty, id);}
public void savePaymentPending(PaymentPending paymentPending){
paymentPendingRepositories.insert(paymentPending);
}
public LiveData<List<PaymentPending>> getAllPaymentPending(){
return paymentPendingRepositories.getPaymentPending();
}
public void insertPayments(){
}
......
......@@ -30,7 +30,7 @@ public class PaymentPending implements Parcelable {
private String id_nfc;
@SerializedName("gross_amount")
private double gross_amount;
private long gross_amount;
public PaymentPending() {
}
......@@ -41,7 +41,7 @@ public class PaymentPending implements Parcelable {
String transaction_status,
String payment_methode,
String id_nfc,
double gross_amount) {
long gross_amount) {
this.id = id;
this.id_orders = id_orders;
this.transaction_time = transaction_time;
......@@ -58,7 +58,7 @@ public class PaymentPending implements Parcelable {
transaction_status = in.readString();
payment_methode = in.readString();
id_nfc = in.readString();
gross_amount = in.readInt();
gross_amount = in.readLong();
}
public static final Creator<PaymentPending> CREATOR = new Creator<PaymentPending>() {
......@@ -86,7 +86,7 @@ public class PaymentPending implements Parcelable {
parcel.writeString(transaction_status);
parcel.writeString(payment_methode);
parcel.writeString(id_nfc);
parcel.writeDouble(gross_amount);
parcel.writeLong(gross_amount);
}
......@@ -138,11 +138,11 @@ public class PaymentPending implements Parcelable {
this.id_nfc = id_nfc;
}
public double getGross_amount() {
public long getGross_amount() {
return gross_amount;
}
public void setGross_amount(double gross_amount) {
public void setGross_amount(long gross_amount) {
this.gross_amount = gross_amount;
}
}
......@@ -21,6 +21,10 @@ public class PaymentPendingRepositories {
paymentPending = daos.getAll();
}
public LiveData<List<PaymentPending>> getPaymentPending(){
return paymentPending;
}
public void insert(PaymentPending paymentPending){
LocalDatabase.databaseWriterExecutor.execute(() -> daos.insertPaymentPending(paymentPending));
}
......
package com.yono.messeripos.transactiontab;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yono.messeripos.R;
import com.yono.messeripos.adapter.PendingAdapter;
import com.yono.messeripos.adapter.TransactionAdapter;
import com.yono.messeripos.models.MainViewModels;
import com.yono.messeripos.models.MainViewModelsCart;
import com.yono.messeripos.models.PaymentPending;
import com.yono.messeripos.models.PaymentsModels;
import com.yono.messeripos.utils.Utils;
import java.util.ArrayList;
import java.util.List;
public class TransactionPending extends Fragment {
PendingAdapter pendingAdapter;
PaymentPending paymentPending;
MainViewModelsCart mainViewModelsCart;
RecyclerView recyclerView;
Utils utils = new Utils();
ProgressBar loading;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater,
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
View v = inflater.inflate(
R.layout.activity_pending,
container,
false
);
mainViewModelsCart = new ViewModelProvider(this).get(MainViewModelsCart.class);
recyclerView = v.findViewById(R.id.rvPending);
loading = v.findViewById(R.id.loadingPending);
pendingAdapter = new PendingAdapter();
LifecycleOwner lifecycleOwner = this;
loading.setVisibility(View.VISIBLE);
mainViewModelsCart.getAllPaymentPending().observe(lifecycleOwner, new Observer<List<PaymentPending>>() {
@Override
public void onChanged(List<PaymentPending> paymentPendings) {
Log.i("Get data", "onChanged: "+utils.convertGson(paymentPendings));
loading.setVisibility(View.GONE);
ArrayList<PaymentPending> pendingArrayList = new ArrayList<>();
pendingArrayList.addAll(paymentPendings);
pendingAdapter.setPendingAdapter(v.getContext(),pendingArrayList);
recyclerView.setLayoutManager(new LinearLayoutManager(v.getContext(), RecyclerView.VERTICAL, false));
recyclerView.setAdapter(pendingAdapter);
}
});
return v;
}
}
......@@ -86,6 +86,10 @@ public class Utils {
return timeStamp;
}
public String dateNow(){
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
}
public String convertGson(Object object){
String js = new Gson().toJson(object);
return js;
......
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android" >
<gradient android:angle="0"
android:startColor="#2da5de"
android:centerColor="#e424d3d6"
android:endColor="#923ad6d8">
</gradient>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="100dp"/>
<gradient android:angle="0"
android:startColor="#2da5de"
android:centerColor="#e424d3d6"
android:endColor="#923ad6d8">
</gradient>
</shape>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFF"
android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
</vector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#333333"
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8l8,5 8,-5v10zM12,11L4,6h16l-8,5z"/>
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="500"
android:viewportHeight="749"
android:width="625dp"
android:height="936.25dp">
<group
android:scaleX="0.1"
android:scaleY="-0.1"
android:translateY="749">
<path
android:pathData="M439 7416C282 7361 169 7248 113 7090l-23 -65 0 -1751c0 -1693 1 -1753 19 -1806 35 -101 99 -185 184 -241 57 -38 90 -50 442 -162 132 -42 701 -224 1265 -405 564 -180 1084 -346 1155 -368 72 -22 362 -114 645 -206 558 -179 630 -196 749 -177 165 27 267 129 316 316 13 53 15 321 15 2410 0 2572 4 2397 -58 2523 -56 115 -184 223 -310 262 -63 20 -97 20 -2036 20l-1971 0 -66 -24z"
android:fillColor="#ffffff" />
<path
android:pathData="M498 2820C322 2790 207 2702 128 2534L95 2465 92 1476C90 496 90 486 110 424 155 289 255 178 389 112l76 -37 1998 -3 1997 -2 63 21c160 53 293 193 338 357 17 59 19 106 19 407 0 369 -4 404 -56 507 -55 109 -179 205 -304 237 -25 7 -54 16 -65 21 -11 5 -206 68 -433 140 -227 72 -677 214 -1000 316 -323 102 -623 197 -667 211 -44 14 -343 108 -665 210 -322 102 -691 218 -820 259 -240 76 -271 81 -372 64z"
android:fillColor="#ffffff" />
</group>
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:background="@drawable/background_login">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
android:layout_alignParentStart="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="RESET PASSWORD"
android:textStyle="bold"
android:textColor="#ffff"
android:textSize="20sp"
android:textAlignment="center"
/>
</androidx.appcompat.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar"
android:orientation="vertical"
android:layout_centerHorizontal="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:gravity="center"
android:background="@drawable/layout_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="360dp"
android:layout_marginBottom="100dp"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/logo_w_h"
android:layout_height="@dimen/logo_w_h"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_launcher" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/lbl_forgot_password"
android:textColor="@color/colorPrimary"
android:textSize="20sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="@dimen/activity_horizontal_margin"
android:text="@string/forgot_password_msg"
android:textColor="@color/colorPrimary"
android:textSize="14sp" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_mail_outline_black_24dp"
android:layout_marginEnd="20dp"
android:id="@+id/email"
android:layout_marginStart="20dp"
android:textSize="14sp"
android:drawablePadding="10dp"
android:hint="@string/email"
android:padding="20dp"
android:textColorHint="#606060"
android:inputType="textEmailAddress"/>
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="end"
android:id="@+id/btn_reset_password"
android:layout_marginTop="30dp"
android:src="@drawable/ic_arrow_forward_black_24dp"
android:background="@drawable/button_background"
android:layout_marginEnd="30dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:layout_marginBottom="20dp"
android:id="@+id/btn_back"
android:background="@drawable/button_background"
android:text="@string/btn_back"
android:textColor="@android:color/white" />
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center|bottom"
android:layout_marginBottom="20dp"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
......@@ -125,9 +125,9 @@
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tvForgotPassword"
android:layout_marginTop="10dp"
android:text="forgot your password ?"
android:text="Forgot your password?"
android:layout_marginLeft="100sp"
android:textColor="@color/colorWhite"
app:layout_constraintStart_toStartOf="parent"
......
......@@ -26,6 +26,12 @@
android:layout_height="wrap_content"
android:layout_below="@id/cvInvoice"
android:layout_above="@id/btnPay"
android:overScrollMode="never"
android:scrollingCache="false"
android:fadingEdge="none"
android:fadingEdgeLength="0dp"
android:scrollbars="none"
android:scrollbarStyle="insideOverlay"
>
<RelativeLayout
......@@ -58,21 +64,15 @@
/>
<ExpandableListView
android:layout_width="fill_parent"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvPayment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tvLabel">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvPayment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:nestedScrollingEnabled="false"
tools:layout_editor_absoluteX="10dp"
tools:listitem="@layout/payment_list"/>
</ExpandableListView>
android:layout_margin="10dp"
android:nestedScrollingEnabled="false"
tools:layout_editor_absoluteX="10dp"
android:layout_below="@id/tvLabel"
tools:listitem="@layout/payment_list"/>
</RelativeLayout>
</ScrollView>
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context=".HistoryActivity">
<!-- <include-->
<!-- android:id="@+id/cAppBar"-->
<!-- layout="@layout/app_bar" />-->
<ProgressBar
android:id="@+id/loadingPending"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:elevation="1dp"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvPending"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/cAppBar"
tools:listitem="@layout/item_pending" />
</ScrollView>
</RelativeLayout>
\ No newline at end of file
<?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">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tfCurrentPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="Current Password"
android:textColor="#fff"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
tools:ignore="MissingConstraints">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etCurrentPassword"
android:layout_width="match_parent"
android:inputType="textPassword"
android:imeOptions="actionNext"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tfNewPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="New Password"
android:textColor="#fff"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:layout_constraintTop_toBottomOf="@id/tfCurrentPassword">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etNewPassword"
android:layout_width="match_parent"
android:inputType="textPassword"
android:imeOptions="actionNext"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tfPasswordConfirmation"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="Password Confirmation"
android:textColor="#fff"
app:layout_constraintTop_toBottomOf="@id/tfNewPassword"
tools:layout_editor_absoluteX="10dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPasswordConfirmation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:imeOptions="actionNext" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnAdd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:text="@string/add"
android:padding="16dp"
app:layout_constraintTop_toBottomOf="@id/tfPasswordConfirmation"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:padding="16dp">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_text_1"
android:inputType="number"
android:maxLength="1"
android:maxLines="1"
android:gravity="center"
android:padding="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@id/edit_text_2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="Autofill,LabelFor"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_text_2"
android:inputType="number"
android:maxLength="1"
android:maxLines="1"
android:gravity="center"
android:padding="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@id/edit_text_3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/edit_text_1"
tools:ignore="Autofill,LabelFor"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_text_3"
android:inputType="number"
android:maxLength="1"
android:maxLines="1"
android:gravity="center"
android:padding="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@id/edit_text_4"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/edit_text_2"
tools:ignore="Autofill,LabelFor"/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/edit_text_4"
android:inputType="number"
android:maxLength="1"
android:maxLines="1"
android:gravity="center"
android:padding="20dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/edit_text_3"
tools:ignore="Autofill,LabelFor"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -6,7 +6,7 @@
<data>
<variable
name="transaction"
type="com.yono.messeripos.models.PaymentsModels" />
type="com.yono.messeripos.models.PaymentPending" />
<variable
name="date"
......@@ -46,7 +46,7 @@
android:textStyle="bold"
android:textAllCaps="true"
tools:text="@string/hint_pay"
android:text="@{transaction.paymentType}"
android:text="Pending"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textview.MaterialTextView
......@@ -66,7 +66,7 @@
android:layout_height="wrap_content"
android:fontFamily="@font/roboto"
android:textSize="16sp"
android:text="@{transaction.nomorPembayaranGet}"
android:text="@{transaction.id_orders}"
tools:text="#6821739123"
app:layout_constraintStart_toStartOf="@id/tvDate"
app:layout_constraintTop_toBottomOf="@+id/tvDate" />
......
......@@ -106,7 +106,7 @@
android:id="@+id/ETPasswordReg"
android:layout_width="match_parent"
android:inputType="textPassword"
android:imeOptions="actionDone|actionGo"
android:imeOptions="actionNext"
android:layout_height="wrap_content"
/>
......
......@@ -13,4 +13,17 @@
<color name="colorLine">#dfdfdf</color>
<color name="colorRed">#F81A1A</color>
<color name="colorGreen">#4CAF50</color>
<color name="bg_login">#26ae90</color>
<color name="bg_register">#2e3237</color>
<color name="bg_main">#428bca</color>
<color name="white">#ffffff</color>
<color name="input_login">#222222</color>
<color name="input_login_hint">#999999</color>
<color name="input_register">#888888</color>
<color name="input_register_bg">#3b4148</color>
<color name="input_register_hint">#5e6266</color>
<color name="btn_login">#26ae90</color>
<color name="btn_login_bg">#eceef1</color>
<color name="lbl_name">#333333</color>
<color name="btn_logut_bg">#ff6861</color>
</resources>
\ No newline at end of file
......@@ -5,4 +5,5 @@
<dimen name="appbar_padding">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="appbar_padding_top">8dp</dimen>
<dimen name="logo_w_h">100dp</dimen>
</resources>
\ No newline at end of file
......@@ -45,5 +45,30 @@
<string name="tab_text_1">Tab 1</string>
<string name="tab_text_2">Tab 2</string>
<string name="action_sign_in_short">Register</string>
<string name="minimum_password">Password too short, enter minimum 6 characters!</string>
<string name="auth_failed">Authentication failed, check your email and password or sign up</string>
<string name="change_email">Change Email</string>
<string name="change_password">Change Password</string>
<string name="send_password_reset_email">Reset Email</string>
<string name="remove_user">Remove user</string>
<string name="new_pass">New Password</string>
<string name="title_activity_profile">Firebase</string>
<string name="title_activity_login">Sign in</string>
<string name="hint_email">Email</string>
<string name="hint_password">Password</string>
<string name="hint_name">Fullname</string>
<string name="btn_login">LOGIN</string>
<string name="btn_link_to_login">Already registered. Login Me!</string>
<string name="title_activity_reset_password">ResetPasswordActivity</string>
<string name="btn_forgot_password">Forgot your password?</string>
<string name="btn_reset_password">Reset Password</string>
<string name="btn_back"><![CDATA[<< Back]]></string>
<string name="hint_new_email">New Email</string>
<string name="btn_change">Change</string>
<string name="btn_send">Send</string>
<string name="btn_remove">Remove</string>
<string name="btn_sign_out">Sign Out</string>
<string name="lbl_forgot_password">Forgot password?</string>
<string name="forgot_password_msg">We just need your registered Email Id to sent you password reset instructions.</string>
</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