Commit 27ba5480 authored by Alfansyah Fadlian's avatar Alfansyah Fadlian

activity

parents fd0a033f 82fc4bab
......@@ -25,6 +25,10 @@ android {
enabled = true
}
viewBinding {
enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
......@@ -41,6 +45,11 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
......
......@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yono.messeripos">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
......@@ -10,8 +10,11 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".PaymentActivity"></activity>
android:theme="@style/AppTheme.appbar">
<activity android:name=".ProductActivity"></activity>
<activity
android:name=".PaymentActivity"
android:theme="@style/AppTheme.appbar" />
<activity android:name=".CartActivity" />
<activity android:name=".SplashScreen">
<intent-filter>
......@@ -20,9 +23,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity">
</activity>
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.appbar"></activity>
<meta-data
android:name="preloaded_fonts"
......
......@@ -2,11 +2,13 @@ package com.yono.messeripos;
import androidx.appcompat.app.AppCompatActivity;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.textfield.TextInputEditText;
import java.text.NumberFormat;
......@@ -18,13 +20,20 @@ public class CartActivity extends AppCompatActivity {
TextInputEditText tiQty;
TextView tvQtyView, tvPrice, tvTotal;
private int counter;
public int counter, prices;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cart);
MaterialToolbar toolbars = findViewById(R.id.cAppBar);
setSupportActionBar(toolbars);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setTitle("Checkout");
toolbars.setNavigationOnClickListener(view -> onBackPressed());
btMinus = findViewById(R.id.btMinus);
btPlus = findViewById(R.id.btPlus);
btDelete = findViewById(R.id.btDelete);
......@@ -35,8 +44,12 @@ public class CartActivity extends AppCompatActivity {
tvTotal = findViewById(R.id.tvTotal);
counter = Integer.parseInt(tvQtyView.getText().toString());
prices = Integer.parseInt(tvPrice.getText().toString());
tvTotal.setText(setToRp().format((double) Integer.parseInt(tvTotal.getText().toString())));
btMinus.setOnClickListener(new View.OnClickListener() {
@SuppressLint("SetTextI18n")
@Override
public void onClick(View view) {
if (counter > 1){
......@@ -46,11 +59,11 @@ public class CartActivity extends AppCompatActivity {
countTotal();
}
}
});
btPlus.setOnClickListener(new View.OnClickListener() {
@SuppressLint("SetTextI18n")
@Override
public void onClick(View view) {
counter++;
......@@ -63,10 +76,10 @@ public class CartActivity extends AppCompatActivity {
}
private void countTotal() {
int price = Integer.parseInt(tvPrice.getText().toString());
int price = prices;
int qtyView = Integer.parseInt(tvQtyView.getText().toString());
int count = price*qtyView;
String result = Integer.toString(price*qtyView);
// String result = Integer.toString(price*qtyView);
// set to view
tvTotal.setText(setToRp().format((double) count));
......@@ -75,7 +88,11 @@ public class CartActivity extends AppCompatActivity {
private NumberFormat setToRp() {
Locale ID = new Locale("in", "ID");
NumberFormat formatRp = NumberFormat.getCurrencyInstance(ID);
return formatRp;
return NumberFormat.getCurrencyInstance(ID);
}
}
/**
* Harga belum bisa di beri String (Rp)
*/
\ No newline at end of file
......@@ -11,20 +11,28 @@ import android.view.WindowManager;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;
import com.google.android.material.appbar.MaterialToolbar;
import com.yono.messeripos.adapter.ProductAdapter;
import com.yono.messeripos.databinding.ActivityMainBinding;
import com.yono.messeripos.models.MainViewModels;
import com.yono.messeripos.models.ProductModels;
import java.util.ArrayList;
public class MainActivity extends AppCompatActivity {
MaterialToolbar toolbar;
private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ProductAdapter adapter = new ProductAdapter();
binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
binding.rvProduct.setAdapter(adapter);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
......@@ -40,13 +48,19 @@ public class MainActivity extends AppCompatActivity {
@Override
public boolean onMenuItemClick(MenuItem item) {
int id = item.getItemId();
if (id == R.id.menu_cart) {
startActivity(new Intent(MainActivity.this, CartActivity.class));
startActivity(new Intent(getApplicationContext(), CartActivity.class));
}
return true;
}
});
MainViewModels mainViewModels = ViewModelProviders.of(this).get(MainViewModels.class);
// ProductModels productModels = new ViewModelProvider(this).get(ProductModels)
mainViewModels.getProduct().observe(this,mainViewModels::getProduct);//code product
mainViewModels.getCategory();
}
}
\ No newline at end of file
......@@ -5,7 +5,9 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.os.Bundle;
import android.widget.Toolbar;
import com.google.android.material.appbar.MaterialToolbar;
import com.yono.messeripos.adapter.PaymentAdapter;
import com.yono.messeripos.response.PaymentResponse;
......@@ -14,12 +16,21 @@ import java.util.ArrayList;
public class PaymentActivity extends AppCompatActivity {
private ArrayList<PaymentResponse> paymentResponses = new ArrayList<>();
MaterialToolbar toolbars;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_payment);
MaterialToolbar toolbars = findViewById(R.id.appbar);
setSupportActionBar(toolbars);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setTitle("Payment");
toolbars.setNavigationOnClickListener(view -> onBackPressed());
RecyclerView rvPayment = findViewById(R.id.rvPayment);
LinearLayoutManager llm = new LinearLayoutManager(this);
......
package com.yono.messeripos;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class ProductActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_product);
}
}
\ No newline at end of file
......@@ -4,14 +4,22 @@ import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
public class SplashScreen extends AppCompatActivity {
ImageView img;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
img = findViewById(R.id.image_splash);
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.zoom_in);
img.startAnimation(animation);
new Handler(Looper.getMainLooper()).postDelayed(()->{
startActivity(new Intent(SplashScreen.this, MainActivity.class));
......
//package com.yono.messeripos;
//
//import android.content.Context;
//
//import androidx.appcompat.app.AppCompatActivity;
//
//import com.google.android.material.appbar.MaterialToolbar;
//
//public class ToolbarApp {
//
// public ToolbarApp(Context context, int toolbar, String title) {
//
// MaterialToolbar toolbars = findViewById(toolbar);
// setSupportActionBar(toolbars);
// getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// getSupportActionBar().setDisplayShowHomeEnabled(true);
// getSupportActionBar().setTitle(title);
// }
//}
package com.yono.messeripos.adapter;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public class CartAdapter extends RecyclerView.Adapter<CartAdapter.MyViewHolder> {
@NonNull
@Override
public CartAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
}
@Override
public void onBindViewHolder(@NonNull CartAdapter.MyViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return 0;
}
public class MyViewHolder extends RecyclerView.ViewHolder {
public MyViewHolder(@NonNull View itemView) {
super(itemView);
}
}
}
package com.yono.messeripos.adapter;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
public class CategoryAdapter extends RecyclerView.Adapter<CategoryAdapter.MyViewHolder> {
@NonNull
@Override
public CategoryAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
}
@Override
public void onBindViewHolder(@NonNull CategoryAdapter.MyViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return 0;
}
public class MyViewHolder extends RecyclerView.ViewHolder {
public MyViewHolder(@NonNull View itemView) {
super(itemView);
}
}
}
package com.yono.messeripos.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.button.MaterialButton;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.card.MaterialCardView;
import com.yono.messeripos.PaymentActivity;
import com.yono.messeripos.response.PaymentResponse;
import com.yono.messeripos.R;
......@@ -29,6 +36,11 @@ public class PaymentAdapter extends RecyclerView.Adapter<PaymentAdapter.ViewHold
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
// View view = LayoutInflater.from(parent.getContext())
// .inflate(R.layout.payment_list, parent, false);
//
// return new ViewHolder(view);
PaymentListBinding paymentListBinding = DataBindingUtil.inflate(
LayoutInflater.from(parent.getContext()),
R.layout.payment_list,
......@@ -45,7 +57,6 @@ public class PaymentAdapter extends RecyclerView.Adapter<PaymentAdapter.ViewHold
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.binData(paymentResponses.get(position));
// holder.cardView.setTag(position);
// holder.radioButton.setChecked(position == getPosition);
// final PaymentModel paymentModel = paymentModels.get(position);
//
......@@ -57,23 +68,28 @@ public class PaymentAdapter extends RecyclerView.Adapter<PaymentAdapter.ViewHold
// .into(imageView);
}
@Override
public int getItemCount() {
return paymentResponses.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
MaterialCardView cardView;
PaymentListBinding binding;
public ViewHolder(@NonNull PaymentListBinding view) {
super(view.getRoot());
this.binding = view;
getPosition = getAdapterPosition();
Log.d("ViewHolder: ", String.valueOf(cardView));
}
@SuppressLint("ResourceAsColor")
public void binData(PaymentResponse paymentResponse){
binding.setPayment(paymentResponse);
}
binding.setLogo(paymentResponse.getUrl());
}
}
}
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.ItemListBinding;
import com.yono.messeripos.models.ProductModels;
import java.util.ArrayList;
import java.util.List;
public class ProductAdapter extends RecyclerView.Adapter<ProductAdapter.MyViewHolder> {
private List<ProductModels> productModels;
Context context;
public interface ProductListener {
void onUpdate(ProductModels product);
void onDelete(ProductModels product);
}
private ProductListener listener;
public void setListener(ProductListener listener) {
this.listener = listener;
}
public void setProducts(List<ProductModels> product) {
this.productModels = product;
notifyDataSetChanged();
}
@NonNull
@Override
public ProductAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new MyViewHolder(
DataBindingUtil.inflate(
LayoutInflater.from(parent.getContext()),
R.layout.item_list,
parent, false
)
);
}
@Override
public void onBindViewHolder(@NonNull ProductAdapter.MyViewHolder holder, int position) {
holder.bindData(productModels.get(position), listener);
}
@Override
public int getItemCount() {
return productModels.size();
}
public class MyViewHolder extends RecyclerView.ViewHolder {
private ItemListBinding binding;
public MyViewHolder(@NonNull ItemListBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
public void bindData(ProductModels productModels, ProductListener listener) {
binding.setProduct(productModels);
}
}
}
package com.yono.messeripos.api;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ApiHelper {
public static final String BASE_URL = "https://rest-api-meser.herokuapp.com/";
public static final String VERSI_API_1 = "api/v1/";
public static Retrofit request(String baseUrl){
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(GsonConverterFactory.create())
.build();
return retrofit;
}
}
package com.yono.messeripos.api.client;
import com.yono.messeripos.api.ApiHelper;
public class Client {
public <T> T Client(Class<T> service){
return ApiHelper.request(ApiHelper.BASE_URL).create(service);
}
}
package com.yono.messeripos.api.service;
import com.yono.messeripos.api.ApiHelper;
import com.yono.messeripos.models.CategoryModels;
import com.yono.messeripos.response.DataResponse;
import java.util.List;
import retrofit2.Call;
import retrofit2.http.GET;
public interface CategoryServise {
@GET(ApiHelper.VERSI_API_1+"categories")
Call<DataResponse<List<CategoryModels>>> getCategory();
}
package com.yono.messeripos.api.service;
import com.yono.messeripos.api.ApiHelper;
import com.yono.messeripos.models.CategoryModels;
import com.yono.messeripos.models.ProductModels;
import com.yono.messeripos.response.DataResponse;
import java.util.List;
import retrofit2.Call;
import retrofit2.http.GET;
public interface ProductService {
@GET(ApiHelper.VERSI_API_1+"products-join")
Call<DataResponse<List<ProductModels<CategoryModels>>>> getProducts();
}
package com.yono.messeripos.daos;
import androidx.room.Dao;
@Dao
public interface CartDaos {
}
package com.yono.messeripos.database;
import androidx.room.Database;
import androidx.room.RoomDatabase;
import com.yono.messeripos.daos.CartDaos;
import com.yono.messeripos.models.ProductCartModels;
@Database(entities = {ProductCartModels.class}, version = 1, exportSchema = false)
public abstract class LocalDatabase extends RoomDatabase {
public abstract CartDaos cartDaos();
private static volatile LocalDatabase INSTANCE;
private static final int NUMBER_OF_THREADS = 407;
}
package com.yono.messeripos.models;
import com.google.gson.annotations.SerializedName;
public class CartModels<T> {
@SerializedName("id")
private String idOrders;
@SerializedName("products")
private T dataOrders;
public String getIdOrders() {
return idOrders;
}
public void setIdOrders(String idOrders) {
this.idOrders = idOrders;
}
public T getDataOrders() {
return dataOrders;
}
public void setDataOrders(T dataOrders) {
this.dataOrders = dataOrders;
}
}
package com.yono.messeripos.models;
import com.google.gson.annotations.SerializedName;
public class CategoryModels {
@SerializedName("id")
private int idCategory;
@SerializedName("name")
private String nameCategory;
public int getIdCategory() {
return idCategory;
}
public void setIdCategory(int idCategory) {
this.idCategory = idCategory;
}
public String getNameCategory() {
return nameCategory;
}
public void setNameCategory(String nameCategory) {
this.nameCategory = nameCategory;
}
}
package com.yono.messeripos.models;
import android.util.Log;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.google.gson.Gson;
import com.yono.messeripos.api.client.Client;
import com.yono.messeripos.api.service.CategoryServise;
import com.yono.messeripos.api.service.ProductService;
import com.yono.messeripos.response.DataResponse;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class MainViewModels extends ViewModel {
MutableLiveData<DataResponse<List<ProductModels<List<CategoryModels>>>>> productList;
MutableLiveData<DataResponse<List<CategoryModels>>> categoryList;
Client client = new Client();
public MainViewModels(){ productList = new MutableLiveData<>();}
public MutableLiveData<DataResponse<List<ProductModels<List<CategoryModels>>>>> getProduct(){
getProductList();
return productList;
}
public MutableLiveData<DataResponse<List<CategoryModels>>> getCategory(){
getCategoryList();
return categoryList;
}
private void getProductList() {
ProductService productService = client.Client(ProductService.class);
productService.getProducts().enqueue(new Callback<DataResponse<List<ProductModels<CategoryModels>>>>() {
@Override
public void onResponse(Call<DataResponse<List<ProductModels<CategoryModels>>>> call,
Response<DataResponse<List<ProductModels<CategoryModels>>>> response) {
String js = new Gson().toJson(response.body());
Log.d("Get Data", "Response "+js);
}
@Override
public void onFailure(Call<DataResponse<List<ProductModels<CategoryModels>>>> call, Throwable t) {
Log.e("Error get product", "Response "+t.getMessage());
}
});
}
private void getCategoryList(){
CategoryServise categoryServise = client.Client(CategoryServise.class);
categoryServise.getCategory().enqueue(new Callback<DataResponse<List<CategoryModels>>>() {
@Override
public void onResponse(Call<DataResponse<List<CategoryModels>>> call, Response<DataResponse<List<CategoryModels>>> response) {
String js = new Gson().toJson(response.body());
Log.d("Get Data Category", "Response "+js);
}
@Override
public void onFailure(Call<DataResponse<List<CategoryModels>>> call, Throwable t) {
Log.e("Error get product", "Response "+t.getMessage());
}
});
}
}
package com.yono.messeripos.models;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import com.google.gson.annotations.SerializedName;
@Entity(tableName = "carts")
public class ProductCartModels implements Parcelable {
@PrimaryKey(autoGenerate = true)
@SerializedName("id")
private long id;
@SerializedName("id_orders")
private int id_orders;
@SerializedName("quantity")
private long quantity_orders;
@SerializedName("product_id")
private int id_product_orders;
@SerializedName("product_name")
private String product_name_orders;
@SerializedName("price")
private long price_orders;
@SerializedName("grand_total")
private int grand_total_orders;
public ProductCartModels(long id, int id_orders, long quantity_orders,
int id_product_orders, String product_name_orders, long price_orders,
int grand_total_orders) {
this.id = id;
this.id_orders = id_orders;
this.quantity_orders = quantity_orders;
this.id_product_orders = id_product_orders;
this.product_name_orders = product_name_orders;
this.price_orders = price_orders;
this.grand_total_orders = grand_total_orders;
}
protected ProductCartModels(Parcel in) {
id = in.readLong();
id_orders = in.readInt();
quantity_orders = in.readLong();
id_product_orders = in.readInt();
product_name_orders = in.readString();
price_orders = in.readLong();
grand_total_orders = in.readInt();
}
public static final Creator<ProductCartModels> CREATOR = new Creator<ProductCartModels>() {
@Override
public ProductCartModels createFromParcel(Parcel in) {
return new ProductCartModels(in);
}
@Override
public ProductCartModels[] newArray(int size) {
return new ProductCartModels[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(id);
parcel.writeInt(id_orders);
parcel.writeLong(quantity_orders);
parcel.writeLong(price_orders);
parcel.writeString(product_name_orders);
parcel.writeInt(grand_total_orders);
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public int getId_orders() {
return id_orders;
}
public void setId_orders(int id_orders) {
this.id_orders = id_orders;
}
public long getQuantity_orders() {
return quantity_orders;
}
public void setQuantity_orders(long quantity_orders) {
this.quantity_orders = quantity_orders;
}
public int getId_product_orders() {
return id_product_orders;
}
public void setId_product_orders(int id_product_orders) {
this.id_product_orders = id_product_orders;
}
public String getProduct_name_orders() {
return product_name_orders;
}
public void setProduct_name_orders(String product_name_orders) {
this.product_name_orders = product_name_orders;
}
public long getPrice_orders() {
return price_orders;
}
public void setPrice_orders(long price_orders) {
this.price_orders = price_orders;
}
public int getGrand_total_orders() {
return grand_total_orders;
}
public void setGrand_total_orders(int grand_total_orders) {
this.grand_total_orders = grand_total_orders;
}
}
......@@ -2,11 +2,11 @@ package com.yono.messeripos.models;
import com.google.gson.annotations.SerializedName;
public class ProductModels {
@SerializedName("id_product")
public class ProductModels<T> {
@SerializedName("id")
private int idProduct;
@SerializedName("product_name")
@SerializedName("name")
private String productName;
@SerializedName("price")
......@@ -14,4 +14,47 @@ public class ProductModels {
@SerializedName("stock")
private int stockProduct;
@SerializedName("category")
private T categoryProduct;
public int getIdProduct() {
return idProduct;
}
public void setIdProduct(int idProduct) {
this.idProduct = idProduct;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public int getPriceProduct() {
return priceProduct;
}
public void setPriceProduct(int priceProduct) {
this.priceProduct = priceProduct;
}
public int getStockProduct() {
return stockProduct;
}
public void setStockProduct(int stockProduct) {
this.stockProduct = stockProduct;
}
public T getCategoryProduct() {
return categoryProduct;
}
public void setCategoryProduct(T categoryProduct) {
this.categoryProduct = categoryProduct;
}
}
package com.yono.messeripos.models;
import com.google.gson.annotations.SerializedName;
public class UsersModels {
@SerializedName("username")
private String usernameUsers;
@SerializedName("password")
private String passwordUsers;
public String getUsernameUsers() {
return usernameUsers;
}
public void setUsernameUsers(String usernameUsers) {
this.usernameUsers = usernameUsers;
}
public String getPasswordUsers() {
return passwordUsers;
}
public void setPasswordUsers(String passwordUsers) {
this.passwordUsers = passwordUsers;
}
}
package com.yono.messeripos.response;
import androidx.appcompat.app.AppCompatActivity;
import com.google.gson.annotations.SerializedName;
public class DataResponse<T> {
......@@ -7,13 +9,12 @@ public class DataResponse<T> {
@SerializedName("status")
private Boolean statusData;
@SerializedName("messages")
@SerializedName("message")
private String messageData;
@SerializedName("data")
private T data;
public Boolean getStatusData() {
return statusData;
}
......
package com.yono.messeripos.response;
import android.widget.ImageView;
import androidx.databinding.BindingAdapter;
import com.bumptech.glide.Glide;
public class PaymentResponse {
private String url;
private String bank;
private boolean isSelected;
public boolean isSelected() {
return isSelected;
}
public void setSelected(boolean selected) {
isSelected = selected;
}
public PaymentResponse(String url, String bank) {
this.url = url;
......@@ -25,4 +40,11 @@ public class PaymentResponse {
public void setBank(String bank) {
this.bank = bank;
}
@BindingAdapter("logo_bank")
public static void loadImage(ImageView view, String url) {
Glide.with(view.getContext())
.load(url)
.into(view);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromXScale="2"
android:fromYScale="2"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="4"
android:toYScale="4" >
</scale>
</set>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</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:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
......@@ -3,10 +3,10 @@
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.89914566"
android:scaleY="0.89914566"
android:translateX="26.61"
android:translateY="35.042187">
<group android:scaleX="0.92268676"
android:scaleY="0.92268676"
android:translateX="25.62"
android:translateY="34.272957">
<path
android:pathData="M8.5,28.182m-8.5,0a8.5,8.5 0,1 1,17 0a8.5,8.5 0,1 1,-17 0"
android:fillColor="#fff"/>
......
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:tools="http://schemas.android.com/tools"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<include
android:id="@+id/cAppBar"
layout="@layout/app_bar"/>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/cAppBar">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -118,3 +129,14 @@
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
android:id="@+id/btCheckout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_checkout"
android:layout_margin="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
</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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -7,19 +7,18 @@
tools:context=".MainActivity">
<include
android:id="@+id/topAppBar"
android:id="@+id/topBar"
layout="@layout/appbar_dashboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/appbar_dashboard">
</include>
android:layout_height="wrap_content"></include>
<include
android:id="@+id/category"
layout="@layout/item_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/topAppBar"
layout="@layout/item_category"/>
android:layout_marginTop="10dp"
app:layout_constraintTop_toBottomOf="@+id/topBar" />
<!-- Scrollable content -->
......@@ -30,11 +29,9 @@
android:overScrollMode="never"
android:padding="12sp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"
app:layout_constraintTop_toBottomOf="@id/category"
app:spanCount="2"
tools:listitem="@layout/item_list" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -4,14 +4,22 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
tools:context=".PaymentActivity">
<include
android:id="@+id/appbar"
layout="@layout/app_bar"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvPayment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/appbar"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnPay"
......
<?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"
tools:context=".ProductActivity">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -6,6 +6,7 @@
android:background="@color/colorPrimaryDark">
<ImageView
android:id="@+id/image_splash"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/ic_meser_icon"
......
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
style="@style/Widget.MaterialComponents.Toolbar.Primary"
xmlns:android="http://schemas.android.com/apk/res/android">
</com.google.android.material.appbar.MaterialToolbar>
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.appbar.MaterialToolbar android:id="@+id/topAppBar"
<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
style="@style/Widget.MaterialComponents.Toolbar.Primary"
xmlns:android="http://schemas.android.com/apk/res/android"
app:menu="@menu/home"
app:navigationIcon="@drawable/ic_meser"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:paddingStart="15dp">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilSearch"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/topAppBar"
style="@style/Widget.MaterialComponents.Toolbar.Primary"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:elevation="0dp"
app:menu="@menu/home"
app:navigationIcon="@drawable/ic_meser">
<com.google.android.material.textfield.TextInputEditText
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_baseline_search_24"
android:hint="Search"
android:imeOptions="actionSearch"
android:outlineSpotShadowColor="#fff"
android:paddingStart="10dp"
android:textColor="#fff"
android:textColorHighlight="#fff"
android:textColorHint="#fff" />
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.AppBarLayout>
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
<HorizontalScrollView 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_height="40dp"
android:layout_width="match_parent"
android:layout_height="60dp"
android:scrollbars="none">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingStart="10dp"
android:paddingTop="5dp"
android:paddingEnd="10dp"
android:orientation="horizontal">
android:paddingEnd="10dp">
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/ic_launcher_background"
app:cardCornerRadius="20dp">
app:cardCornerRadius="15dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -27,10 +27,10 @@
<ImageView
android:id="@+id/image_cat"
android:layout_width="20dp"
android:layout_height="30dp"
android:src="@drawable/ic_meser"
android:layout_width="30dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:src="@drawable/ic_meser"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.06"
......@@ -42,16 +42,16 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="40dp"
android:fontFamily="@font/roboto"
android:text="Food"
android:textStyle="bold"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/image_cat"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginStart="10dp"
android:layout_marginEnd="40dp"
tools:ignore="MissingConstraints" />
......@@ -61,9 +61,9 @@
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/ic_launcher_background"
android:layout_marginStart="20dp"
app:cardCornerRadius="20dp">
android:backgroundTint="@color/ic_launcher_background"
app:cardCornerRadius="15dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -71,10 +71,10 @@
<ImageView
android:id="@+id/image_cat1"
android:layout_width="20dp"
android:layout_height="30dp"
android:src="@drawable/ic_meser"
android:layout_width="30dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:src="@drawable/ic_meser"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.06"
......@@ -86,16 +86,16 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="40dp"
android:fontFamily="@font/roboto"
android:text="Food"
android:textStyle="bold"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/image_cat1"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginStart="10dp"
android:layout_marginEnd="40dp"
tools:ignore="MissingConstraints" />
......@@ -105,9 +105,11 @@
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/ic_launcher_background"
android:layout_marginStart="20dp"
app:cardCornerRadius="20dp">
android:backgroundTint="@color/ic_launcher_background"
app:cardCornerRadius="15dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
......@@ -115,10 +117,10 @@
<ImageView
android:id="@+id/image_cat2"
android:layout_width="20dp"
android:layout_height="30dp"
android:src="@drawable/ic_meser"
android:layout_width="30dp"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:src="@drawable/ic_meser"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.06"
......@@ -130,16 +132,16 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="40dp"
android:fontFamily="@font/roboto"
android:text="Food"
android:textStyle="bold"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/image_cat2"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginStart="10dp"
android:layout_marginEnd="40dp"
tools:ignore="MissingConstraints" />
......
......@@ -64,7 +64,7 @@
android:gravity="end"
android:paddingStart="@dimen/material_emphasis_medium"
android:paddingEnd="@dimen/material_emphasis_disabled"
android:textColor="@drawable/ic_launcher_background"
android:textColor="@color/colorPrimary"
android:textSize="12sp" />
<com.google.android.material.textview.MaterialTextView
......
......@@ -8,6 +8,10 @@
<variable
name="payment"
type="com.yono.messeripos.response.PaymentResponse" />
<variable
name="logo"
type="String" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
......@@ -45,6 +49,7 @@
android:layout_width="131dp"
android:layout_height="39dp"
android:src="@drawable/ic_bni_logo"
app:logo_bank="@{logo}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......
......@@ -2,5 +2,5 @@
<adaptive-icon
xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_meser"/>
<foreground android:drawable="@drawable/ic_launcher_new_icon_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_new_icon_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_new_icon_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_meser"/>
<foreground android:drawable="@drawable/ic_launcher_new_icon_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_new_icon_background">#5B4CFF</color>
</resources>
\ No newline at end of file
......@@ -14,6 +14,12 @@
<item name="actionBarStyle">@style/ThemeActionBar</item>
</style>
<style name="AppTheme.appbar" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="ThemeActionBar" parent="Widget.MaterialComponents.Light.ActionBar.Solid">
<item name="android:background"> @null </item>
<!-- Support library compatibility -->
......
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