mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 13:38:41 +00:00
Fix layout, bug and improvement performance app
This commit is contained in:
@@ -1,55 +0,0 @@
|
|||||||
name: Android CI
|
|
||||||
|
|
||||||
env:
|
|
||||||
# The name of the main module repository
|
|
||||||
main_project_module: app
|
|
||||||
|
|
||||||
on:
|
|
||||||
# Triggers the workflow on push or pull request events but only for default and protected branches
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
|
|
||||||
# Set Current Date As Env Variable
|
|
||||||
- name: Set current date as env variable
|
|
||||||
run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Set Repository Name As Env Variable
|
|
||||||
- name: Set repository name as env variable
|
|
||||||
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set Up JDK
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: 11
|
|
||||||
|
|
||||||
- name: Change wrapper permissions
|
|
||||||
run: chmod +x ./gradlew
|
|
||||||
|
|
||||||
# Run Build Project
|
|
||||||
- name: Build gradle project
|
|
||||||
run: ./gradlew build
|
|
||||||
|
|
||||||
# Create APK Debug
|
|
||||||
- name: Build apk debug project (APK) - ${{ env.main_project_module }} module
|
|
||||||
run: ./gradlew assembleDebug
|
|
||||||
|
|
||||||
# Upload Artifact Build
|
|
||||||
# Noted For Output [main_project_module]/build/outputs/apk/debug/
|
|
||||||
- name: Upload APK Debug - ${{ env.repository_name }}
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) debug generated
|
|
||||||
path: ${{ env.main_project_module }}/build/outputs/apk/debug/
|
|
||||||
@@ -31,11 +31,11 @@ public interface FoodApi {
|
|||||||
Gson gson = new GsonBuilder().setDateFormat("HH:mm:ss dd-MM-yyyy").setLenient().create();
|
Gson gson = new GsonBuilder().setDateFormat("HH:mm:ss dd-MM-yyyy").setLenient().create();
|
||||||
|
|
||||||
FoodApi apiService = new Retrofit.Builder()
|
FoodApi apiService = new Retrofit.Builder()
|
||||||
.baseUrl("http://192.168.1.183:8080/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
.baseUrl("https://foodify-backend-production.up.railway.app/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.build()
|
.build()
|
||||||
.create(FoodApi.class);
|
.create(FoodApi.class);
|
||||||
|
|
||||||
@GET("products/enable?pageNo=0&pageSize=10&sortBy=id&sortDir=asc")
|
@GET("products/random?pageSize=10")
|
||||||
Call<Foods> recommendFood();
|
Call<Foods> recommendFood();
|
||||||
|
|
||||||
@GET("products/enable?pageNo=0&pageSize=10&sortBy=createdTime&sortDir=desc")
|
@GET("products/enable?pageNo=0&pageSize=10&sortBy=createdTime&sortDir=desc")
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public interface FoodApiToken {
|
|||||||
|
|
||||||
FoodApiToken apiService = new Retrofit.Builder()
|
FoodApiToken apiService = new Retrofit.Builder()
|
||||||
.client(client)
|
.client(client)
|
||||||
.baseUrl("http://192.168.1.183:8080/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
.baseUrl("https://foodify-backend-production.up.railway.app/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.build()
|
.build()
|
||||||
.create(FoodApiToken.class);
|
.create(FoodApiToken.class);
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
|||||||
|
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
@@ -74,6 +76,40 @@ public class ChangePasswordActivity extends AppCompatActivity {
|
|||||||
textInput_password.setErrorEnabled(false);
|
textInput_password.setErrorEnabled(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
edtPassword.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
textInput_password.setErrorEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
edtPasswordConfirm.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
textInput_password_confirm.setErrorEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean validateData(){
|
private boolean validateData(){
|
||||||
|
|||||||
@@ -208,7 +208,9 @@ public class FoodDetailActivity extends AppCompatActivity {
|
|||||||
shopName_txt.setOnClickListener(new View.OnClickListener() {
|
shopName_txt.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
startActivity(new Intent(FoodDetailActivity.this, ShopDetailActivity.class));
|
Intent intent = new Intent(FoodDetailActivity.this, ShopDetailActivity.class);
|
||||||
|
intent.putExtra("ShopId", food.getShop().getId());
|
||||||
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
//Get user from Paper
|
//Get user from Paper
|
||||||
user = Paper.book().read("user");
|
// user = Paper.book().read("user");
|
||||||
|
|
||||||
// Check if user is signed in (non-null) and update UI accordingly.
|
// Check if user is signed in (non-null) and update UI accordingly.
|
||||||
user = mAuth.getCurrentUser();
|
user = mAuth.getCurrentUser();
|
||||||
@@ -117,6 +117,8 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (userData != null) {
|
if (userData != null) {
|
||||||
Common.CURRENT_USER = userData;
|
Common.CURRENT_USER = userData;
|
||||||
HomeFragment.setNameUser();
|
HomeFragment.setNameUser();
|
||||||
|
|
||||||
|
progressLayout.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.capstone.foodify.Activity;
|
|||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@@ -17,12 +18,15 @@ public class OrderActivity extends AppCompatActivity {
|
|||||||
ViewPager2 viewPager2;
|
ViewPager2 viewPager2;
|
||||||
ViewPagerAdapter viewPagerAdapter;
|
ViewPagerAdapter viewPagerAdapter;
|
||||||
ImageView back_image;
|
ImageView back_image;
|
||||||
|
public static Activity orderActivity;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_order);
|
setContentView(R.layout.activity_order);
|
||||||
|
|
||||||
|
orderActivity = this;
|
||||||
|
|
||||||
//Init Component
|
//Init Component
|
||||||
tabLayout = findViewById(R.id.tab_layout);
|
tabLayout = findViewById(R.id.tab_layout);
|
||||||
viewPager2 = findViewById(R.id.view_pager);
|
viewPager2 = findViewById(R.id.view_pager);
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ public class OrderCheckOutActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(@NonNull AestheticDialog.Builder builder) {
|
public void onClick(@NonNull AestheticDialog.Builder builder) {
|
||||||
Common.LIST_BASKET_FOOD.clear();
|
Common.LIST_BASKET_FOOD.clear();
|
||||||
startActivity(new Intent(OrderCheckOutActivity.this, OrderActivity.class));
|
startActivity(new Intent(OrderCheckOutActivity.this, MainActivity.class));
|
||||||
builder.dismiss();
|
builder.dismiss();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,6 +138,9 @@ public class OrderDetailActivity extends AppCompatActivity {
|
|||||||
.setOnClickListener(new OnDialogClickListener() {
|
.setOnClickListener(new OnDialogClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(@NonNull AestheticDialog.Builder builder) {
|
public void onClick(@NonNull AestheticDialog.Builder builder) {
|
||||||
|
|
||||||
|
OrderActivity.orderActivity.finish();
|
||||||
|
|
||||||
startActivity(new Intent(OrderDetailActivity.this, OrderActivity.class));
|
startActivity(new Intent(OrderDetailActivity.this, OrderActivity.class));
|
||||||
builder.dismiss();
|
builder.dismiss();
|
||||||
finish();
|
finish();
|
||||||
|
|||||||
@@ -40,11 +40,10 @@ public class ShopDetailActivity extends AppCompatActivity {
|
|||||||
private static boolean LAST_PAGE = false;
|
private static boolean LAST_PAGE = false;
|
||||||
private int shopId;
|
private int shopId;
|
||||||
private List<Food> listFood = new ArrayList<>();
|
private List<Food> listFood = new ArrayList<>();
|
||||||
TextView content_description_text_view, student_shop_text_view, end_of_list_text_view;
|
TextView content_description_text_view, student_shop_text_view, end_of_list_text_view, txt_shop_name;
|
||||||
ImageView imageShop, back_image;
|
ImageView imageShop, back_image;
|
||||||
RecyclerView recycler_view_food_shop;
|
RecyclerView recycler_view_food_shop;
|
||||||
FoodShopAdapter adapter;
|
FoodShopAdapter adapter;
|
||||||
private CollapsingToolbarLayout collapsingToolbarLayout;
|
|
||||||
private NestedScrollView nestedScrollView;
|
private NestedScrollView nestedScrollView;
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
private Shop shop;
|
private Shop shop;
|
||||||
@@ -60,13 +59,13 @@ public class ShopDetailActivity extends AppCompatActivity {
|
|||||||
recycler_view_food_shop = findViewById(R.id.recycler_view_food_shop);
|
recycler_view_food_shop = findViewById(R.id.recycler_view_food_shop);
|
||||||
back_image = findViewById(R.id.back_image);
|
back_image = findViewById(R.id.back_image);
|
||||||
adapter = new FoodShopAdapter(this);
|
adapter = new FoodShopAdapter(this);
|
||||||
collapsingToolbarLayout = findViewById(R.id.collapsing);
|
|
||||||
content_description_text_view = findViewById(R.id.content_description_text_view);
|
content_description_text_view = findViewById(R.id.content_description_text_view);
|
||||||
student_shop_text_view = findViewById(R.id.student_shop_text_view);
|
student_shop_text_view = findViewById(R.id.student_shop_text_view);
|
||||||
nestedScrollView = findViewById(R.id.food_detail);
|
nestedScrollView = findViewById(R.id.food_detail);
|
||||||
progressBar = findViewById(R.id.progress_bar);
|
progressBar = findViewById(R.id.progress_bar);
|
||||||
end_of_list_text_view = findViewById(R.id.end_of_list_text);
|
end_of_list_text_view = findViewById(R.id.end_of_list_text);
|
||||||
progressLayout = findViewById(R.id.progress_layout);
|
progressLayout = findViewById(R.id.progress_layout);
|
||||||
|
txt_shop_name = findViewById(R.id.txt_shop_name);
|
||||||
|
|
||||||
//Get data
|
//Get data
|
||||||
if (getIntent() != null)
|
if (getIntent() != null)
|
||||||
@@ -159,7 +158,7 @@ public class ShopDetailActivity extends AppCompatActivity {
|
|||||||
private void initData(Shop shop) {
|
private void initData(Shop shop) {
|
||||||
//Init data
|
//Init data
|
||||||
Picasso.get().load(shop.getImageUrl()).into(imageShop);
|
Picasso.get().load(shop.getImageUrl()).into(imageShop);
|
||||||
collapsingToolbarLayout.setTitle(shop.getName());
|
txt_shop_name.setText(shop.getName());
|
||||||
content_description_text_view.setText(shop.getDescription());
|
content_description_text_view.setText(shop.getDescription());
|
||||||
|
|
||||||
//If shop is studentShop, enable tag student shop
|
//If shop is studentShop, enable tag student shop
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.capstone.foodify.Activity;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextWatcher;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -17,6 +19,7 @@ import com.capstone.foodify.Fragment.HomeFragment;
|
|||||||
import com.capstone.foodify.Model.User;
|
import com.capstone.foodify.Model.User;
|
||||||
import com.capstone.foodify.R;
|
import com.capstone.foodify.R;
|
||||||
import com.google.android.gms.tasks.OnCompleteListener;
|
import com.google.android.gms.tasks.OnCompleteListener;
|
||||||
|
import com.google.android.gms.tasks.OnFailureListener;
|
||||||
import com.google.android.gms.tasks.Task;
|
import com.google.android.gms.tasks.Task;
|
||||||
import com.google.android.material.button.MaterialButton;
|
import com.google.android.material.button.MaterialButton;
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
@@ -26,6 +29,7 @@ import com.google.firebase.auth.AuthResult;
|
|||||||
import com.google.firebase.auth.FirebaseAuth;
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
import com.google.firebase.auth.FirebaseUser;
|
import com.google.firebase.auth.FirebaseUser;
|
||||||
import com.google.firebase.auth.GetTokenResult;
|
import com.google.firebase.auth.GetTokenResult;
|
||||||
|
import com.google.firebase.auth.SignInMethodQueryResult;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@@ -99,6 +103,24 @@ public class SignInActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
edt_password.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
textInput_password.setErrorEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initData(){
|
private void initData(){
|
||||||
@@ -146,7 +168,26 @@ public class SignInActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
mAuth.setLanguageCode("vi");
|
mAuth.setLanguageCode("vi");
|
||||||
|
|
||||||
mAuth.signInWithEmailAndPassword(edt_email.getText().toString(), edt_password.getText().toString())
|
mAuth.fetchSignInMethodsForEmail(email)
|
||||||
|
.addOnCompleteListener(new OnCompleteListener<SignInMethodQueryResult>() {
|
||||||
|
@Override
|
||||||
|
public void onComplete(@NonNull Task<SignInMethodQueryResult> task) {
|
||||||
|
|
||||||
|
boolean isNewUser = task.getResult().getSignInMethods().isEmpty();
|
||||||
|
|
||||||
|
if (isNewUser) {
|
||||||
|
Toast.makeText(SignInActivity.this, "Tài khoản chưa được đăng ký! Vui lòng đăng ký để tiếp tục sử dụng!", Toast.LENGTH_SHORT).show();
|
||||||
|
progressLayout.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
signInMethod();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void signInMethod(){
|
||||||
|
mAuth.signInWithEmailAndPassword(email, password)
|
||||||
.addOnCompleteListener(SignInActivity.this, new OnCompleteListener<AuthResult>() {
|
.addOnCompleteListener(SignInActivity.this, new OnCompleteListener<AuthResult>() {
|
||||||
@Override
|
@Override
|
||||||
public void onComplete(@NonNull Task<AuthResult> task) {
|
public void onComplete(@NonNull Task<AuthResult> task) {
|
||||||
@@ -155,7 +196,7 @@ public class SignInActivity extends AppCompatActivity {
|
|||||||
FirebaseUser user = mAuth.getCurrentUser();
|
FirebaseUser user = mAuth.getCurrentUser();
|
||||||
|
|
||||||
//Save user
|
//Save user
|
||||||
Paper.book().write("user", user);
|
// Paper.book().write("user", user);
|
||||||
|
|
||||||
user.getIdToken(true)
|
user.getIdToken(true)
|
||||||
.addOnCompleteListener(new OnCompleteListener<GetTokenResult>() {
|
.addOnCompleteListener(new OnCompleteListener<GetTokenResult>() {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.os.Bundle;
|
|||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@@ -103,6 +104,7 @@ public class VerifyAccountActivity extends AppCompatActivity {
|
|||||||
//Init text changedListener
|
//Init text changedListener
|
||||||
textChangedListenerEditTextOTP();
|
textChangedListenerEditTextOTP();
|
||||||
|
|
||||||
|
|
||||||
//Add event to confirm button
|
//Add event to confirm button
|
||||||
confirm_code.setOnClickListener(new View.OnClickListener() {
|
confirm_code.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -283,104 +285,119 @@ public class VerifyAccountActivity extends AppCompatActivity {
|
|||||||
inputCode1.addTextChangedListener(new TextWatcher() {
|
inputCode1.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
if(inputCode1.getText().toString().length()== 0) //size as per your requirement
|
|
||||||
{
|
|
||||||
inputCode2.requestFocus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
// Nothing to do
|
if (s.length() == 1) {
|
||||||
|
inputCode2.requestFocus(View.FOCUS_DOWN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
// Nothing to do
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
inputCode2.addTextChangedListener(new TextWatcher() {
|
inputCode2.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
if(inputCode2.getText().toString().length()== 0) //size as per your requirement
|
|
||||||
{
|
|
||||||
inputCode3.requestFocus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
// Nothing to do
|
if(count == 0) {
|
||||||
|
inputCode1.requestFocus(View.FOCUS_DOWN);
|
||||||
|
} else {
|
||||||
|
if (s.length() == 1) {
|
||||||
|
inputCode3.requestFocus(View.FOCUS_DOWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
// Nothing to do
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
inputCode3.addTextChangedListener(new TextWatcher() {
|
inputCode3.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
if(inputCode3.getText().toString().length()== 0) //size as per your requirement
|
|
||||||
{
|
|
||||||
inputCode4.requestFocus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
// Nothing to do
|
if(count == 0) {
|
||||||
|
inputCode2.requestFocus(View.FOCUS_DOWN);
|
||||||
|
} else {
|
||||||
|
if (s.length() == 1) {
|
||||||
|
inputCode4.requestFocus(View.FOCUS_DOWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
// Nothing to do
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
inputCode4.addTextChangedListener(new TextWatcher() {
|
inputCode4.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
if(inputCode4.getText().toString().length()== 0) //size as per your requirement
|
|
||||||
{
|
|
||||||
inputCode5.requestFocus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
// Nothing to do
|
if(count == 0) {
|
||||||
|
inputCode3.requestFocus(View.FOCUS_DOWN);
|
||||||
|
} else {
|
||||||
|
if (s.length() == 1) {
|
||||||
|
inputCode5.requestFocus(View.FOCUS_DOWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
// Nothing to do
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
inputCode5.addTextChangedListener(new TextWatcher() {
|
inputCode5.addTextChangedListener(new TextWatcher() {
|
||||||
@Override
|
@Override
|
||||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
if(inputCode5.getText().toString().length()== 0) //size as per your requirement
|
|
||||||
{
|
|
||||||
inputCode6.requestFocus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
// Nothing to do
|
if(count == 0) {
|
||||||
|
inputCode4.requestFocus(View.FOCUS_DOWN);
|
||||||
|
} else {
|
||||||
|
if (s.length() == 1) {
|
||||||
|
inputCode6.requestFocus(View.FOCUS_DOWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
inputCode6.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
if(count == 0) {
|
||||||
|
inputCode5.requestFocus(View.FOCUS_DOWN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
// Nothing to do
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void requestSMSPermission()
|
private void requestSMSPermission()
|
||||||
{
|
{
|
||||||
String permission = Manifest.permission.RECEIVE_SMS;
|
String permission = Manifest.permission.RECEIVE_SMS;
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ public class FoodAdapter extends RecyclerView.Adapter<FoodAdapter.FoodViewHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
String foodName = food.getName();
|
String foodName = food.getName();
|
||||||
if(foodName.length() >= 30){
|
if(foodName.length() >= 24){
|
||||||
StringBuilder stringBuilder = new StringBuilder(food.getName());
|
StringBuilder stringBuilder = new StringBuilder(food.getName());
|
||||||
stringBuilder.replace(30, food.getName().length(), "..." );
|
stringBuilder.replace(24, food.getName().length(), "..." );
|
||||||
holder.name.setText(stringBuilder);
|
holder.name.setText(stringBuilder);
|
||||||
} else {
|
} else {
|
||||||
holder.name.setText(foodName);
|
holder.name.setText(foodName);
|
||||||
|
|||||||
@@ -49,7 +49,16 @@ public class ShopAdapter extends RecyclerView.Adapter<ShopAdapter.ShopViewHolder
|
|||||||
|
|
||||||
//Init data
|
//Init data
|
||||||
Picasso.get().load(shop.getImageUrl()).into(holder.imageView);
|
Picasso.get().load(shop.getImageUrl()).into(holder.imageView);
|
||||||
holder.shopName.setText(shop.getName());
|
|
||||||
|
String shopName = shop.getName();
|
||||||
|
|
||||||
|
if(shopName.length() >= 24){
|
||||||
|
StringBuilder stringBuilder = new StringBuilder(shop.getName());
|
||||||
|
stringBuilder.replace(24, shop.getName().length(), "..." );
|
||||||
|
holder.shopName.setText(stringBuilder);
|
||||||
|
} else {
|
||||||
|
holder.shopName.setText(shopName);
|
||||||
|
}
|
||||||
|
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public class HomeFragment extends Fragment {
|
|||||||
List<Menu> listMenu = new ArrayList<>();
|
List<Menu> listMenu = new ArrayList<>();
|
||||||
|
|
||||||
listMenu.add(new Menu("Món ăn khuyến nghị", listFood));
|
listMenu.add(new Menu("Món ăn khuyến nghị", listFood));
|
||||||
listMenu.add(new Menu("Món ăn phổ biến", recentFood));
|
listMenu.add(new Menu("Món ăn được thêm gần đây", recentFood));
|
||||||
|
|
||||||
return listMenu;
|
return listMenu;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class ProfileFragment extends Fragment {
|
|||||||
FirebaseAuth.getInstance().signOut();
|
FirebaseAuth.getInstance().signOut();
|
||||||
|
|
||||||
//Delete user from local storage
|
//Delete user from local storage
|
||||||
Paper.book().delete("user");
|
// Paper.book().delete("user");
|
||||||
|
|
||||||
Common.TOKEN = null;
|
Common.TOKEN = null;
|
||||||
Common.CURRENT_USER = null;
|
Common.CURRENT_USER = null;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -441,7 +441,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout 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_width="match_parent"
|
||||||
@@ -7,27 +7,27 @@
|
|||||||
tools:context=".Activity.ShopDetailActivity"
|
tools:context=".Activity.ShopDetailActivity"
|
||||||
>
|
>
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/app_bar_layout"
|
android:id="@+id/food_detail"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:theme="@style/Theme.Foodify"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
>
|
>
|
||||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
|
||||||
android:id="@+id/collapsing"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="250dp"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
|
|
||||||
app:contentScrim="@color/primaryDarkColor"
|
|
||||||
android:theme="@style/CustomToolbarTheme"
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/image_shop"
|
android:id="@+id/image_shop"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="200dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -39,123 +39,125 @@
|
|||||||
android:layout_marginTop="25dp"
|
android:layout_marginTop="25dp"
|
||||||
android:background="@drawable/circle_button"
|
android:background="@drawable/circle_button"
|
||||||
android:translationZ="90dp"
|
android:translationZ="90dp"
|
||||||
android:padding="8dp"/>
|
android:padding="8dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
<androidx.appcompat.widget.Toolbar
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="?attr/actionBarSize"
|
|
||||||
app:layout_collapseMode="pin"/>
|
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:id="@+id/food_detail"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
|
|
||||||
>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/student_shop_text_view"
|
|
||||||
android:text="Student Shop"
|
|
||||||
android:fontFamily="@font/bebas"
|
|
||||||
android:textColor="@color/red"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/description_text_view"
|
|
||||||
android:text="Mô tả"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:fontFamily="@font/bebas"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/content_description_text_view"
|
|
||||||
android:textColor="@color/gray"
|
|
||||||
android:fontFamily="@font/opensans"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginStart="7dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/description_text_view"
|
android:layout_marginEnd="7dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/line"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="2dp"
|
|
||||||
android:background="#c0c0c0"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/content_description_text_view"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView"
|
|
||||||
android:text="Danh sách các món ăn"
|
|
||||||
android:fontFamily="@font/bebas"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/content_description_text_view"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recycler_view_food_shop"
|
|
||||||
tools:listitem="@layout/item_food_shop"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/textView"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ProgressBar
|
|
||||||
android:id="@+id/progress_bar"
|
|
||||||
android:indeterminateTint="@color/primaryColor"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/recycler_view_food_shop"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_width="wrap_content"
|
app:layout_constraintTop_toBottomOf="@id/image_shop"
|
||||||
android:layout_height="wrap_content"
|
>
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/student_shop_text_view"
|
||||||
android:text="End of list"
|
android:text="Student Shop"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/bebas"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/red"
|
||||||
android:visibility="gone"
|
android:layout_marginTop="20dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/progress_bar"
|
android:layout_width="wrap_content"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/txt_shop_name"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_width="wrap_content"
|
android:visibility="visible"
|
||||||
android:layout_height="wrap_content"
|
/>
|
||||||
/>
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_shop_name"
|
||||||
|
android:text="Shop name"
|
||||||
|
android:fontFamily="@font/bebas"
|
||||||
|
android:textColor="@color/primaryColor"
|
||||||
|
android:textSize="35sp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/description_text_view"
|
||||||
|
android:text="Mô tả"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:fontFamily="@font/bebas"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/txt_shop_name"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/content_description_text_view"
|
||||||
|
android:textColor="@color/gray"
|
||||||
|
android:fontFamily="@font/opensans"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/description_text_view"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/line"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="2dp"
|
||||||
|
android:background="#c0c0c0"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/content_description_text_view"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:text="Danh sách các món ăn"
|
||||||
|
android:fontFamily="@font/bebas"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/content_description_text_view"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view_food_shop"
|
||||||
|
tools:listitem="@layout/item_food_shop"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/textView"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress_bar"
|
||||||
|
android:indeterminateTint="@color/primaryColor"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/recycler_view_food_shop"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/end_of_list_text"
|
||||||
|
android:text="Đã hết"
|
||||||
|
android:fontFamily="@font/opensans"
|
||||||
|
android:textColor="@color/grayLight"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/progress_bar"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
@@ -182,4 +184,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -105,7 +105,9 @@
|
|||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textInput_password" />
|
app:layout_constraintTop_toBottomOf="@+id/textInput_password"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/sign_in_button"
|
android:id="@+id/sign_in_button"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/end_of_list_text"
|
android:id="@+id/end_of_list_text"
|
||||||
android:text="End of list"
|
android:text="Đã hết"
|
||||||
android:fontFamily="@font/opensans"
|
android:fontFamily="@font/opensans"
|
||||||
android:textColor="@color/grayLight"
|
android:textColor="@color/grayLight"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/price"
|
android:id="@+id/price"
|
||||||
android:textSize="18sp"
|
android:textSize="17sp"
|
||||||
android:text="1000000000"
|
android:text="1000000000"
|
||||||
android:textColor="@color/primaryColor"
|
android:textColor="@color/primaryColor"
|
||||||
android:fontFamily="@font/bebas"
|
android:fontFamily="@font/bebas"
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/discount"
|
android:id="@+id/discount"
|
||||||
android:text="-59%"
|
android:text="-59%"
|
||||||
android:textSize="8sp"
|
android:textSize="6sp"
|
||||||
android:textColor="@color/red"
|
android:textColor="@color/red"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
android:id="@+id/shopName"
|
android:id="@+id/shopName"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:textStyle="bold"
|
||||||
android:text="Shop Name"
|
android:text="Shop Name"
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
android:layout_marginEnd="3dp"
|
android:layout_marginEnd="3dp"
|
||||||
|
|||||||
Reference in New Issue
Block a user