Commit 5b656e25 authored by Muhammad Suryono's avatar Muhammad Suryono

update

parents 40a816d9 41dab5ea
...@@ -18,19 +18,16 @@ import android.widget.TextView; ...@@ -18,19 +18,16 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider; import androidx.fragment.app.DialogFragment;
import com.google.android.material.bottomsheet.BottomSheetBehavior; import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment; import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.yono.messeripos.adapter.ProductAdapter;
import com.yono.messeripos.api.client.Client; import com.yono.messeripos.api.client.Client;
import com.yono.messeripos.api.service.PaymentService; import com.yono.messeripos.api.service.PaymentService;
import com.yono.messeripos.models.PaymentsModels; import com.yono.messeripos.models.PaymentsModels;
import com.yono.messeripos.models.ProductModels;
import com.yono.messeripos.response.DataResponse; import com.yono.messeripos.response.DataResponse;
import com.yono.messeripos.utils.Utils; import com.yono.messeripos.utils.Utils;
import okhttp3.internal.Util;
import retrofit2.Call; import retrofit2.Call;
import retrofit2.Callback; import retrofit2.Callback;
import retrofit2.Response; import retrofit2.Response;
...@@ -53,6 +50,7 @@ public class BottomSheets extends BottomSheetDialogFragment { ...@@ -53,6 +50,7 @@ public class BottomSheets extends BottomSheetDialogFragment {
RelativeLayout layoutFormCash; RelativeLayout layoutFormCash;
PaymentsModels paymentsModels; PaymentsModels paymentsModels;
public BottomSheets(PaymentsModels paymentsModels) { public BottomSheets(PaymentsModels paymentsModels) {
this.paymentsModels = paymentsModels; this.paymentsModels = paymentsModels;
} }
...@@ -71,6 +69,7 @@ public class BottomSheets extends BottomSheetDialogFragment { ...@@ -71,6 +69,7 @@ public class BottomSheets extends BottomSheetDialogFragment {
public View onCreateView(LayoutInflater inflater, @Nullable public View onCreateView(LayoutInflater inflater, @Nullable
ViewGroup container, @Nullable Bundle savedInstanceState) ViewGroup container, @Nullable Bundle savedInstanceState)
{ {
View v = inflater.inflate(R.layout.activity_bottom_sheets, View v = inflater.inflate(R.layout.activity_bottom_sheets,
container, false); container, false);
...@@ -83,6 +82,7 @@ public class BottomSheets extends BottomSheetDialogFragment { ...@@ -83,6 +82,7 @@ public class BottomSheets extends BottomSheetDialogFragment {
// bottomSheetBehavior = BottomSheetBehavior.from(layoutFormCash); // bottomSheetBehavior = BottomSheetBehavior.from(layoutFormCash);
sharedPreferences = getActivity().getSharedPreferences(MainActivity.MY_SHARED_PREFERENCES, Context.MODE_PRIVATE); sharedPreferences = getActivity().getSharedPreferences(MainActivity.MY_SHARED_PREFERENCES, Context.MODE_PRIVATE);
// bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED); // bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
long ga = paymentsModels.getGrossAmount(); long ga = paymentsModels.getGrossAmount();
String setCurrency = utils.convertPrice("Rp.", ga); String setCurrency = utils.convertPrice("Rp.", ga);
...@@ -105,7 +105,7 @@ public class BottomSheets extends BottomSheetDialogFragment { ...@@ -105,7 +105,7 @@ public class BottomSheets extends BottomSheetDialogFragment {
// break; // break;
// } // }
// } // }
//
// @Override // @Override
// public void onSlide(@NonNull View bottomSheet, float slideOffset) { // public void onSlide(@NonNull View bottomSheet, float slideOffset) {
// if (bottomSheetBehavior.getState() != BottomSheetBehavior.STATE_EXPANDED) { // if (bottomSheetBehavior.getState() != BottomSheetBehavior.STATE_EXPANDED) {
...@@ -124,7 +124,7 @@ public class BottomSheets extends BottomSheetDialogFragment { ...@@ -124,7 +124,7 @@ public class BottomSheets extends BottomSheetDialogFragment {
@Override @Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
if (TextUtils.isEmpty(charSequence)) inputAmount.setText("0"); if (TextUtils.isEmpty(charSequence)) inputAmount.setText("");
grossAmount = paymentsModels.getGrossAmount(); grossAmount = paymentsModels.getGrossAmount();
long input = Long.parseLong(inputAmount.getText().toString()); long input = Long.parseLong(inputAmount.getText().toString());
...@@ -146,6 +146,7 @@ public class BottomSheets extends BottomSheetDialogFragment { ...@@ -146,6 +146,7 @@ public class BottomSheets extends BottomSheetDialogFragment {
} }
private void bayar(View view) { private void bayar(View view) {
// String orderId, String paymentType, String bank, long grossAmount // String orderId, String paymentType, String bank, long grossAmount
PaymentsModels paymentsModels = new PaymentsModels( PaymentsModels paymentsModels = new PaymentsModels(
sharedPreferences.getString(ORDER_ID, ""), sharedPreferences.getString(ORDER_ID, ""),
......
...@@ -3,7 +3,6 @@ package com.yono.messeripos; ...@@ -3,7 +3,6 @@ package com.yono.messeripos;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Build; import android.os.Build;
...@@ -12,11 +11,8 @@ import android.util.Log; ...@@ -12,11 +11,8 @@ 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.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.Toast;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
...@@ -34,7 +30,6 @@ import com.yono.messeripos.adapter.CartAdapter; ...@@ -34,7 +30,6 @@ import com.yono.messeripos.adapter.CartAdapter;
import com.yono.messeripos.api.client.Client; import com.yono.messeripos.api.client.Client;
import com.yono.messeripos.api.service.OrdersService; import com.yono.messeripos.api.service.OrdersService;
import com.yono.messeripos.api.service.PaymentService; import com.yono.messeripos.api.service.PaymentService;
import com.yono.messeripos.api.service.ProductService;
import com.yono.messeripos.models.MainViewModelsCart; import com.yono.messeripos.models.MainViewModelsCart;
import com.yono.messeripos.models.PaymentsModels; import com.yono.messeripos.models.PaymentsModels;
import com.yono.messeripos.models.ProductCartModels; import com.yono.messeripos.models.ProductCartModels;
...@@ -50,7 +45,6 @@ import retrofit2.Call; ...@@ -50,7 +45,6 @@ import retrofit2.Call;
import retrofit2.Callback; import retrofit2.Callback;
import retrofit2.Response; import retrofit2.Response;
import static com.yono.messeripos.MainActivity.CHECKOUT;
import static com.yono.messeripos.MainActivity.ORDER_ID; import static com.yono.messeripos.MainActivity.ORDER_ID;
import static com.yono.messeripos.MainActivity.orderId; import static com.yono.messeripos.MainActivity.orderId;
......
...@@ -64,6 +64,7 @@ public class PaymentActivity extends AppCompatActivity { ...@@ -64,6 +64,7 @@ public class PaymentActivity extends AppCompatActivity {
private CheckoutAdapter checkoutAdapter; private CheckoutAdapter checkoutAdapter;
private TextView grandTotal; private TextView grandTotal;
public static BottomSheets bottomSheet; public static BottomSheets bottomSheet;
public static QRCode qrCode;
public static SharedPreferences sharedPreferences; public static SharedPreferences sharedPreferences;
Button cashBtn; Button cashBtn;
ProgressDialog progressDialog; ProgressDialog progressDialog;
...@@ -72,11 +73,11 @@ public class PaymentActivity extends AppCompatActivity { ...@@ -72,11 +73,11 @@ public class PaymentActivity extends AppCompatActivity {
PaymentsModels paymentsModelsIntent; PaymentsModels paymentsModelsIntent;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_payment); setContentView(R.layout.activity_payment);
Log.i("Status Checkout payment", "onCreate: "+checkout); Log.i("Status Checkout payment", "onCreate: "+checkout);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow(); Window w = getWindow();
...@@ -172,7 +173,6 @@ public class PaymentActivity extends AppCompatActivity { ...@@ -172,7 +173,6 @@ public class PaymentActivity extends AppCompatActivity {
btnPay.setEnabled(true); btnPay.setEnabled(true);
}); });
btnPay.setOnClickListener(new View.OnClickListener() { btnPay.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
...@@ -181,50 +181,56 @@ public class PaymentActivity extends AppCompatActivity { ...@@ -181,50 +181,56 @@ public class PaymentActivity extends AppCompatActivity {
Log.i("CASH", "onClick: "+utils.convertGson(paymentsModels)); Log.i("CASH", "onClick: "+utils.convertGson(paymentsModels));
bottomSheet = new BottomSheets(paymentsModels); bottomSheet = new BottomSheets(paymentsModels);
bottomSheet.setCancelable(false); bottomSheet.setCancelable(true);
bottomSheet.show(getSupportFragmentManager(), bottomSheet.show(getSupportFragmentManager(),
"ModalBottomSheet"); "ModalBottomSheet");
}else{ }else{
progressDialog.show();
// bottomSheetBank.setState(BottomSheetBehavior.STATE_EXPANDED); // bottomSheetBank.setState(BottomSheetBehavior.STATE_EXPANDED);
// progressDialog.show(); // progressDialog.show();
// Client client = new Client(); Client client = new Client();
// paymentsModels.setPaymentType("bank_transfer"); paymentsModels.setPaymentType("bank_transfer");
// paymentsModels.setBank(methodPay); paymentsModels.setBank(methodPay);
// paymentsModels.setOrderId(orderId); paymentsModels.setOrderId(orderId);
// Log.i("BANK", "onClick: "+utils.convertGson(paymentsModels)); Log.i("BANK", "onClick: "+utils.convertGson(paymentsModels));
// PaymentService paymentService = client.Client(PaymentService.class); PaymentService paymentService = client.Client(PaymentService.class);
// paymentService.postFromCart(paymentsModels).enqueue(new Callback<DataResponse<PaymentsModels>>() { paymentService.postFromCart(paymentsModels).enqueue(new Callback<DataResponse<PaymentsModels>>() {
// @Override @Override
// public void onResponse(Call<DataResponse<PaymentsModels>> call, Response<DataResponse<PaymentsModels>> response) { public void onResponse(Call<DataResponse<PaymentsModels>> call, Response<DataResponse<PaymentsModels>> response) {
// Log.i("Paymen_bank", "onResponse: "+utils.convertGson(response.body())); Log.i("Paymen_bank", "onResponse: "+utils.convertGson(response.body()));
// if (response.body() != null){
// SharedPreferences.Editor editor = sharedPreferences.edit(); if (response.body() != null){
// editor.putString(ORDER_ID, ""); SharedPreferences.Editor editor = sharedPreferences.edit();
// editor.putBoolean(CHECKOUT, false); editor.putString(ORDER_ID, "");
// progressDialog.dismiss(); editor.putBoolean(CHECKOUT, false);
// if (editor.commit()){ progressDialog.dismiss();
// startActivity(new Intent(PaymentActivity.this, MainActivity.class)); if (editor.commit()){
// finish(); qrCode = new QRCode(response.body());
// } qrCode.show(
// }else{ getSupportFragmentManager(),
// progressDialog.dismiss(); "QRCode"
// new AlertDialog.Builder(PaymentActivity.this) );
// .setTitle("Payment Order")
// .setMessage("Erorr save!").show();
// }
// }
//
// @Override
// public void onFailure(Call<DataResponse<PaymentsModels>> call, Throwable t) {
// progressDialog.dismiss();
// new AlertDialog.Builder(PaymentActivity.this)
// .setCancelable(false)
// .setTitle("Payment Order")
// .setMessage("Add new payment failed, try again!").show();
// }
// });
}
}else{
progressDialog.dismiss();
new AlertDialog.Builder(PaymentActivity.this)
.setTitle("Payment Order")
.setMessage("Erorr save!").show();
}
}
@Override
public void onFailure(Call<DataResponse<PaymentsModels>> call, Throwable t) {
progressDialog.dismiss();
new AlertDialog.Builder(PaymentActivity.this)
.setCancelable(false)
.setTitle("Payment Order")
.setMessage("Add new payment failed, try again!").show();
}
});
} }
} }
}); });
......
package com.yono.messeripos; package com.yono.messeripos;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Point; import android.graphics.Point;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.Display; import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.google.android.material.textview.MaterialTextView; import com.google.android.material.textview.MaterialTextView;
import com.google.zxing.WriterException; import com.google.zxing.WriterException;
import com.yono.messeripos.models.PaymentsModels;
import com.yono.messeripos.response.DataResponse;
import androidmads.library.qrgenearator.QRGContents; import androidmads.library.qrgenearator.QRGContents;
import androidmads.library.qrgenearator.QRGEncoder; import androidmads.library.qrgenearator.QRGEncoder;
public class QRCode extends AppCompatActivity { public class QRCode extends BottomSheetDialogFragment {
ImageView qrCode; ImageView qrCode;
MaterialTextView vaText; MaterialTextView vaText;
QRGEncoder qrgEncoder; QRGEncoder qrgEncoder;
String inputValue; String inputValue;
Bitmap bitmap; Bitmap bitmap;
DataResponse<PaymentsModels> paymentsModels;
public QRCode(DataResponse<PaymentsModels> paymentsModels) {
this.paymentsModels = paymentsModels;
Log.d("TAG", "QRCode: "+paymentsModels);
}
@Nullable
@Override @Override
protected void onCreate(Bundle savedInstanceState) { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); View v = inflater.inflate(
setContentView(R.layout.activity_q_r_code); R.layout.activity_q_r_code,
container,
false
);
qrCode = findViewById(R.id.qr_image); qrCode = v.findViewById(R.id.qr_image);
vaText = findViewById(R.id.etVA); vaText = v.findViewById(R.id.etVA);
generateQrCode();
} WindowManager manager = (WindowManager) getActivity().getSystemService(Context.WINDOW_SERVICE);
private void generateQrCode() {
WindowManager manager = (WindowManager) getSystemService(WINDOW_SERVICE);
Display display = manager.getDefaultDisplay(); Display display = manager.getDefaultDisplay();
Point point = new Point(); Point point = new Point();
display.getSize(point); display.getSize(point);
...@@ -57,5 +74,9 @@ public class QRCode extends AppCompatActivity { ...@@ -57,5 +74,9 @@ public class QRCode extends AppCompatActivity {
}catch (Exception e) { }catch (Exception e) {
Log.d("onCreate: ", e.toString()); Log.d("onCreate: ", e.toString());
} }
return v;
} }
} }
\ No newline at end of file
package com.yono.messeripos;
import android.content.Context;
import com.google.android.material.appbar.MaterialToolbar;
public class ToolbarApp {
}
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/form_cash" android:id="@+id/form_cash"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical" android:orientation="vertical"
style="@style/AppModalStyle" app:behavior_hideable="true"
android:padding="16dp"> android:backgroundTint="#333"
app:behavior_peekHeight="60dp"
style="@style/Widget.Rounded.BottomSheet"
android:padding="16dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<TextView <TextView
android:id="@+id/totalText" android:id="@+id/totalText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Total" android:text="Total"
android:textSize="30dp" android:textSize="30sp"
android:textFontWeight="600" android:textFontWeight="600"
android:layout_alignParentStart="true" /> android:layout_alignParentStart="true" />
<TextView <TextView
android:id="@+id/changeText" android:id="@+id/totalHarga"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Change" android:text="Rp. 600.000"
android:textSize="20sp" android:textSize="30dp"
android:textFontWeight="600" android:textFontWeight="600"
android:layout_below="@id/totalText" android:layout_alignParentEnd="true" />
android:layout_alignParentStart="true" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_below="@id/totalHarga">
<TextView <TextView
android:id="@+id/totalHarga" android:id="@+id/changeText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Rp. 600.000" android:text="Change"
android:textSize="30dp" android:textSize="20sp"
android:textFontWeight="600" android:textFontWeight="600"
android:layout_alignParentEnd="true" /> android:layout_alignParentStart="true" />
<TextView <TextView
android:id="@+id/hargaChange" android:id="@+id/hargaChange"
...@@ -49,7 +55,6 @@ ...@@ -49,7 +55,6 @@
android:text="Rp. 600.000" android:text="Rp. 600.000"
android:textSize="20sp" android:textSize="20sp"
android:textFontWeight="600" android:textFontWeight="600"
android:layout_below="@id/totalHarga"
android:layout_alignParentEnd="true" /> android:layout_alignParentEnd="true" />
<TextView <TextView
...@@ -57,6 +62,7 @@ ...@@ -57,6 +62,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Bayar" android:text="Bayar"
android:layout_marginTop="10dp"
android:textFontWeight="600" android:textFontWeight="600"
android:layout_below="@id/changeText" /> android:layout_below="@id/changeText" />
...@@ -77,8 +83,8 @@ ...@@ -77,8 +83,8 @@
android:hint="Insert Money" android:hint="Insert Money"
android:layout_below="@id/etBayar" /> android:layout_below="@id/etBayar" />
</RelativeLayout> </RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</RelativeLayout>
<?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"
android:background="@color/colorPrimaryDark">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
/> />
</RelativeLayout> </RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/qrCodeForm" <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" style="@style/Widget.Rounded.BottomSheet"
android:layout_height="wrap_content"
app:behavior_hideable="true"
app:behavior_peekHeight="56dp"
android:background="#efefef"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
tools:context=".QRCode"> xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView <ImageView
android:id="@+id/qr_image" android:id="@+id/qr_image"
android:layout_width="200dp" android:layout_width="300dp"
android:layout_height="200dp" android:layout_height="300dp"
android:backgroundTint="#333" android:backgroundTint="#333"
android:src="@mipmap/ic_launcher" android:src="@mipmap/ic_launcher"
android:layout_centerInParent="true" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/> />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
...@@ -28,10 +27,10 @@ ...@@ -28,10 +27,10 @@
android:text="Va_Text" android:text="Va_Text"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" android:textStyle="bold"
android:layout_below="@id/qr_image" app:layout_constraintTop_toBottomOf="@id/qr_image"
android:layout_centerInParent="true" app:layout_constraintEnd_toEndOf="parent"
/> app:layout_constraintStart_toStartOf="parent"
/>
</RelativeLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file \ No newline at end of file
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:background="@drawable/ic_rounded_circle" android:background="@drawable/ic_rounded_circle"
android:padding="10dp" android:padding="10dp"
android:tint="@color/colorWhite"
android:src="@drawable/ic_baseline_minus_24" android:src="@drawable/ic_baseline_minus_24"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPrice" /> app:layout_constraintTop_toBottomOf="@id/tvPrice" />
...@@ -130,6 +131,7 @@ ...@@ -130,6 +131,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/ic_rounded_circle" android:background="@drawable/ic_rounded_circle"
android:padding="10dp" android:padding="10dp"
android:tint="@color/colorWhite"
android:src="@drawable/ic_baseline_plus_24" android:src="@drawable/ic_baseline_plus_24"
app:layout_constraintBottom_toBottomOf="@id/tiQty" app:layout_constraintBottom_toBottomOf="@id/tiQty"
app:layout_constraintStart_toEndOf="@id/tiQty" /> app:layout_constraintStart_toEndOf="@id/tiQty" />
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
<item name="windowActionBarOverlay">true</item> <item name="windowActionBarOverlay">true</item>
<item name="android:fontFamily">@font/roboto</item> <item name="android:fontFamily">@font/roboto</item>
<item name="actionBarStyle">@style/ThemeActionBar</item> <item name="actionBarStyle">@style/ThemeActionBar</item>
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.Rounded.BottomSheetDialog</item>
</style> </style>
<style name="AppTheme.my.a" parent="Theme.MaterialComponents.Light.NoActionBar"> <style name="AppTheme.my.a" parent="Theme.MaterialComponents.Light.NoActionBar">
...@@ -73,6 +75,22 @@ ...@@ -73,6 +75,22 @@
<item name="android:hint">Select kategori</item> <item name="android:hint">Select kategori</item>
</style> </style>
<style name="ShapeAppearanceOverlay.Rounded.top" parent="">
<item name="cornerSizeTopLeft">10dp</item>
<item name="cornerSizeTopRight">10dp</item>
<item name="cornerFamily">rounded</item>
</style>
<style
name="ThemeOverlay.Rounded.BottomSheetDialog"
parent="@style/ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="bottomSheetStyle">@style/Widget.Rounded.BottomSheet</item>
</style>
<style name="Widget.Rounded.BottomSheet" parent="Widget.MaterialComponents.BottomSheet">
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Rounded.top</item>
</style>
<style name="AppModalStyle" parent="Widget.Design.BottomSheet.Modal"> <style name="AppModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@drawable/round_corner_sheet</item> <item name="android:background">@drawable/round_corner_sheet</item>
</style> </style>
......
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