minimum price label

This commit is contained in:
2019-08-04 17:25:20 +03:00
parent 203299a5b3
commit 02460cb7c0
5 changed files with 67 additions and 8 deletions

View File

@@ -54,6 +54,7 @@ public class MainActivity extends BaseActivity {
@BindView(R.id.pizzalinkToolbar) AppToolbar appToolbar;
@BindView(R.id.cartTotalRelativeLayout) RelativeLayout cartTotalRelativeLayout;
@BindView(R.id.cartTotalTextView) TextView cartTotalTextView;
@BindView(R.id.minimumPriceTextView) TextView minimumPriceTextView;
@BindView(R.id.bottomNavigationView) BottomNavigationViewEx bottomNavigationView;
@BindView(R.id.badgeLayout) RelativeLayout badgeLayout;
@@ -112,7 +113,7 @@ public class MainActivity extends BaseActivity {
showStartScreen();
setCartItemCount();
initShoppingCartButton();
minimumPriceTextView.setText(PriceHelper.getPriceWithCurreny(SessionHelper.getSelectedStore().getMinimumPrice()));
}
private void initShoppingCartButton(){
@@ -202,12 +203,16 @@ public class MainActivity extends BaseActivity {
return true;
}
/*
if(!SharedPrefsHelper.getCartTotalPrice().equals("0") &&
!SharedPrefsHelper.getCartTotalPrice().equals("0.0") &&
!SharedPrefsHelper.getCartTotalPrice().equals("0.00")){
cartTotalTextView.setText(PriceHelper.getPriceWithCurreny(SharedPrefsHelper.getCartTotalPrice()));
cartTotalRelativeLayout.setVisibility(View.VISIBLE);
}
*/
cartTotalRelativeLayout.setVisibility(View.VISIBLE);
return true;
@@ -482,6 +487,7 @@ public class MainActivity extends BaseActivity {
return;
}
/*
if(SharedPrefsHelper.getCartTotalPrice().equals("0") ||
SharedPrefsHelper.getCartTotalPrice().equals("0.0") ||
SharedPrefsHelper.getCartTotalPrice().equals("0.00")){
@@ -491,6 +497,13 @@ public class MainActivity extends BaseActivity {
cartTotalTextView.setText(PriceHelper.getPriceWithCurreny(SharedPrefsHelper.getCartTotalPrice()));
cartTotalRelativeLayout.setVisibility(View.VISIBLE);
}
*/
cartTotalTextView.setText(PriceHelper.getPriceWithCurreny(SharedPrefsHelper.getCartTotalPrice()));
if(getSupportFragmentManager().findFragmentById(R.id.fragmentContainer) != null &&
getSupportFragmentManager().findFragmentById(R.id.fragmentContainer) instanceof MenuFragment){
cartTotalRelativeLayout.setVisibility(View.VISIBLE);
}
}