badge icon fix
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@@ -23,8 +23,8 @@ android {
|
||||
applicationId "ch.pizzapp.capri"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 17 // play store'daki version --> canlı: 16 - dahili test: 15
|
||||
versionName "2.19" // play store'daki version --> canlı: 2.18 - dahili test: 2.17
|
||||
versionCode 18 // play store'daki version --> canlı: 17 - dahili test: 15
|
||||
versionName "2.20" // play store'daki version --> canlı: 2.19 - dahili test: 2.17
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
manifestPlaceholders = [
|
||||
|
||||
@@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":16,"versionName":"2.18","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":17,"versionName":"2.19","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
@@ -192,6 +192,11 @@ public class MainActivity extends BaseActivity {
|
||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||
shoppingCartTextView.setTextColor(whiteColor);
|
||||
|
||||
if(!SessionHelper.isCustomerLoggedIn()) {
|
||||
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!SharedPrefsHelper.getCartTotalPrice().equals("0") &&
|
||||
!SharedPrefsHelper.getCartTotalPrice().equals("0.0") &&
|
||||
!SharedPrefsHelper.getCartTotalPrice().equals("0.00")){
|
||||
@@ -466,6 +471,12 @@ public class MainActivity extends BaseActivity {
|
||||
*/
|
||||
|
||||
private void updateCartTotalRelativeLayout() {
|
||||
|
||||
if(!SessionHelper.isCustomerLoggedIn()) {
|
||||
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
if(SharedPrefsHelper.getCartTotalPrice().equals("0") ||
|
||||
SharedPrefsHelper.getCartTotalPrice().equals("0.0") ||
|
||||
SharedPrefsHelper.getCartTotalPrice().equals("0.00")){
|
||||
@@ -479,6 +490,12 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
public void updateBadge(){
|
||||
|
||||
if(!SessionHelper.isCustomerLoggedIn()) {
|
||||
badgeLayout.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
int count = SharedPrefsHelper.getCartItemCount();
|
||||
badgeTextView.setText(String.valueOf(count));
|
||||
|
||||
@@ -496,6 +513,12 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
public void setCartTotalLayoutVisibility(boolean isVisible){
|
||||
|
||||
if(!SessionHelper.isCustomerLoggedIn()) {
|
||||
cartTotalRelativeLayout.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
if(isVisible){
|
||||
cartTotalRelativeLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user