Commit 5500bf2e authored by Ahmad Abi Mulya's avatar Ahmad Abi Mulya

Add Login Validation and Payment Activity

parent e1f16914
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
compileSdkVersion 30 compileSdkVersion 29
buildToolsVersion "30.0.2" buildToolsVersion "30.0.2"
defaultConfig { defaultConfig {
applicationId "com.example.yourcashiertest" applicationId "com.example.yourcashiertest"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 30 targetSdkVersion 29
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
...@@ -33,15 +33,25 @@ android { ...@@ -33,15 +33,25 @@ android {
dependencies { dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"]) implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
def lifecycle_version = "2.2.0"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
def glide_version = "4.11.0"
implementation "com.github.bumptech.glide:glide:$glide_version"
annotationProcessor "com.github.bumptech.glide:compiler:$glide_version"
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.2.0"
implementation 'com.google.android.material:material:1.2.0'
implementation "com.github.bumptech.glide:glide:4.11.0"
annotationProcessor "com.github.bumptech.glide:compiler:4.11.0"
implementation "androidx.room:room-runtime:2.2.5"
annotationProcessor "androidx.room:room-compiler:2.2.5"
} }
\ No newline at end of file
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
<activity <activity
android:name=".activities.CartActivity" android:name=".activities.CartActivity"
android:theme="@style/AppTheme2" /> android:theme="@style/AppTheme2" />
<activity android:name=".activities.MainActivity" android:theme="@style/AppTheme2"/> <activity android:name=".activities.MainActivity"/>
<activity android:name=".activities.ProductActivity" android:theme="@style/AppTheme2"/> <activity android:name=".activities.ProductActivity"/>
<activity android:name=".activities.LoginActivity"/>
<meta-data <meta-data
android:name="preloaded_fonts" android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" /> android:resource="@array/preloaded_fonts" />
......
...@@ -12,11 +12,13 @@ import com.example.yourcashiertest.R; ...@@ -12,11 +12,13 @@ import com.example.yourcashiertest.R;
public class CartActivity extends AppCompatActivity { public class CartActivity extends AppCompatActivity {
ImageView btnBack; ImageView btnBack;
Button btnCheckout;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cart); setContentView(R.layout.activity_cart);
btnCheckout = findViewById(R.id.btnCheckout);
btnBack = findViewById(R.id.ivBtnBack); btnBack = findViewById(R.id.ivBtnBack);
btnBack.setOnClickListener(new View.OnClickListener() { btnBack.setOnClickListener(new View.OnClickListener() {
@Override @Override
...@@ -24,5 +26,12 @@ public class CartActivity extends AppCompatActivity { ...@@ -24,5 +26,12 @@ public class CartActivity extends AppCompatActivity {
startActivity(new Intent(CartActivity.this, MainActivity.class)); startActivity(new Intent(CartActivity.this, MainActivity.class));
} }
}); });
btnCheckout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(CartActivity.this, PaymentActivity.class));
}
});
} }
} }
\ No newline at end of file
package com.example.yourcashiertest.activities;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.example.yourcashiertest.R;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.textfield.TextInputEditText;
public class LoginActivity extends AppCompatActivity {
TextInputEditText etUsername, etPassword;
MaterialButton btnLogin;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
etPassword = findViewById(R.id.etPassword);
etUsername = findViewById(R.id.etUsername);
btnLogin = findViewById(R.id.btnLogin);
btnLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
intent.putExtra("username", etUsername.getText().toString());
if(etUsername.getText().toString().length() == 0 || etPassword.getText().toString().length() == 0){
Toast.makeText(getApplicationContext(), "Please input Username and Password", Toast.LENGTH_SHORT).show();
}else if(!etPassword.getText().toString().matches("[A-Za-z0-9]+")){
etPassword.setError("Passwords can only contain Alphanumeric");
}else if(etPassword.getText().toString().length() < 8) {
etPassword.setError("Password length cannot be less than 8 characters");
}else{
finish();
startActivity(intent);
}
}
});
}
}
\ No newline at end of file
...@@ -9,49 +9,43 @@ import android.view.MenuItem; ...@@ -9,49 +9,43 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.PopupMenu; import android.widget.PopupMenu;
import android.widget.TextView;
import com.example.yourcashiertest.R; import com.example.yourcashiertest.R;
import com.google.android.material.textfield.TextInputEditText;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
TextView tv_user;
ImageView iv_settings, ivCart;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
ImageView iv_settings, ivCart; tv_user = findViewById(R.id.tv_user);
ivCart = findViewById(R.id.ivCart); ivCart = findViewById(R.id.ivCart);
iv_settings = findViewById(R.id.iv_settings); iv_settings = findViewById(R.id.iv_settings);
ivCart.setOnClickListener(new View.OnClickListener() {
@Override tv_user.setText(getIntent().getStringExtra("username"));
public void onClick(View view) { ivCart.setOnClickListener(view -> startActivity(new Intent(MainActivity.this, CartActivity.class)));
startActivity(new Intent(MainActivity.this, CartActivity.class)); iv_settings.setOnClickListener(view -> {
} PopupMenu popupMenu = new PopupMenu(getApplicationContext(), iv_settings);
}); popupMenu.setOnMenuItemClickListener(item -> {
iv_settings.setOnClickListener(new View.OnClickListener() { switch (item.getItemId()) {
@Override case R.id.item_one:
public void onClick(View view) { // item one clicked
PopupMenu popupMenu = new PopupMenu(getApplicationContext(), iv_settings); startActivity(new Intent(MainActivity.this, ProductActivity.class));
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { break;
@Override case R.id.item_two:
public boolean onMenuItemClick(MenuItem item) { // item two clicked
switch (item.getItemId()) { return true;
case R.id.item_one: }
// item one clicked
startActivity(new Intent(MainActivity.this, ProductActivity.class)); return false;
break; });
case R.id.item_two: popupMenu.inflate(R.menu.settings_menu);
// item two clicked popupMenu.show();
return true;
}
return false;
}
});
popupMenu.inflate(R.menu.settings_menu);
popupMenu.show();
}
}); });
} }
} }
\ No newline at end of file
...@@ -14,7 +14,7 @@ public class SplashActivity extends AppCompatActivity { ...@@ -14,7 +14,7 @@ public class SplashActivity extends AppCompatActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash); setContentView(R.layout.activity_splash);
new Handler(Looper.getMainLooper()).postDelayed(() -> { new Handler(Looper.getMainLooper()).postDelayed(() -> {
startActivity(new Intent(this, MainActivity.class)); startActivity(new Intent(this, LoginActivity.class));
finish(); finish();
}, 3000); }, 3000);
} }
......
package com.example.yourcashiertest.adapters;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.example.yourcashiertest.R;
import com.example.yourcashiertest.databinding.ItemListBinding;
import com.example.yourcashiertest.entities.Product;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.List;
public class ProductAdapter extends RecyclerView.Adapter<ProductAdapter.ViewHolder> {
private List<Product> products = new ArrayList<>();
public interface ProductListener {
void onUpdate(Product product);
void onDelete(Product product);
}
private ProductListener listener;
public void setListener(ProductListener listener) {
this.listener = listener;
}
public void setProducts(List<Product> products) {
this.products = products;
notifyDataSetChanged();
}
@NonNull
@Override
public ProductAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(
DataBindingUtil.inflate(
LayoutInflater.from(parent.getContext()),
R.layout.item_product,
parent,
false
)
);
}
@Override
public void onBindViewHolder(@NonNull ProductAdapter.ViewHolder holder, int position) {
holder.bindData(products.get(position), listener);
}
@Override
public int getItemCount() {
return products.size();
}
public static class ViewHolder extends RecyclerView.ViewHolder {
private ItemListBinding binding;
public ViewHolder(@NonNull ItemListBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
public void bindData(Product product, ProductListener listener) {
binding.setProduct(product);
DecimalFormat rupiah = (DecimalFormat) DecimalFormat.getCurrencyInstance();
DecimalFormatSymbols format = new DecimalFormatSymbols();
format.setCurrencySymbol("Rp. ");
format.setMonetaryDecimalSeparator(',');
format.setGroupingSeparator('.');
rupiah.setDecimalFormatSymbols(format);
binding.setPrice(rupiah.format(product.getPrice()));
binding.ivUpdate.setOnClickListener(view -> listener.onUpdate(product));
binding.ivDelete.setOnClickListener(view -> listener.onDelete(product));
}
}
}
\ No newline at end of file
package com.example.yourcashiertest.daos;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
import com.example.yourcashiertest.entities.Product;
import java.util.List;
@Dao
public interface ProductDao {
@Query("SELECT * FROM products ORDER BY id DESC")
public LiveData<List<Product>> getProducts();
@Query("SELECT * FROM products WHERE name LIKE :query ORDER BY id DESC")
public LiveData<List<Product>> getFilteredProducts(String query);
@Insert(onConflict = OnConflictStrategy.IGNORE)
public void insertProduct(Product product);
@Update
public void updateProduct(Product product);
@Delete
public void deleteProduct(Product product);
}
package com.example.yourcashiertest.databases;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.room.Database;
import androidx.room.DatabaseConfiguration;
import androidx.room.InvalidationTracker;
import androidx.room.Room;
import androidx.room.RoomDatabase;
import androidx.sqlite.db.SupportSQLiteOpenHelper;
import com.example.yourcashiertest.daos.ProductDao;
import com.example.yourcashiertest.entities.Product;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@Database(entities = {Product.class}, version = 1, exportSchema = false)
public abstract class LocalDatabase extends RoomDatabase {
public abstract ProductDao productDao();
private static volatile LocalDatabase INSTANCE;
private static final int NUMBER_OF_THREADS = 4;
public static final ExecutorService databaseWriteExecutor =
Executors.newFixedThreadPool(NUMBER_OF_THREADS);
public static LocalDatabase getDatabase(Context context) {
if (INSTANCE == null) {
synchronized (LocalDatabase.class) {
if (INSTANCE == null) {
INSTANCE = Room.databaseBuilder(context.getApplicationContext(),
LocalDatabase.class, "pasarindo_database")
.build();
}
}
}
return INSTANCE;
}
@NonNull
@Override
protected SupportSQLiteOpenHelper createOpenHelper(DatabaseConfiguration config) {
return null;
}
@NonNull
@Override
protected InvalidationTracker createInvalidationTracker() {
return null;
}
@Override
public void clearAllTables() {
}
}
package com.example.yourcashiertest.entities;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@Entity(tableName = "products")
public class Product implements Parcelable {
@PrimaryKey(autoGenerate = true)
private long id;
private long price, quantity;
private String photo = "", name = "", description = "", category = "";
public Product(long price, long quantity, String photo, String name, String description, String category) {
this.price = price;
this.quantity = quantity;
this.photo = photo;
this.name = name;
this.description = description;
this.category = category;
}
protected Product(Parcel in) {
id = in.readLong();
price = in.readLong();
quantity = in.readLong();
photo = in.readString();
name = in.readString();
description = in.readString();
category = in.readString();
}
public static final Creator<Product> CREATOR = new Creator<Product>() {
@Override
public Product createFromParcel(Parcel in) {
return new Product(in);
}
@Override
public Product[] newArray(int size) {
return new Product[size];
}
};
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public long getPrice() {
return price;
}
public void setPrice(long price) {
this.price = price;
}
public long getQuantity() {
return quantity;
}
public void setQuantity(long quantity) {
this.quantity = quantity;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(id);
parcel.writeLong(price);
parcel.writeLong(quantity);
parcel.writeString(photo);
parcel.writeString(name);
parcel.writeString(description);
parcel.writeString(category);
}
}
package com.example.yourcashiertest.repositories;
import android.app.Application;
import androidx.lifecycle.LiveData;
import com.example.yourcashiertest.daos.ProductDao;
import com.example.yourcashiertest.databases.LocalDatabase;
import com.example.yourcashiertest.entities.Product;
import java.util.List;
public class ProductRepository {
private ProductDao productDao;
private LiveData<List<Product>> products;
public ProductRepository(Application application) {
LocalDatabase db = LocalDatabase.getDatabase(application);
productDao = db.productDao();
products = productDao.getProducts();
}
public void insert(Product product) {
LocalDatabase.databaseWriteExecutor.execute(() -> productDao.insertProduct(product));
}
public void update(Product product) {
LocalDatabase.databaseWriteExecutor.execute(() -> productDao.updateProduct(product));
}
public void delete(Product product) {
LocalDatabase.databaseWriteExecutor.execute(() -> productDao.deleteProduct(product));
}
public LiveData<List<Product>> filteredProducts(String s) {
return productDao.getFilteredProducts(s);
}
}
package com.example.yourcashiertest.viewmodels;
import android.app.Application;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Transformations;
import com.example.yourcashiertest.entities.Product;
import com.example.yourcashiertest.repositories.ProductRepository;
import java.io.File;
import java.util.List;
public class ProductViewModel extends AndroidViewModel {
private MutableLiveData<String> photo = new MutableLiveData<>("");
private MutableLiveData<String> query = new MutableLiveData<>("%");
private MutableLiveData<Product> product = new MutableLiveData<>();
private LiveData<List<Product>> products;
private ProductRepository repository;
public void setPhoto(String photo) {
this.photo.setValue(photo);
}
public void setProduct(Product product) {
this.product.setValue(product);
}
public LiveData<String> getPhoto() {
return photo;
}
public LiveData<List<Product>> getProducts() {
return products;
}
public ProductViewModel(@NonNull Application application) {
super(application);
repository = new ProductRepository(application);
products = Transformations.switchMap(query, s -> repository.filteredProducts(s));
}
public void filter(String s) {
String query = TextUtils.isEmpty(s) ? "%" : "%" + s + "%";
this.query.postValue(query);
}
public void insertProduct(Product product) {
repository.insert(product);
}
public void updateProduct(Product product) {
repository.update(product);
}
public void deleteProduct(Product product) {
File photo = new File(product.getPhoto());
if (photo.exists() && photo.delete())
System.out.println("DELETED: " + product.getPhoto());
repository.delete(product);
}
public MutableLiveData<Product> getProduct() {
return product;
}
}
\ 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="50dp"/>
<stroke
android:width="0.5dp"
android:color="#45E1D1" />
<solid android:color="#45E1D1" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
</selector>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:radius="200dp"/> android:radius="200dp"/>
<stroke <stroke
android:width="0.5dp" android:width="10dp"
android:color="#FFFFFF" /> android:color="#FFFFFF" />
<solid android:color="@color/color_white" /> <solid android:color="@color/color_white" />
......
<vector android:height="24dp" android:tint="#FFFFFF"
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="M11,9h2L13,6h3L16,4h-3L13,1h-2v3L8,4v2h3v3zM7,18c-1.1,0 -1.99,0.9 -1.99,2S5.9,22 7,22s2,-0.9 2,-2 -0.9,-2 -2,-2zM17,18c-1.1,0 -1.99,0.9 -1.99,2s0.89,2 1.99,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM7.17,14.75l0.03,-0.12 0.9,-1.63h7.45c0.75,0 1.41,-0.41 1.75,-1.03l3.86,-7.01L19.42,4h-0.01l-1.1,2 -2.76,5L8.53,11l-0.13,-0.27L6.16,6l-0.95,-2 -0.94,-2L1,2v2h2l3.6,7.59 -1.35,2.45c-0.16,0.28 -0.25,0.61 -0.25,0.96 0,1.1 0.9,2 2,2h12v-2L7.42,15c-0.13,0 -0.25,-0.11 -0.25,-0.25z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="380"
android:viewportHeight="384">
<path
android:fillColor="@android:color/white"
android:pathData="M64,341.333C64,364.907 83.093,384 106.667,384h170.667C300.907,384 320,364.907 320,341.333v-256H64V341.333z" />
<path
android:fillColor="@android:color/white"
android:pathData="M266.667,21.333l-21.334,-21.333l-106.666,0l-21.334,21.333l-74.666,0l0,42.667l298.666,0l0,-42.667z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="348.882"
android:viewportHeight="348.882">
<path
android:fillColor="@android:color/white"
android:pathData="M333.988,11.758l-0.42,-0.383C325.538,4.04 315.129,0 304.258,0c-12.187,0 -23.888,5.159 -32.104,14.153L116.803,184.231c-1.416,1.55 -2.49,3.379 -3.154,5.37l-18.267,54.762c-2.112,6.331 -1.052,13.333 2.835,18.729c3.918,5.438 10.23,8.685 16.886,8.685c0,0 0.001,0 0.001,0c2.879,0 5.693,-0.592 8.362,-1.76l52.89,-23.138c1.923,-0.841 3.648,-2.076 5.063,-3.626L336.771,73.176C352.937,55.479 351.69,27.929 333.988,11.758zM130.381,234.247l10.719,-32.134l0.904,-0.99l20.316,18.556l-0.904,0.99L130.381,234.247zM314.621,52.943L182.553,197.53l-20.316,-18.556L294.305,34.386c2.583,-2.828 6.118,-4.386 9.954,-4.386c3.365,0 6.588,1.252 9.082,3.53l0.419,0.383C319.244,38.922 319.63,47.459 314.621,52.943z" />
<path
android:fillColor="@android:color/white"
android:pathData="M303.85,138.388c-8.284,0 -15,6.716 -15,15v127.347c0,21.034 -17.113,38.147 -38.147,38.147H68.904c-21.035,0 -38.147,-17.113 -38.147,-38.147V100.413c0,-21.034 17.113,-38.147 38.147,-38.147h131.587c8.284,0 15,-6.716 15,-15s-6.716,-15 -15,-15H68.904c-37.577,0 -68.147,30.571 -68.147,68.147v180.321c0,37.576 30.571,68.147 68.147,68.147h181.798c37.576,0 68.147,-30.571 68.147,-68.147V153.388C318.85,145.104 312.134,138.388 303.85,138.388z" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient android:endColor="@color/colorPrimary" android:startColor="@color/white" android:angle="90"/>
</shape>
</item>
</selector>
\ No newline at end of file
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
tools:layout_editor_absoluteX="9dp" /> tools:layout_editor_absoluteX="9dp" />
<include <include
android:id="@+id/include"
layout="@layout/cart_item" layout="@layout/cart_item"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -88,5 +89,15 @@ ...@@ -88,5 +89,15 @@
app:layout_constraintTop_toBottomOf="@+id/view" app:layout_constraintTop_toBottomOf="@+id/view"
app:layout_constraintVertical_bias="0.071" /> app:layout_constraintVertical_bias="0.071" />
<Button
android:id="@+id/btnCheckout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/checkout"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include"
app:layout_constraintVertical_bias="1.0"
tools:layout_editor_absoluteX="39dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </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_margin="@dimen/space_default"
android:layout_height="match_parent"
tools:context=".activities.LoginActivity">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tvLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="25dp"
android:layout_marginTop="80dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:textStyle="bold"
android:text="Login"/>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilUsername"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tvLogin"
android:layout_marginTop="60dp"
android:layout_marginStart="@dimen/space_default"
android:layout_marginEnd="@dimen/space_default"
android:layout_marginBottom="@dimen/space_default">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Masukkan username..."
android:inputType="textCapWords"
android:imeOptions="actionNext"
android:textSize="@dimen/text_default" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilPassword"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tilUsername"
android:layout_marginStart="@dimen/space_default"
android:layout_marginTop="20dp"
android:layout_marginEnd="@dimen/space_default"
android:layout_marginBottom="@dimen/space_default">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Masukkan password..."
android:inputType="textPassword"
android:textSize="@dimen/text_default" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnLogin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Login"
android:backgroundTint="@color/colorPrimary"
app:layout_constraintTop_toBottomOf="@+id/tilPassword"
android:layout_marginTop="60dp"
app:layout_constraintEnd_toEndOf="parent"
android:padding="@dimen/space_default"
app:cornerRadius="@dimen/space_default"
android:layout_marginEnd="@dimen/space_default"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
tools:context=".activities.MainActivity"> tools:context=".activities.MainActivity">
<!-- Rectangle 4 --> <!-- Rectangle 4 -->
<View <View
android:id="@+id/rectangle_4" android:id="@+id/rectangle_4"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -90,6 +88,7 @@ ...@@ -90,6 +88,7 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="match_parent" android:layout_width="match_parent"
android:padding="10dp" android:padding="10dp"
app:hintTextColor="@color/black"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/space_default" android:layout_margin="@dimen/space_default"
app:layout_constraintBottom_toBottomOf="@+id/rectangle_4" app:layout_constraintBottom_toBottomOf="@+id/rectangle_4"
......
...@@ -4,111 +4,159 @@ ...@@ -4,111 +4,159 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="12dp"
tools:context=".activities.PaymentActivity"> tools:context=".activities.PaymentActivity">
<!-- Payment --> <!-- Payment -->
<com.google.android.material.textview.MaterialTextView
<TextView android:id="@+id/tvPayment"
android:id="@+id/payment"
android:layout_width="108dp" android:layout_width="108dp"
android:layout_height="28dp" android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="top" android:gravity="top"
android:text="@string/payment" android:text="@string/payment"
android:textAppearance="@style/payment" android:textAppearance="@style/payment"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toTopOf="@id/cvCash"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.115" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.044" /> app:layout_constraintVertical_bias="0.105" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tvTotal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elegantTextHeight="true"
android:gravity="center"
android:text="Rp. 500.000"
android:textSize="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.902"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvPayment"
app:layout_constraintVertical_bias="0.0" />
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:layout_width="340dp" android:id="@+id/cvCash"
android:layout_width="match_parent"
android:layout_height="100dp" android:layout_height="100dp"
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginTop="20dp"
android:clickable="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/payment" app:layout_constraintTop_toBottomOf="@+id/tvTotal">
app:layout_constraintVertical_bias="0.04000002">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ImageView <ImageView
android:id="@+id/iv_cash" android:id="@+id/iv_cash"
android:layout_width="wrap_content" android:layout_width="200dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/wallet"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.8" app:layout_constraintVertical_bias="0.8" />
tools:srcCompat="@tools:sample/avatars" />
<TextView <TextView
android:id="@+id/cash" android:id="@+id/cash"
android:layout_width="138dp" android:layout_width="138dp"
android:layout_height="33dp" android:layout_height="33dp"
android:gravity="center"
android:text="@string/cash" android:text="@string/cash"
android:textAppearance="@style/cash" android:textAppearance="@style/cash"
app:layout_constraintBottom_toBottomOf="@+id/iv_cash" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.189" app:layout_constraintHorizontal_bias="0.324"
app:layout_constraintStart_toEndOf="@+id/iv_cash" app:layout_constraintStart_toEndOf="@+id/iv_cash"
app:layout_constraintTop_toTopOf="@+id/iv_cash" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" /> app:layout_constraintVertical_bias="0.507" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/cvCard"
android:layout_width="match_parent"
android:layout_height="100dp"
android:clickable="true"
android:layout_marginTop="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cvCash"
app:layout_constraintVertical_bias="0.04000002">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_card"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:src="@drawable/credit_card"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.8" />
<TextView <TextView
android:id="@+id/rp_500_000" android:id="@+id/card"
android:layout_width="138dp" android:layout_width="138dp"
android:layout_height="33dp" android:layout_height="33dp"
android:layout_alignParentLeft="true" android:gravity="center"
android:layout_alignParentTop="true" android:text="@string/card"
android:gravity="top" android:textAppearance="@style/cash"
android:text="@string/rp_500_000"
android:textAppearance="@style/rp_500_000"
app:layout_constraintBottom_toBottomOf="@+id/iv_cash"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.193"
app:layout_constraintStart_toEndOf="@+id/iv_cash"
app:layout_constraintTop_toBottomOf="@+id/cash"
app:layout_constraintVertical_bias="0.145" />
<View
android:id="@+id/rectangle_2"
android:layout_width="96dp"
android:layout_height="44dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@drawable/rectangle_2"
android:backgroundTint="#45E1D1"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0" app:layout_constraintHorizontal_bias="0.324"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toEndOf="@+id/iv_card"
app:layout_constraintTop_toBottomOf="@+id/rp_500_000" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" /> app:layout_constraintVertical_bias="0.507" />
<TextView
android:id="@+id/pay"
android:layout_width="wrap_content"
android:layout_height="23dp"
android:text="@string/pay"
android:textAppearance="@style/pay"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/rectangle_2"
app:layout_constraintEnd_toEndOf="@+id/rectangle_2"
app:layout_constraintStart_toStartOf="@+id/rectangle_2"
app:layout_constraintTop_toTopOf="@+id/rectangle_2" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/tvAmountPaid"
android:layout_width="100dp"
android:layout_height="30dp"
android:layout_marginTop="208dp"
android:layout_marginBottom="90dp"
android:gravity="start"
android:text="Amount paid"
app:layout_constraintBottom_toTopOf="@id/etAmountPaid"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cvCard" />
<EditText
android:id="@+id/etAmountPaid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:gravity="center"
app:layout_constraintBottom_toTopOf="@id/btnPay"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.333"
app:layout_constraintStart_toStartOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnPay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="PAY"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="654dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
<variable <variable
name="photo" name="photo"
type="String" /> type="String" />
<variable
name="viewModel"
type="com.example.yourcashiertest.viewmodels.ProductViewModel" />
</data> </data>
<LinearLayout <LinearLayout
...@@ -118,6 +122,7 @@ ...@@ -118,6 +122,7 @@
android:layout_marginEnd="@dimen/space_default"> android:layout_marginEnd="@dimen/space_default">
<AutoCompleteTextView <AutoCompleteTextView
android:id="@+id/spCategory" android:id="@+id/spCategory"
android:hint="Categori"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"/> android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:id="@+id/splash_scre" android:id="@+id/splash_scre"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/splash_scre" android:background="@drawable/splash2"
tools:context=".activities.SplashActivity"> tools:context=".activities.SplashActivity">
<ImageView <ImageView
android:id="@+id/ivLogo" android:id="@+id/ivLogo"
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
app:layout_constraintVertical_bias="1.0" /> app:layout_constraintVertical_bias="1.0" />
<View <View
android:id="@+id/rectangle_1" android:id="@+id/v_add"
android:layout_width="78dp" android:layout_width="78dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
...@@ -77,9 +77,9 @@ ...@@ -77,9 +77,9 @@
android:layout_height="10dp" android:layout_height="10dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:background="@drawable/minus" android:background="@drawable/minus"
app:layout_constraintBottom_toBottomOf="@+id/rectangle_1" app:layout_constraintBottom_toBottomOf="@+id/v_add"
app:layout_constraintStart_toStartOf="@+id/rectangle_1" app:layout_constraintStart_toStartOf="@+id/v_add"
app:layout_constraintTop_toTopOf="@+id/rectangle_1" app:layout_constraintTop_toTopOf="@+id/v_add"
app:layout_constraintVertical_bias="0.566" /> app:layout_constraintVertical_bias="0.566" />
<Button <Button
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
android:layout_height="10dp" android:layout_height="10dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:background="@drawable/plus" android:background="@drawable/plus"
app:layout_constraintBottom_toBottomOf="@+id/rectangle_1" app:layout_constraintBottom_toBottomOf="@+id/v_add"
app:layout_constraintEnd_toEndOf="@+id/rectangle_1" app:layout_constraintEnd_toEndOf="@+id/v_add"
app:layout_constraintTop_toTopOf="@+id/rectangle_1" app:layout_constraintTop_toTopOf="@+id/v_add"
app:layout_constraintVertical_bias="0.533" /> app:layout_constraintVertical_bias="0.533" />
<TextView <TextView
...@@ -98,10 +98,10 @@ ...@@ -98,10 +98,10 @@
android:layout_width="10dp" android:layout_width="10dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="2" android:text="2"
app:layout_constraintBottom_toBottomOf="@+id/rectangle_1" app:layout_constraintBottom_toBottomOf="@+id/v_add"
app:layout_constraintEnd_toStartOf="@+id/btn_add" app:layout_constraintEnd_toStartOf="@+id/btn_add"
app:layout_constraintStart_toEndOf="@+id/btn_min" app:layout_constraintStart_toEndOf="@+id/btn_min"
app:layout_constraintTop_toTopOf="@+id/rectangle_1" /> app:layout_constraintTop_toTopOf="@+id/v_add" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView <layout 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" 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"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout <data>
<variable
name="product"
type="com.example.yourcashiertest.entities.Product" />
<variable
name="price"
type="String" />
</data>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/imageView5" android:layout_width="match_parent"
android:layout_width="wrap_content" android:padding="10dp"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:background="@drawable/elips"
app:layout_constraintBottom_toBottomOf="parent" <ImageView
app:layout_constraintEnd_toEndOf="parent" android:id="@+id/iv_product"
app:layout_constraintHorizontal_bias="0.452" android:adjustViewBounds="true"
app:layout_constraintStart_toStartOf="parent" android:layout_width="match_parent"
app:layout_constraintTop_toTopOf="parent" android:layout_height="wrap_content"
app:layout_constraintVertical_bias="0.026" app:layout_constraintBottom_toBottomOf="parent"
tools:srcCompat="@tools:sample/avatars" /> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.526"
<TextView app:layout_constraintStart_toStartOf="parent"
android:id="@+id/tv_name" app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content" app:layout_constraintVertical_bias="0.075"
android:layout_height="wrap_content" android:src="@drawable/burger"/>
android:text="Burger Medium"
app:layout_constraintBottom_toBottomOf="parent" <ImageView
app:layout_constraintEnd_toEndOf="parent" android:id="@+id/ivUpdate"
app:layout_constraintHorizontal_bias="0.45" android:layout_width="wrap_content"
app:layout_constraintStart_toStartOf="parent" android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/imageView5" android:padding="@dimen/space_small"
app:layout_constraintVertical_bias="0.089" /> android:src="@drawable/ic_update"
</androidx.constraintlayout.widget.ConstraintLayout> app:layout_constraintBottom_toBottomOf="@+id/iv_product"
app:layout_constraintStart_toStartOf="@+id/iv_product"
</com.google.android.material.card.MaterialCardView> app:layout_constraintTop_toTopOf="@+id/iv_product"
\ No newline at end of file app:layout_constraintVertical_bias="0.0" />
<ImageView
android:id="@+id/ivDelete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:padding="@dimen/space_small"
android:src="@drawable/ic_delete"
app:layout_constraintBottom_toBottomOf="@+id/iv_product"
app:layout_constraintEnd_toEndOf="@+id/iv_product"
app:layout_constraintTop_toTopOf="@+id/iv_product"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/name"
android:layout_margin="10dp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.45"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_product"
app:layout_constraintVertical_bias="0.089" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/deskripsi"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/tv_name"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/tv_name"
app:layout_constraintTop_toBottomOf="@+id/tv_name"
app:layout_constraintVertical_bias="0.045" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="@string/price"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/tv_desc"
app:layout_constraintTop_toBottomOf="@+id/tv_desc"
app:layout_constraintVertical_bias="0.37" />
<View
android:id="@+id/v_add"
android:layout_width="70dp"
android:layout_height="30dp"
android:background="@drawable/btn_shape"
app:layout_constraintBottom_toBottomOf="@+id/tv_price"
app:layout_constraintEnd_toEndOf="@+id/tv_name"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toEndOf="@+id/tv_price"
app:layout_constraintTop_toTopOf="@+id/tv_price"
app:layout_constraintVertical_bias="0.0" />
<ImageView
android:id="@+id/iv_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/v_add"
app:layout_constraintEnd_toEndOf="@+id/v_add"
app:layout_constraintStart_toStartOf="@+id/v_add"
app:layout_constraintTop_toTopOf="@+id/v_add"
app:srcCompat="@drawable/ic_baseline_add_shopping_cart_24" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</layout>
\ No newline at end of file
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
<string name="items">3 items</string> <string name="items">3 items</string>
<string name="payment">Payment</string> <string name="payment">Payment</string>
<string name="cash">Cash</string> <string name="cash">Cash</string>
<string name="card">Card</string>
<string name="rp_500_000">Rp. 500.000</string> <string name="rp_500_000">Rp. 500.000</string>
<string name="pay">Pay</string> <string name="pay">Pay</string>
<string name="checkout">Checkout</string>
<string name="deskripsi">Burger medium with tomato and meet.</string>
<string name="name">Burger Medium</string>
<string name="price">$600.00</string>
</resources> </resources>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">#333</item>
</style> </style>
<style name="burger_medi"> <style name="burger_medi">
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<style name="payment"> <style name="payment">
<item name="android:textSize"> <item name="android:textSize">
24sp 27sp
</item> </item>
<item name="android:textColor"> <item name="android:textColor">
......
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