mirror of
https://github.com/Nezumi-2711/PRM392.git
synced 2026-09-22 20:00:53 +00:00
Fix Layout
This commit is contained in:
@@ -10,7 +10,7 @@ android {
|
|||||||
minSdk 23
|
minSdk 23
|
||||||
targetSdk 30
|
targetSdk 30
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "80.0"
|
versionName "86.0"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@@ -90,6 +90,8 @@ dependencies {
|
|||||||
implementation 'com.daimajia.slider:library:1.1.5@aar'
|
implementation 'com.daimajia.slider:library:1.1.5@aar'
|
||||||
implementation "androidx.browser:browser:1.3.0"
|
implementation "androidx.browser:browser:1.3.0"
|
||||||
|
|
||||||
|
implementation 'com.github.Piashsarker:AndroidAppUpdateLibrary:1.0.4'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
@@ -11,6 +11,8 @@
|
|||||||
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
|
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_SMS" />
|
<uses-permission android:name="android.permission.RECEIVE_SMS" />
|
||||||
<uses-permission android:name="android.permission.READ_SMS" />
|
<uses-permission android:name="android.permission.READ_SMS" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
@@ -24,6 +26,16 @@
|
|||||||
tools:replace="android:theme"
|
tools:replace="android:theme"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}.provider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/provider_paths"/>
|
||||||
|
</provider>
|
||||||
|
|
||||||
<receiver android:name=".OTP_Receiver">
|
<receiver android:name=".OTP_Receiver">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ import android.content.Intent;
|
|||||||
import android.content.IntentSender;
|
import android.content.IntentSender;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@@ -210,10 +212,10 @@ public class Cart extends AppCompatActivity implements RecyclerItemTouchHelperLi
|
|||||||
}).check();
|
}).check();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setTitle("Giỏ hàng");
|
|
||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>Giỏ hàng</font>"));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package com.waterbase.foodify;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
@@ -47,8 +49,6 @@ public class FavoritesActivity extends AppCompatActivity implements RecyclerItem
|
|||||||
|
|
||||||
setContentView(R.layout.activity_favorites);
|
setContentView(R.layout.activity_favorites);
|
||||||
|
|
||||||
setTitle("Danh sách yêu thích");
|
|
||||||
|
|
||||||
rootLayout = findViewById(R.id.rootLayout);
|
rootLayout = findViewById(R.id.rootLayout);
|
||||||
|
|
||||||
txtEmptyList = findViewById(R.id.txtEmptyList);
|
txtEmptyList = findViewById(R.id.txtEmptyList);
|
||||||
@@ -67,6 +67,9 @@ public class FavoritesActivity extends AppCompatActivity implements RecyclerItem
|
|||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>Danh sách yêu thích</font>"));
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package com.waterbase.foodify;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -142,10 +144,10 @@ public class FoodDetail extends AppCompatActivity implements RatingDialogListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setTitle("Chi tiết");
|
|
||||||
|
|
||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>Chi tiết</font>"));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
@@ -183,6 +185,8 @@ public class FoodList extends AppCompatActivity {
|
|||||||
|
|
||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>" + categoryName +"</font>"));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import com.daimajia.slider.library.Animations.DescriptionAnimation;
|
|||||||
import com.daimajia.slider.library.SliderLayout;
|
import com.daimajia.slider.library.SliderLayout;
|
||||||
import com.daimajia.slider.library.SliderTypes.BaseSliderView;
|
import com.daimajia.slider.library.SliderTypes.BaseSliderView;
|
||||||
import com.daimajia.slider.library.SliderTypes.TextSliderView;
|
import com.daimajia.slider.library.SliderTypes.TextSliderView;
|
||||||
|
import com.dcastalia.localappupdate.DownloadApk;
|
||||||
import com.firebase.ui.database.FirebaseRecyclerAdapter;
|
import com.firebase.ui.database.FirebaseRecyclerAdapter;
|
||||||
import com.firebase.ui.database.FirebaseRecyclerOptions;
|
import com.firebase.ui.database.FirebaseRecyclerOptions;
|
||||||
import com.google.android.gms.tasks.OnCompleteListener;
|
import com.google.android.gms.tasks.OnCompleteListener;
|
||||||
@@ -257,8 +258,9 @@ public class Home extends AppCompatActivity implements NavigationView.OnNavigati
|
|||||||
agree.setOnClickListener(new View.OnClickListener() {
|
agree.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Uri uri = Uri.parse("https://drive.google.com/uc?id=1uDUvpzJt8p96iDNMdNrsR9lqVAT06gqk&export=download");
|
String url = "https://github.com/Piashsarker/AndroidAppUpdateLibrary/raw/master/app-debug.apk";
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW, uri));
|
DownloadApk downloadApk = new DownloadApk(Home.this);
|
||||||
|
downloadApk.startDownloadingApk(url);
|
||||||
alertDialog.dismiss();
|
alertDialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -442,7 +444,7 @@ public class Home extends AppCompatActivity implements NavigationView.OnNavigati
|
|||||||
DrawerLayout drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
DrawerLayout drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
drawerLayout.closeDrawer(GravityCompat.START);
|
drawerLayout.closeDrawer(GravityCompat.START);
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showSettingDialog() {
|
private void showSettingDialog() {
|
||||||
|
|||||||
@@ -3,9 +3,11 @@ package com.waterbase.foodify;
|
|||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.StrictMode;
|
import android.os.StrictMode;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
@@ -72,8 +74,6 @@ public class OrderDetail extends AppCompatActivity {
|
|||||||
|
|
||||||
String comment = "";
|
String comment = "";
|
||||||
|
|
||||||
setTitle("Thông tin chi tiết đơn hàng");
|
|
||||||
|
|
||||||
StrictMode.ThreadPolicy policy = new
|
StrictMode.ThreadPolicy policy = new
|
||||||
StrictMode.ThreadPolicy.Builder().permitAll().build();
|
StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||||
StrictMode.setThreadPolicy(policy);
|
StrictMode.setThreadPolicy(policy);
|
||||||
@@ -192,6 +192,8 @@ public class OrderDetail extends AppCompatActivity {
|
|||||||
|
|
||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>Thông tin chi tiết đơn hàng</font>"));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package com.waterbase.foodify;
|
|||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -59,9 +61,10 @@ public class OrderStatus extends AppCompatActivity {
|
|||||||
|
|
||||||
loadOrders(Common.currentUser.getPhone());
|
loadOrders(Common.currentUser.getPhone());
|
||||||
|
|
||||||
setTitle("Tình trạng đơn hàng");
|
|
||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>Tình trạng đơn hàng</font>"));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -34,8 +36,6 @@ public class OrderStatusDetail extends AppCompatActivity {
|
|||||||
|
|
||||||
String comment = "";
|
String comment = "";
|
||||||
|
|
||||||
setTitle("Thông tin chi tiết đơn hàng");
|
|
||||||
|
|
||||||
order_address = findViewById(R.id.order_address);
|
order_address = findViewById(R.id.order_address);
|
||||||
order_total = findViewById(R.id.order_total);
|
order_total = findViewById(R.id.order_total);
|
||||||
order_comment = findViewById(R.id.order_comment);
|
order_comment = findViewById(R.id.order_comment);
|
||||||
@@ -67,6 +67,8 @@ public class OrderStatusDetail extends AppCompatActivity {
|
|||||||
|
|
||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>Thông tin chi tiết đơn hàng</font>"));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Html;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -56,8 +58,6 @@ public class ShowComment extends AppCompatActivity {
|
|||||||
|
|
||||||
setContentView(R.layout.activity_show_comment);
|
setContentView(R.layout.activity_show_comment);
|
||||||
|
|
||||||
setTitle("Bình luận");
|
|
||||||
|
|
||||||
//Firebase
|
//Firebase
|
||||||
database = FirebaseDatabase.getInstance();
|
database = FirebaseDatabase.getInstance();
|
||||||
ratingTbl = database.getReference("Rating");
|
ratingTbl = database.getReference("Rating");
|
||||||
@@ -145,6 +145,8 @@ public class ShowComment extends AppCompatActivity {
|
|||||||
|
|
||||||
// calling the action bar
|
// calling the action bar
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
actionBar.setBackgroundDrawable(new ColorDrawable(0xFFFF5353));
|
||||||
|
actionBar.setTitle(Html.fromHtml("<font color='#ffffff'>Bình luận</font>"));
|
||||||
|
|
||||||
// showing the back button in action bar
|
// showing the back button in action bar
|
||||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||||
|
|||||||
@@ -1,106 +1,103 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView 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"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="4dp">
|
||||||
>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/view_background"
|
android:id="@+id/view_background"
|
||||||
android:background="@color/bgRowBackground"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/bgRowBackground">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/delete_icon"
|
android:id="@+id/delete_icon"
|
||||||
android:src="@drawable/ic_baseline_delete_24"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
/>
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@drawable/ic_baseline_delete_24" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_margin="10dp"
|
||||||
android:layout_toLeftOf="@id/delete_icon"
|
android:layout_toLeftOf="@id/delete_icon"
|
||||||
android:text="Xoá"
|
android:text="Xoá"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp" />
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/view_foreground"
|
android:id="@+id/view_foreground"
|
||||||
android:background="@color/white"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/cart_image"
|
android:id="@+id/cart_image"
|
||||||
android:layout_margin="5dp"
|
|
||||||
android:layout_width="70dp"
|
android:layout_width="70dp"
|
||||||
android:layout_height="70dp"/>
|
android:layout_height="70dp"
|
||||||
|
android:layout_margin="5dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_weight="9"
|
android:layout_weight="9"
|
||||||
android:layout_width="0dp"
|
android:orientation="vertical">
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cart_item_name"
|
android:id="@+id/cart_item_name"
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:gravity="center_vertical|start"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:fontFamily="@font/bold"
|
|
||||||
android:text="Food 01"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"
|
||||||
<TextView
|
android:layout_marginLeft="5dp"
|
||||||
android:id="@+id/cart_item_Price"
|
android:fontFamily="@font/bold"
|
||||||
android:layout_marginLeft="5dp"
|
android:gravity="center_vertical|start"
|
||||||
android:gravity="center_vertical|start"
|
android:text="Food 01"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true" />
|
||||||
android:fontFamily="@font/italic"
|
|
||||||
android:text="100,000"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txtDiscount"
|
android:id="@+id/cart_item_Price"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_width="wrap_content"
|
||||||
android:textAllCaps="true"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="10sp"
|
android:layout_marginLeft="5dp"
|
||||||
android:visibility="gone"
|
android:fontFamily="@font/italic"
|
||||||
android:textColor="@color/red"
|
android:gravity="center_vertical|start"
|
||||||
android:text="-50%"
|
android:text="100,000"
|
||||||
android:layout_width="wrap_content"
|
android:textAllCaps="true" />
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txtDiscount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:text="-50%"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="@color/red"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<com.cepheuen.elegantnumberbutton.view.ElegantNumberButton
|
||||||
|
android:id="@+id/btn_quantity"
|
||||||
|
android:layout_width="170dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
app:backGroundColor="@color/white"
|
||||||
|
app:finalNumber="20"
|
||||||
|
app:initialNumber="1"
|
||||||
|
app:textColor="@color/purple_500"
|
||||||
|
app:textSize="6sp"
|
||||||
|
android:layout_gravity="right"
|
||||||
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.cepheuen.elegantnumberbutton.view.ElegantNumberButton
|
|
||||||
android:id="@+id/btn_quantity"
|
|
||||||
android:layout_width="130dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="5dp"
|
|
||||||
app:textSize="6sp"
|
|
||||||
app:textColor="@color/purple_500"
|
|
||||||
app:backGroundColor="@color/white"
|
|
||||||
app:initialNumber="1"
|
|
||||||
app:finalNumber="20"
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.Foodify" parent="Theme.MaterialComponents.Light.DarkActionBar">
|
<style name="Theme.Foodify" parent="Theme.Material3.Light">
|
||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
<item name="colorPrimary">@color/purple_500</item>
|
<item name="colorPrimary">@color/purple_500</item>
|
||||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<paths>
|
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<external-path name="external_files" path="."/>
|
<external-path name="external_files" path="."/>
|
||||||
</paths>
|
</paths>
|
||||||
@@ -18,6 +18,7 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user